43ed9fc18f35d2b1b990ab14f8e4b8fd1b0e99c2
1 #!/usr/bin/make -f
2 # debian/rules for liboping
3 #
4 # Written by Sebastian Harl <sh@tokkee.org>
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 CFLAGS = -Wall -g
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17 CFLAGS += -O0
18 else
19 CFLAGS += -O2
20 endif
22 config.status: configure
23 dh_testdir
25 for file in config.guess config.sub; do \
26 mv $$file $$file.upstream; \
27 ln -s /usr/share/misc/$$file .; \
28 done
30 CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
31 --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
32 --mandir=\$${prefix}/share/man
34 build: build-stamp
36 build-stamp: config.status
37 dh_testdir
39 $(MAKE)
41 touch build-stamp
43 clean:
44 dh_testdir
45 dh_testroot
46 rm -f build-stamp
48 [ ! -f Makefile ] || $(MAKE) distclean
50 for file in config.guess config.sub; do \
51 if [ -e $$file.upstream ]; then \
52 rm -f $$file; \
53 mv $$file.upstream $$file; \
54 fi \
55 done
57 dh_clean
59 install: build
60 dh_testdir
61 dh_testroot
62 dh_clean -k
63 dh_installdirs
65 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
67 chmod u+s debian/tmp/usr/bin/oping
68 mkdir -p debian/oping/usr/share/lintian/overrides/
69 cp debian/oping.overrides debian/oping/usr/share/lintian/overrides/oping
71 binary-indep:
72 # nothing to do here
74 binary-arch: build install
75 dh_testdir
76 dh_testroot
77 dh_installchangelogs ChangeLog
78 dh_installdocs -A README
79 dh_installman
80 dh_install --sourcedir=debian/tmp --list-missing
81 dh_link
82 dh_strip
83 dh_compress
84 dh_fixperms -Xusr/bin/oping
85 dh_makeshlibs
86 dh_installdeb
87 dh_shlibdeps -ldebian/liboping0/usr/lib/
88 dh_gencontrol
89 dh_md5sums
90 dh_builddeb
92 binary: binary-indep binary-arch
93 .PHONY: build clean binary-indep binary-arch binary install