r8784: Install pidl in "vendor" directories (matches debian policy)
[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         cd $(SOURCEPATH)/build/pidl && perl Makefile.PL verbose INSTALLDIRS=vendor PREFIX=/usr
28         touch $@
29
30 build: configure
31         dh_testdir
32         $(MAKE) -C $(SOURCEPATH) proto 
33         -$(MAKE) -C $(SOURCEPATH) pch
34         $(MAKE) -C $(SOURCEPATH) all
35         $(MAKE) -C $(SOURCEPATH)/build/pidl all
36         touch $@
37
38 clean:
39         dh_testdir
40         dh_clean
41         rm -f build configure
42         -$(MAKE) -C $(SOURCEPATH) clean
43
44 binary-indep: build install
45         dh_testdir -i
46         dh_testroot -i
47         dh_install -i --sourcedir=debian/tmp
48         dh_installdocs -i
49         dh_installchangelogs -i
50         dh_compress -i
51         dh_fixperms -i
52         dh_python -i
53         dh_installdeb -i
54         dh_gencontrol -i
55         dh_md5sums -i
56         dh_builddeb -i
57 # There are no architecture-independent files to be uploaded
58 # generated by this package.  If there were any they would be
59 # made here.
60
61 install: build
62         dh_clean -k
63         dh_installdirs
64         $(MAKE) -C $(SOURCEPATH) install DESTDIR=$(CURDIR)/debian/tmp
65         $(MAKE) -C $(SOURCEPATH) manpages installman DESTDIR=$(CURDIR)/debian/tmp
66         mkdir -p $(CURDIR)/debian/tmp/etc/samba4
67         cp $(CURDIR)/debian/smb.conf $(CURDIR)/debian/tmp/etc/samba4
68         $(MAKE) -C $(SOURCEPATH)/build/pidl install DESTDIR=$(CURDIR)/debian/tmp
69
70 binary-arch: build install
71         dh_testdir -a
72         dh_testroot -a
73         dh_install -a --sourcedir=debian/tmp
74         dh_installchangelogs -a
75         dh_installdocs -a
76         dh_strip -a
77         dh_python -a
78         dh_compress -a
79         dh_fixperms -a
80         dh_makeshlibs -a
81         dh_installdeb -a
82         dh_shlibdeps -a
83         dh_gencontrol -a
84         dh_md5sums -a
85         dh_builddeb -a
86
87 binary: binary-arch binary-indep 
88
89 .PHONY: binary binary-arch binary-indep clean