r6787: Use debhelper for the debian packages
[kai/samba.git] / packaging / debian / rules
1 #!/usr/bin/make -f
2 # By Jelmer Vernooij <jelmer@samba.org>
3 # Made with the aid of debmake, by Christoph Lameter,
4 # based on the sample debian/rules file for GNU hello by Ian Jackson.
5
6 SOURCEPATH=../../source
7
8 package=samba4
9
10 configure:
11         dh_testdir
12         cd $(SOURCEPATH) && ./autogen.sh
13         cd $(SOURCEPATH) && ./configure --with-fhs \
14                 --prefix=/usr \
15                 --enable-shared \
16                 --enable-static \
17                 --sysconfdir=/etc \
18                 --libdir=/etc/samba4 \
19                 --with-privatedir=/etc/samba4 \
20                 --with-piddir=/var/run/samba4 \
21                 --localstatedir=/var \
22                 --with-pam \
23                 --with-syslog \
24                 --with-readline \
25                 --with-ldap 
26         touch $@
27
28 build: configure
29         dh_testdir
30         cd $(SOURCEPATH) && $(MAKE) proto all
31         touch $@
32
33 clean:
34         dh_testdir
35         dh_clean
36         rm -f build
37         -cd $(SOURCEPATH) && $(MAKE) clean
38
39 binary-indep: build install
40         dh_testdir -i
41         dh_testroot -i
42         dh_installdocs -i
43         dh_installchangelogs -i
44         dh_compress -i
45         dh_fixperms -i
46         dh_python -i
47         dh_installdeb -i
48         dh_gencontrol -i
49         dh_md5sums -i
50         dh_builddeb -i
51 # There are no architecture-independent files to be uploaded
52 # generated by this package.  If there were any they would be
53 # made here.
54
55 install: build
56         dh_clean -k
57         dh_installdirs
58         $(MAKE) -C $(SOURCEPATH) install DESTDIR=`pwd`/../packaging/debian/tmp
59
60 binary-arch: build install
61         dh_testdir -a
62         dh_testroot -a
63         dh_installdocs -a
64         dh_installman -a
65         dh_strip -a
66         dh_python -a
67         dh_compress -a
68         dh_fixperms -a
69         dh_makeshlibs -a
70         dh_installdeb -a
71         dh_shlibdeps -a
72         dh_gencontrol -a
73         dh_md5sums -a
74         dh_builddeb -a
75
76 binary: binary-indep binary-arch
77
78 .PHONY: binary binary-arch binary-indep clean