v1.06: clean up debianization
[hcoop/debian/libnss-afs.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 CFLAGS = -Wall -g
8
9 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
10 CFLAGS += -O0
11 else
12 CFLAGS += -O2
13 endif
14 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
15 INSTALL_PROGRAM += -s
16 endif
17
18 configure: configure-stamp
19 configure-stamp:
20 dh_testdir
21 touch configure-stamp
22
23 build: build-stamp
24
25 build-stamp: configure-stamp
26 dh_testdir
27 $(MAKE)
28 touch build-stamp
29
30 clean:
31 dh_testdir
32 dh_testroot
33 rm -f build-stamp configure-stamp
34 -$(MAKE) clean
35 dh_clean
36
37 install: build
38 dh_testdir
39 dh_testroot
40 dh_clean -k
41 dh_installdirs
42 mkdir -p $(CURDIR)/debian/libnss-afs
43 $(MAKE) install DESTDIR=$(CURDIR)/debian/libnss-afs
44 mkdir -p $(CURDIR)/debian/libnss-afs/DEBIAN
45 install -m644 debian/shlibs $(CURDIR)/debian/libnss-afs/DEBIAN
46 mkdir -p $(CURDIR)/debian/libnss-afs/usr/share/lintian/overrides/
47 cp debian/source.lintian-overrides $(CURDIR)/debian/libnss-afs/usr/share/lintian/overrides/libnss-afs
48
49 # Build architecture-independent files here.
50 binary-indep: build install
51 # We have nothing to do by default.
52
53 # Build architecture-dependent files here.
54 binary-arch: build install
55 dh_testdir
56 dh_testroot
57 dh_installchangelogs
58 dh_installdocs
59 dh_installexamples
60 #dh_installinit -- start 52 S . stop 33 0 6 .
61 dh_installman
62 dh_link
63 dh_strip
64 dh_compress
65 dh_fixperms
66 dh_installdeb
67 dh_shlibdeps $(CURDIR)/debian/lib/*.so*
68 dh_gencontrol
69 dh_md5sums
70 dh_builddeb
71
72 binary: binary-indep binary-arch
73 .PHONY: build clean binary-indep binary-arch binary install configure