r6781: -add some comments on how attributes and objectClasses are identified in DRSUAPI
[ira/wip.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         touch configure
28
29 build: configure
30         $(checkdir)
31         cd $(SOURCEPATH) && $(MAKE) proto all
32         touch build
33
34 clean:
35         $(checkdir)
36         rm -f build
37         -cd $(SOURCEPATH) && $(MAKE) clean
38         rm -f `find . -name "*~"`
39         rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
40         rm -f debian/*substvars
41
42 binary-indep: checkroot build
43         $(checkdir)
44 # There are no architecture-independent files to be uploaded
45 # generated by this package.  If there were any they would be
46 # made here.
47
48 binary-arch: checkroot build
49         $(checkdir)
50         rm -rf debian/tmp `find debian/* -type d ! -name CVS`
51         install -d debian/tmp
52         cd debian/tmp && install -d `cat ../dirs`
53         cd $(SOURCEPATH) && $(MAKE) install DESTDIR=`pwd`/../packaging/debian/tmp
54         mkdir -p debian/tmp/usr/share/man/man1 
55         mkdir -p debian/tmp/usr/share/man/man7 
56         cp $(SOURCEPATH)/build/pidl/pidl.pl debian/tmp/usr/bin/pidl
57         debstd 
58         dpkg-gencontrol -isp -psamba4
59         chown -R root:root debian/tmp
60         chmod -R go=rX debian/tmp
61         dpkg --build debian/tmp ..
62
63 define checkdir
64         test -f debian/rules
65 endef
66
67 binary: binary-indep binary-arch
68
69 checkroot:
70         $(checkdir)
71         test root = "`whoami`"
72
73 .PHONY: binary binary-arch binary-indep clean checkroot