Add per policy required build-arch/build-indep
[manu/libnss-mysql-bg.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8
9
10
11
12 CFLAGS = -Wall -g
13
14 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
15         CFLAGS += -O0
16 else
17         CFLAGS += -O2
18 endif
19 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
20         INSTALL_PROGRAM += -s
21 endif
22
23 # shared library versions, option 1
24 version=2.0.5
25 major=2
26 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
27 #version=`ls src/.libs/lib*.so.* | \
28 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
29 #major=`ls src/.libs/lib*.so.* | \
30 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
31
32 patch:
33         dh_quilt_patch
34
35 configure: configure-stamp
36 configure-stamp: patch
37         dh_testdir
38         ./configure
39         touch configure-stamp
40
41
42 build: build-arch build-indep
43 build-arch: build-stamp
44 build-indep: build-stamp
45 build-stamp: configure-stamp
46         dh_testdir
47         $(MAKE)
48         touch build-stamp
49
50 clean:
51         dh_testdir
52         dh_testroot
53         rm -f build-stamp configure-stamp
54         [ ! -f Makefile ] || $(MAKE) distclean
55         rm -f config.log
56         dh_clean
57         dh_quilt_unpatch
58         rm -rf debian/patched
59
60 install: build
61         dh_testdir
62         dh_testroot
63         dh_prep
64         dh_installdirs
65         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
66         dh_movefiles
67
68 # Build architecture-independent files here.
69 binary-indep: 
70 # We have nothing to do by default.
71
72 # Build architecture-dependent files here.
73 binary-arch: build install
74         dh_testdir
75         dh_testroot
76         dh_installchangelogs ChangeLog
77         dh_installdocs
78         dh_installexamples
79 #       dh_install
80 #       dh_installmenu
81 #       dh_installdebconf       
82 #       dh_installlogrotate
83 #       dh_installemacsen
84 #       dh_installpam
85 #       dh_installmime
86 #       dh_installinit
87 #       dh_installcron
88 #       dh_installinfo
89 #       dh_installman
90         dh_link
91         dh_strip
92         dh_compress
93         dh_fixperms
94 #       dh_perl
95 #       dh_python
96         dh_makeshlibs
97         dh_installdeb
98         dh_shlibdeps
99         dh_gencontrol
100         dh_md5sums
101         dh_builddeb
102
103 binary: binary-indep binary-arch
104 .PHONY: build clean binary-indep binary-arch binary install configure patch