0 | 0 |
#!/usr/bin/make -f
|
1 | |
# Sample debian/rules that uses debhelper.
|
2 | |
# GNU copyright 1997 to 1999 by Joey Hess.
|
3 | |
|
4 | |
# Uncomment this to turn on verbose mode.
|
5 | |
#export DH_VERBOSE=1
|
6 | 1 |
|
7 | 2 |
# These are used for cross-compiling and for saving the configure script
|
8 | 3 |
# from having to guess our platform (since we know it already)
|
9 | |
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
10 | |
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
4 |
#DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
5 |
#DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
11 | 6 |
|
12 | |
#CXX = g++
|
13 | |
CXXFLAGS = -Wall -g -DDEBIANIZED
|
|
7 |
DPKG_EXPORT_BUILDFLAGS = 1
|
|
8 |
include /usr/share/dpkg/buildflags.mk
|
14 | 9 |
|
15 | |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
16 | |
CXXFLAGS += -O0
|
17 | |
else
|
18 | |
CXXFLAGS += -O2
|
19 | |
endif
|
|
10 |
CXXFLAGS += -Wall -g -DDEBIANIZED
|
20 | 11 |
|
21 | |
export CXX CXXFLAGS
|
|
12 |
%:
|
|
13 |
dh $@
|
22 | 14 |
|
23 | |
config.status: configure
|
24 | |
dh_testdir
|
25 | |
# configure the package.
|
26 | |
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --datadir=\$${prefix}/share/doc
|
27 | |
|
28 | |
|
29 | |
build: build-stamp
|
30 | |
|
31 | |
build-stamp: config.status
|
32 | |
dh_testdir
|
33 | |
|
34 | |
# compile the package.
|
35 | |
$(MAKE)
|
36 | |
|
37 | |
touch build-stamp
|
38 | |
|
39 | |
clean:
|
40 | |
dh_testdir
|
41 | |
dh_testroot
|
42 | |
rm -f build-stamp
|
43 | |
|
44 | |
# clean up after the build process.
|
45 | |
[ ! -f Makefile ] || $(MAKE) distclean
|
46 | |
|
47 | |
dh_clean
|
48 | |
|
49 | |
install: build
|
50 | |
dh_testdir
|
51 | |
dh_testroot
|
52 | |
dh_clean -k
|
53 | |
dh_installdirs
|
54 | |
|
55 | |
# install the package into debian/squidview.
|
56 | |
$(MAKE) install prefix=$(CURDIR)/debian/squidview/usr
|
57 | |
|
|
15 |
override_dh_install:
|
|
16 |
dh_install
|
58 | 17 |
# Delete the examples from /usr/share/doc/squidview
|
59 | 18 |
for i in users aliases words example.log; do \
|
60 | 19 |
rm -f $(CURDIR)/debian/squidview/usr/share/doc/squidview/$$i; \
|
61 | 20 |
done
|
62 | 21 |
|
|
22 |
override_dh_installchangelogs:
|
|
23 |
dh_installchangelogs ChangeLog
|
63 | 24 |
|
64 | |
# Build architecture-independent files here.
|
65 | |
binary-indep: build install
|
66 | |
# We have nothing to do by default.
|
67 | |
|
68 | |
# Build architecture-dependent files here.
|
69 | |
binary-arch: build install
|
70 | |
dh_testdir
|
71 | |
dh_testroot
|
72 | |
dh_installdocs
|
73 | |
dh_installexamples
|
74 | |
dh_installchangelogs ChangeLog
|
75 | |
dh_strip
|
|
25 |
override_dh_compress:
|
76 | 26 |
dh_compress -XHOWTO
|
77 | |
dh_fixperms
|
78 | |
dh_shlibdeps
|
79 | |
dh_gencontrol
|
80 | |
dh_md5sums
|
81 | |
dh_builddeb
|
82 | |
|
83 | |
binary: binary-indep binary-arch
|
84 | |
.PHONY: build clean binary-indep binary-arch binary install
|