[Pkg-samba-maint] r3904 - trunk/samba/debian
vorlon at alioth.debian.org
vorlon at alioth.debian.org
Mon Sep 26 08:18:33 UTC 2011
Author: vorlon
Date: 2011-09-26 08:18:32 +0000 (Mon, 26 Sep 2011)
New Revision: 3904
Modified:
trunk/samba/debian/changelog
trunk/samba/debian/rules
Log:
Convert debian/rules to dh(1).
Modified: trunk/samba/debian/changelog
===================================================================
--- trunk/samba/debian/changelog 2011-09-26 00:18:00 UTC (rev 3903)
+++ trunk/samba/debian/changelog 2011-09-26 08:18:32 UTC (rev 3904)
@@ -11,6 +11,7 @@
in debian/rules, the upstream install target gets it right
* Use debian/clean instead of removing left-behind files by hand in the
clean target
+ * Convert debian/rules to dh(1).
-- Steve Langasek <vorlon at debian.org> Sat, 24 Sep 2011 13:36:50 -0700
Modified: trunk/samba/debian/rules
===================================================================
--- trunk/samba/debian/rules 2011-09-26 00:18:00 UTC (rev 3903)
+++ trunk/samba/debian/rules 2011-09-26 08:18:32 UTC (rev 3904)
@@ -1,17 +1,9 @@
#!/usr/bin/make -f
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
-
# Set the host and build architectures for use with config.cache loading,
# cross-building, etc.
-DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
-export DEB_HOST_GNU_TYPE
-export DEB_BUILD_GNU_TYPE
-
CFLAGS = -g -Wall
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -22,17 +14,17 @@
DESTDIR=`pwd`/debian/tmp
+%:
+ dh $@
+
conf_args = \
--cache-file=./config.cache \
--with-fhs \
--enable-shared \
--enable-static \
- --prefix=/usr \
- --sysconfdir=/etc \
--libdir=/usr/lib/samba \
--with-privatedir=/etc/samba \
--with-piddir=/var/run/samba \
- --localstatedir=/var \
--with-rootsbindir=/sbin \
--with-pammodulesdir=/lib/security \
--with-pam \
@@ -74,55 +66,23 @@
conf_args += --without-quotas
endif
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
- conf_args += --build $(DEB_BUILD_GNU_TYPE)
-else
- conf_args += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-endif
-
-configure:
- dh_testdir
-
+override_dh_auto_configure:
if [ -f debian/config.cache ]; then \
cp -f debian/config.cache source3/config.cache; \
fi
+ CFLAGS="$(CFLAGS)" dh_auto_configure -Dsource3 -- $(conf_args)
- [ -f source3/Makefile ] || (cd source3 && CFLAGS="$(CFLAGS)" ./configure $(conf_args))
+override_dh_auto_build:
+ dh_auto_build -Dsource3 -- everything nsswitch
- touch configure-stamp
+override_dh_auto_clean:
+ dh_auto_clean -Dsource3
-build: configure build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-build-stamp:
- dh_testdir
-
- $(MAKE) -C source3 # headers
- $(MAKE) -C source3 everything
- $(MAKE) -C source3 nsswitch
-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- [ ! -f source3/Makefile ] || $(MAKE) -C source3 distclean
-
debconf-updatepo
- dh_clean
+override_dh_auto_install:
+ dh_auto_install -Dsource3
-install: DH_OPTIONS=$(DH_EXTRAS)
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- $(MAKE) -C source3 install DESTDIR=$(DESTDIR)
-
# Rename to *.samba3 for alternatives
mv $(DESTDIR)/usr/bin/smbstatus $(DESTDIR)/usr/bin/smbstatus.samba3
mv $(DESTDIR)/usr/bin/nmblookup $(DESTDIR)/usr/bin/nmblookup.samba3
@@ -148,68 +108,46 @@
mkdir -p $(DESTDIR)/etc/network/if-up.d
install -o root -g root debian/samba.if-up $(DESTDIR)/etc/network/if-up.d/samba
- dh_install
+override_dh_installpam:
dh_installpam --name=samba
-# Build architecture-independent files here.
-# Pass -i to all debhelper commands in this target to reduce clutter.
-binary-indep: DH_OPTIONS=-i
-binary-indep: build install
- dh_testdir
- dh_testroot
- dh_installdebconf
- dh_installman
+override_dh_installdocs:
dh_installdocs -A debian/README.build
+
+override_dh_installexamples:
# Ignore COPYING. Otherwise, an extra copy of the GPL licence
# in smbldap-tools example is included in samba-doc
dh_installexamples -Xsmbldap-tools-* -XCOPYING
- dh_installchangelogs -Xhistory
- dh_link
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-# Build architecture-dependent files here.
-# Pass -a to all debhelper commands in this target to reduce clutter.
-
-binary-arch: DH_OPTIONS=-a $(DH_EXTRAS)
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installdebconf
- dh_installman
- dh_installdocs -A debian/README.build
- dh_installexamples
- dh_installlogrotate
- dh_installlogcheck
- DH_OPTIONS= dh_installinit -psamba -- "defaults 20 19"
- DH_OPTIONS= dh_installinit -pwinbind
- dh_installcron
- dh_lintian
+override_dh_installchangelogs:
dh_installchangelogs -Nlibpam-smbpass -Xhistory
- DH_OPTIONS= dh_installchangelogs -plibpam-smbpass source3/pam_smbpass/CHANGELOG -Xhistory
- DH_OPTIONS= dh_strip -psamba -psmbclient -pwinbind -psamba-common-bin --dbg-package=samba-dbg
- DH_OPTIONS= dh_strip -Nsamba -Nsmbclient -Nwinbind -Nsamba-common-bin
- dh_link
- dh_compress
- dh_fixperms
+ifneq (,$(filter libpam-smbpass, $(shell dh_listpackages)))
+ dh_installchangelogs -plibpam-smbpass source3/pam_smbpass/CHANGELOG -Xhistory
+endif
+override_dh_installinit:
+ifneq (,$(filter samba, $(shell dh_listpackages)))
+ dh_installinit -psamba -- "defaults 20 19"
+endif
+ifneq (,$(filter winbind, $(shell dh_listpackages)))
+ dh_installinit -pwinbind
+endif
+
+override_dh_strip:
+ dh_strip -psamba -psmbclient -pwinbind -psamba-common-bin --dbg-package=samba-dbg
+ dh_strip -Nsamba -Nsmbclient -Nwinbind -Nsamba-common-bin
+
+override_dh_fixperms:
+ dh_fixperms
+ifneq (,$(filter samba-common, $(shell dh_listpackages)))
# Set some reasonable default perms for the samba logdir.
chmod 0750 debian/samba-common/var/log/samba/
chown root:adm debian/samba-common/var/log/samba/
+endif
+ifneq (,$(filter samba, $(shell dh_listpackages)))
chmod 1777 debian/samba/var/spool/samba/
+endif
- DH_OPTIONS= dh_makeshlibs -plibsmbclient -V'libsmbclient (>= 2:3.2.0)'
- DH_OPTIONS= dh_makeshlibs -plibwbclient0 -V'libwbclient0 (>= 2:3.5.0~pre2)'
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-
-.PHONY: build clean binary-indep binary-arch binary install configure
+override_dh_makeshlibs:
+ dh_makeshlibs -plibsmbclient -V'libsmbclient (>= 2:3.2.0)'
+ dh_makeshlibs -plibwbclient0 -V'libwbclient0 (>= 2:3.5.0~pre2)'
More information about the Pkg-samba-maint
mailing list