Code

Fixed switched long package descriptions.
[pkg-liboping.git] / debian / rules
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 libdir="$(CURDIR)/debian/liboping0/usr/lib/"
24 libdeveldir="$(CURDIR)/debian/liboping0-dev/usr/lib"
25 includedir="$(CURDIR)/debian/liboping0-dev/usr/include"
26 man3dir="$(CURDIR)/debian/liboping0-dev/usr/share/man/man3"
28 bindir="$(CURDIR)/debian/oping/usr/bin"
29 man8dir="$(CURDIR)/debian/oping/usr/share/man/man8"
30 overridesdir="$(CURDIR)/debian/oping/usr/share/lintian/overrides"
32 config.status: configure
33         dh_testdir
34         CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
35                         --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
36                         --mandir=\$${prefix}/share/man
38 build: build-stamp
40 build-stamp:  config.status
41         dh_testdir
42         
43         $(MAKE)
44         
45         touch build-stamp
47 clean:
48         dh_testdir
49         dh_testroot
50         rm -f build-stamp 
51         
52         -$(MAKE) distclean
53         
54         dh_clean 
56 install: build
57         dh_testdir
58         dh_testroot
59         dh_clean -k 
60         dh_installdirs
61         
62         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
63         
64         mkdir -p $(libdir)
65         mv $(CURDIR)/debian/tmp/usr/lib/liboping.so.* $(libdir)
66         
67         mkdir -p $(includedir)
68         mkdir -p $(libdeveldir)
69         mkdir -p $(man3dir)
70         mv $(CURDIR)/debian/tmp/usr/include/* $(includedir)
71         mv $(CURDIR)/debian/tmp/usr/lib/liboping.a $(libdeveldir)
72         mv $(CURDIR)/debian/tmp/usr/lib/liboping.so $(libdeveldir)
73         mv $(CURDIR)/debian/tmp/usr/lib/liboping.la $(libdeveldir)
74         mv $(CURDIR)/debian/tmp/usr/share/man/man3/* $(man3dir)
75         
76         mkdir -p $(bindir)
77         mkdir -p $(man8dir)
78         mkdir -p $(overridesdir)
79         mv $(CURDIR)/debian/tmp/usr/bin/oping $(bindir)
80         chmod u+s $(bindir)/oping
81         mv $(CURDIR)/debian/tmp/usr/share/man/man8/* $(man8dir)
82         cp $(CURDIR)/debian/oping.overrides $(overridesdir)/oping
84 binary-indep:
85         # nothing to do here
87 binary-arch: build install
88         dh_testdir
89         dh_testroot
90         dh_installchangelogs ChangeLog
91         dh_installdocs -A README
92         dh_installman
93         dh_link
94         dh_strip
95         dh_compress
96         dh_fixperms -Xusr/bin/oping
97         dh_makeshlibs
98         dh_installdeb
99         dh_shlibdeps -l$(libdir)
100         dh_gencontrol
101         dh_md5sums
102         dh_builddeb
104 binary: binary-indep binary-arch
105 .PHONY: build clean binary-indep binary-arch binary install