r954: Start working on typedef parsing.
[samba.git] / packaging / debian / rules
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.
5
6
7 SOURCEPATH=../source
8
9 package=samba4
10
11 configure:
12         $(checkdir)
13         cd $(SOURCEPATH) && ./autogen.sh
14         cd $(SOURCEPATH) && ./configure --with-fhs \
15                 --prefix=/usr \
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
28         touch configure
29
30 build: configure
31         $(checkdir)
32         cd $(SOURCEPATH) && $(MAKE) proto all
33         touch build
34
35 clean:
36         $(checkdir)
37         rm -f build
38         -cd $(SOURCEPATH) && $(MAKE) clean
39         rm -f `find . -name "*~"`
40         rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
41         rm -f debian/*substvars
42
43 binary-indep: checkroot build
44         $(checkdir)
45 # There are no architecture-independent files to be uploaded
46 # generated by this package.  If there were any they would be
47 # made here.
48
49 binary-arch: checkroot build
50         $(checkdir)
51         rm -rf debian/tmp `find debian/* -type d ! -name CVS`
52         install -d debian/tmp
53         cd debian/tmp && install -d `cat ../dirs`
54         cd $(SOURCEPATH) && $(MAKE) install DESTDIR=`pwd`/../packaging/debian/tmp
55         debstd 
56         dpkg-gencontrol -isp -psamba4
57         chown -R root:root debian/tmp
58         chmod -R go=rX debian/tmp
59         dpkg --build debian/tmp ..
60
61 define checkdir
62         test -f debian/rules
63 endef
64
65 binary: binary-indep binary-arch
66
67 checkroot:
68         $(checkdir)
69         test root = "`whoami`"
70
71 .PHONY: binary binary-arch binary-indep clean checkroot