r12397: Change the 'samba4' prefix in the Debian packages back to 'samba'
[ira/wip.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=samba
9
10 configure: configure-stamp
11 configure-stamp:
12         dh_testdir
13         cd $(SOURCEPATH) && ./autogen.sh
14         cd $(SOURCEPATH) && ./configure --with-fhs \
15                 --prefix=/usr \
16                 --mandir=/usr/share/man \
17                 --enable-shared \
18                 --enable-static \
19                 --sysconfdir=/etc \
20                 --libdir=/etc/samba \
21                 --with-configdir=/etc/samba \
22                 --with-privatedir=/etc/samba \
23                 --with-piddir=/var/run/samba \
24                 --localstatedir=/var \
25                 --with-pam \
26                 --with-syslog \
27                 --with-readline \
28                 --with-ldap 
29         cd $(SOURCEPATH)/pidl && perl Makefile.PL verbose INSTALLDIRS=vendor PREFIX=/usr
30         touch $@
31
32 build: build-stamp
33 build-stamp: configure
34         dh_testdir
35         $(MAKE) -C $(SOURCEPATH) proto 
36         -$(MAKE) -C $(SOURCEPATH) pch
37         $(MAKE) -C $(SOURCEPATH) all
38         $(MAKE) -C $(SOURCEPATH)/pidl all
39         touch $@
40
41 clean:
42         dh_testdir
43         dh_testroot
44         dh_clean
45         $(RM) debian/tmp
46         -$(MAKE) -C $(SOURCEPATH) clean
47         $(RM) build-stamp configure-stamp
48
49 binary-indep: build install
50         dh_testdir
51         dh_testroot
52         dh_install -i --sourcedir=debian/tmp
53         dh_installdocs -i
54         dh_installchangelogs -i
55         dh_compress -i
56         dh_fixperms -i
57         dh_installdeb -i
58         dh_gencontrol -i
59         dh_md5sums -i
60         dh_builddeb -i
61 # There are no architecture-independent files to be uploaded
62 # generated by this package.  If there were any they would be
63 # made here.
64
65 install: build
66         dh_clean -k
67         dh_installdirs
68         mkdir -p $(CURDIR)/debian/tmp/usr/share/man/man1
69         mkdir -p $(CURDIR)/debian/tmp/etc/samba
70         $(MAKE) -C $(SOURCEPATH) install DESTDIR=$(CURDIR)/debian/tmp
71         $(MAKE) -C $(SOURCEPATH) manpages installman DESTDIR=$(CURDIR)/debian/tmp
72         cp $(SOURCEPATH)/setup/provision $(CURDIR)/debian/tmp/usr/lib/samba/setup
73         $(MAKE) -C $(SOURCEPATH)/pidl install DESTDIR=$(CURDIR)/debian/tmp
74
75 binary-arch: build install
76         dh_testdir
77         dh_testroot
78         dh_install -a --sourcedir=debian/tmp
79         dh_installdocs -a
80         dh_installchangelogs -a
81         dh_strip -a
82         dh_perl -a
83         dh_compress -a
84         dh_fixperms -a
85         dh_makeshlibs -a
86         dh_installinit -a --name=samba
87         dh_installdebconf -a
88         dh_installdeb -a
89         dh_shlibdeps -a
90         dh_gencontrol -a
91         dh_md5sums -a
92         dh_builddeb -a
93
94 binary: binary-arch binary-indep 
95
96 .PHONY: configure build install binary binary-arch binary-indep clean