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
24 CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
25 --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
26 --mandir=\$${prefix}/share/man
28 build: build-stamp
30 build-stamp: config.status
31 dh_testdir
33 $(MAKE)
35 touch build-stamp
37 clean:
38 dh_testdir
39 dh_testroot
40 rm -f build-stamp
42 -$(MAKE) distclean
44 dh_clean
46 install: build
47 dh_testdir
48 dh_testroot
49 dh_clean -k
50 dh_installdirs
52 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
54 chmod u+s debian/tmp/usr/bin/oping
55 mkdir -p debian/oping/usr/share/lintian/overrides/
56 cp debian/oping.overrides debian/oping/usr/share/lintian/overrides/oping
58 binary-indep:
59 # nothing to do here
61 binary-arch: build install
62 dh_testdir
63 dh_testroot
64 dh_installchangelogs ChangeLog
65 dh_installdocs -A README
66 dh_installman
67 dh_install --sourcedir=debian/tmp --list-missing
68 dh_link
69 dh_strip
70 dh_compress
71 dh_fixperms -Xusr/bin/oping
72 dh_makeshlibs
73 dh_installdeb
74 dh_shlibdeps -ldebian/liboping0/usr/lib/
75 dh_gencontrol
76 dh_md5sums
77 dh_builddeb
79 binary: binary-indep binary-arch
80 .PHONY: build clean binary-indep binary-arch binary install