232a95f2b1af942fd03f6d8bca06c60c0d0bc4d1
[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                 --mandir=/usr/share/man \
16                 --enable-shared \
17                 --enable-static \
18                 --sysconfdir=/etc \
19                 --libdir=/etc/samba4 \
20                 --with-privatedir=/etc/samba4 \
21                 --with-piddir=/var/run/samba4 \
22                 --localstatedir=/var \
23                 --with-pam \
24                 --with-syslog \
25                 --with-readline \
26                 --with-ldap 
27         touch $@
28
29 build: configure
30         dh_testdir
31         $(MAKE) -C $(SOURCEPATH) proto 
32         -$(MAKE) -C $(SOURCEPATH) pch
33         $(MAKE) -C $(SOURCEPATH) all
34         touch $@
35
36 clean:
37         dh_testdir
38         dh_clean
39         rm -f build
40         -$(MAKE) -C $(SOURCEPATH) clean
41
42 binary-indep: build install
43         dh_testdir -i
44         dh_testroot -i
45         dh_install -i --sourcedir=debian/tmp
46         dh_installdocs -i
47         dh_installman -i
48         dh_installchangelogs -i
49         dh_compress -i
50         dh_fixperms -i
51         dh_python -i
52         dh_installdeb -i
53         dh_gencontrol -i
54         dh_md5sums -i
55         dh_builddeb -i
56 # There are no architecture-independent files to be uploaded
57 # generated by this package.  If there were any they would be
58 # made here.
59
60 install: build
61         dh_clean -k
62         dh_installdirs
63         $(MAKE) -C $(SOURCEPATH) install DESTDIR=$(CURDIR)/debian/tmp
64         $(MAKE) -C $(SOURCEPATH) manpages installman DESTDIR=$(CURDIR)/debian/tmp
65         mkdir -p $(CURDIR)/debian/tmp/etc/samba4
66         cp $(CURDIR)/debian/smb.conf $(CURDIR)/debian/tmp/etc/samba4
67         cp $(CURDIR)/../source/build/pidl/pidl.pl $(CURDIR)/debian/tmp/usr/bin/pidl
68         mkdir -p $(CURDIR)/debian/tmp/usr/share/perl5/Parse/Pidl
69         cp $(CURDIR)/../source/build/pidl/*.pm $(CURDIR)/debian/tmp/usr/share/perl5/Parse/Pidl
70
71 binary-arch: build install
72         dh_testdir -a
73         dh_testroot -a
74         dh_install -a --sourcedir=debian/tmp
75         dh_installchangelogs -a
76         dh_installdocs -a
77         dh_installman -a
78         dh_strip -a
79         dh_python -a
80         dh_compress -a
81         dh_fixperms -a
82         dh_makeshlibs -a
83         dh_installdeb -a
84         dh_shlibdeps -a
85         dh_gencontrol -a
86         dh_md5sums -a
87         dh_builddeb -a
88
89 binary: binary-indep binary-arch
90
91 .PHONY: binary binary-arch binary-indep clean