r4197: Remove silly extra const.
[Samba/gebeck_regimport.git] / packaging / debian / rules
blob69749888c2e7c17b451070e0297972473cb5c2bc
1 #!/usr/bin/make -f
2 # By Jelmer Vernooij
3 # Made with the aid of debmake, by Christoph Lameter,
4 # based on the sample debian/rules file for GNU hello by Ian Jackson.
7 SOURCEPATH=../source
8 DOCSPATH=../docs
10 package=samba4
12 configure:
13 $(checkdir)
14 cd $(SOURCEPATH) && ./autogen.sh
15 cd $(SOURCEPATH) && ./configure --with-fhs \
16 --prefix=/usr \
17 --enable-shared \
18 --enable-static \
19 --sysconfdir=/etc \
20 --libdir=/etc/samba4 \
21 --with-privatedir=/etc/samba4 \
22 --with-piddir=/var/run/samba4 \
23 --localstatedir=/var \
24 --with-pam \
25 --with-syslog \
26 --with-readline \
27 --with-ldap
28 cd $(DOCSPATH) && autoreconf
29 cd $(DOCSPATH) && ./configure
30 touch configure
32 build: configure
33 $(checkdir)
34 cd $(SOURCEPATH) && $(MAKE) proto all
35 cd $(DOCSPATH) && $(MAKE) htmlman manpages
36 touch build
38 clean:
39 $(checkdir)
40 rm -f build
41 -cd $(SOURCEPATH) && $(MAKE) clean
42 -cd $(DOCSPATH) && $(MAKE) clean
43 rm -f `find . -name "*~"`
44 rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
45 rm -f debian/*substvars
47 binary-indep: checkroot build
48 $(checkdir)
49 # There are no architecture-independent files to be uploaded
50 # generated by this package. If there were any they would be
51 # made here.
53 binary-arch: checkroot build
54 $(checkdir)
55 rm -rf debian/tmp `find debian/* -type d ! -name CVS`
56 install -d debian/tmp
57 cd debian/tmp && install -d `cat ../dirs`
58 cd $(SOURCEPATH) && $(MAKE) install DESTDIR=`pwd`/../packaging/debian/tmp
59 mkdir -p debian/tmp/usr/share/man/man1
60 mkdir -p debian/tmp/usr/share/man/man7
61 cp $(DOCSPATH)/output/manpages/*.1 debian/tmp/usr/share/man/man1
62 cp $(DOCSPATH)/output/manpages/*.7 debian/tmp/usr/share/man/man7
63 cp $(SOURCEPATH)/build/pidl/pidl.pl debian/tmp/usr/bin/pidl
64 debstd
65 dpkg-gencontrol -isp -psamba4
66 chown -R root:root debian/tmp
67 chmod -R go=rX debian/tmp
68 dpkg --build debian/tmp ..
70 define checkdir
71 test -f debian/rules
72 endef
74 binary: binary-indep binary-arch
76 checkroot:
77 $(checkdir)
78 test root = "`whoami`"
80 .PHONY: binary binary-arch binary-indep clean checkroot