2d0505d22510e1250296a2cb3713550ff40a051a
[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         $(MAKE) -C $(SOURCEPATH) proto 
31         -$(MAKE) -C $(SOURCEPATH) pch
32         $(MAKE) -C $(SOURCEPATH) all
33         touch $@
34
35 clean:
36         dh_testdir
37         dh_clean
38         rm -f build
39         -$(MAKE) -C $(SOURCEPATH) clean
40
41 binary-indep: build install
42         dh_testdir -i
43         dh_testroot -i
44         dh_install -i --sourcedir=debian/tmp
45         dh_installdocs -i
46         dh_installchangelogs -i
47         dh_compress -i
48         dh_fixperms -i
49         dh_python -i
50         dh_installdeb -i
51         dh_gencontrol -i
52         dh_md5sums -i
53         dh_builddeb -i
54 # There are no architecture-independent files to be uploaded
55 # generated by this package.  If there were any they would be
56 # made here.
57
58 install: build
59         dh_clean -k
60         dh_installdirs
61         $(MAKE) -C $(SOURCEPATH) install DESTDIR=$(CURDIR)/debian/tmp
62         cp debian/smb.conf $(CURDIR)/debian/tmp/etc/samba4
63
64 binary-arch: build install
65         dh_testdir -a
66         dh_testroot -a
67         dh_install -a --sourcedir=debian/tmp
68         dh_installdocs -a
69         dh_installman -a
70         dh_strip -a
71         dh_python -a
72         dh_compress -a
73         dh_fixperms -a
74         dh_makeshlibs -a
75         dh_installdeb -a
76         dh_shlibdeps -a
77         dh_gencontrol -a
78         dh_md5sums -a
79         dh_builddeb -a
80
81 binary: binary-indep binary-arch
82
83 .PHONY: binary binary-arch binary-indep clean