#!/usr/bin/make -f
-# By Jelmer Vernooij
+# By Jelmer Vernooij <jelmer@samba.org>
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
-
SOURCEPATH=../source
-DOCSPATH=../docs
package=samba4
configure:
- $(checkdir)
+ dh_testdir
cd $(SOURCEPATH) && ./autogen.sh
cd $(SOURCEPATH) && ./configure --with-fhs \
--prefix=/usr \
+ --mandir=/usr/share/man \
--enable-shared \
--enable-static \
--sysconfdir=/etc \
--with-syslog \
--with-readline \
--with-ldap
- cd $(DOCSPATH) && autoreconf
- cd $(DOCSPATH) && ./configure
- touch configure
+ cd $(SOURCEPATH)/build/pidl && perl Makefile.PL PREFIX=/usr
+ touch $@
build: configure
- $(checkdir)
- cd $(SOURCEPATH) && $(MAKE) proto all
- cd $(DOCSPATH) && $(MAKE) htmlman manpages
- touch build
+ dh_testdir
+ $(MAKE) -C $(SOURCEPATH) proto
+ -$(MAKE) -C $(SOURCEPATH) pch
+ $(MAKE) -C $(SOURCEPATH) all
+ $(MAKE) -C $(SOURCEPATH)/build/pidl all
+ touch $@
clean:
- $(checkdir)
- rm -f build
- -cd $(SOURCEPATH) && $(MAKE) clean
- -cd $(DOCSPATH) && $(MAKE) clean
- rm -f `find . -name "*~"`
- rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
- rm -f debian/*substvars
+ dh_testdir
+ dh_clean
+ rm -f build configure
+ -$(MAKE) -C $(SOURCEPATH) clean
-binary-indep: checkroot build
- $(checkdir)
+binary-indep: build install
+ dh_testdir -i
+ dh_testroot -i
+ dh_install -i --sourcedir=debian/tmp
+ dh_installdocs -i
+ dh_installchangelogs -i
+ dh_compress -i
+ dh_fixperms -i
+ dh_python -i
+ dh_installdeb -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
-binary-arch: checkroot build
- $(checkdir)
- rm -rf debian/tmp `find debian/* -type d ! -name CVS`
- install -d debian/tmp
- cd debian/tmp && install -d `cat ../dirs`
- cd $(SOURCEPATH) && $(MAKE) install DESTDIR=`pwd`/../packaging/debian/tmp
- mkdir -p debian/tmp/usr/share/man/man1
- mkdir -p debian/tmp/usr/share/man/man7
- cp $(DOCSPATH)/output/manpages/*.1 debian/tmp/usr/share/man/man1
- cp $(DOCSPATH)/output/manpages/*.7 debian/tmp/usr/share/man/man7
- debstd
- dpkg-gencontrol -isp -psamba4
- chown -R root:root debian/tmp
- chmod -R go=rX debian/tmp
- dpkg --build debian/tmp ..
-
-define checkdir
- test -f debian/rules
-endef
+install: build
+ dh_clean -k
+ dh_installdirs
+ $(MAKE) -C $(SOURCEPATH) install DESTDIR=$(CURDIR)/debian/tmp
+ $(MAKE) -C $(SOURCEPATH) manpages installman DESTDIR=$(CURDIR)/debian/tmp
+ mkdir -p $(CURDIR)/debian/tmp/etc/samba4
+ cp $(CURDIR)/debian/smb.conf $(CURDIR)/debian/tmp/etc/samba4
+ $(MAKE) -C $(SOURCEPATH)/build/pidl install DESTDIR=$(CURDIR)/debian/tmp
-binary: binary-indep binary-arch
+binary-arch: build install
+ dh_testdir -a
+ dh_testroot -a
+ dh_install -a --sourcedir=debian/tmp
+ dh_installchangelogs -a
+ dh_installdocs -a
+ dh_strip -a
+ dh_python -a
+ dh_compress -a
+ dh_fixperms -a
+ dh_makeshlibs -a
+ dh_installdeb -a
+ dh_shlibdeps -a
+ dh_gencontrol -a
+ dh_md5sums -a
+ dh_builddeb -a
-checkroot:
- $(checkdir)
- test root = "`whoami`"
+binary: binary-arch binary-indep
-.PHONY: binary binary-arch binary-indep clean checkroot
+.PHONY: binary binary-arch binary-indep clean