Import Debian changes 0.69.0-2
[hcoop/debian/courier-authlib.git] / debian / rules
index 8f6e259..11c2e8f 100755 (executable)
@@ -5,10 +5,9 @@
 
 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
 DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/default.mk
 
 # see FEATURE AREAS in dpkg-buildflags(1)
-#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 # see ENVIRONMENT in dpkg-buildflags(1)
 # package maintainers to append CFLAGS
@@ -16,11 +15,14 @@ include /usr/share/dpkg/default.mk
 # package maintainers to append LDFLAGS
 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
-export DPKG_GENSYMBOLS_CHECK_LEVEL=4
+# the build captures $SHELL, hard-wire to "/bin/sh"
+export CONFIG_SHELL=/bin/sh
+
+include /usr/share/dpkg/default.mk
 
 # main packaging script based on dh7 syntax
 %:
-       dh $@ --with autoreconf --with autotools-dev
+       dh $@ --with autoreconf,pkgkde_symbolshelper
 
 COMMON_CONFOPTS=--with-authdaemonvar=/run/courier/authdaemon \
                --with-pkgconfdir=/etc/courier \
@@ -28,6 +30,8 @@ COMMON_CONFOPTS=--with-authdaemonvar=/run/courier/authdaemon \
                --libexecdir=\$${prefix}/lib/courier \
                --datadir=\$${prefix}/lib/courier \
                --localstatedir=/var/lib/courier \
+               --with-mailuser=courier \
+               --with-mailgroup=courier \
                --without-socks \
                --with-authpam \
                --with-authpipe \
@@ -53,29 +57,36 @@ COMMON_CONFOPTS=--with-authdaemonvar=/run/courier/authdaemon \
                --enable-userdb \
                --enable-syslog=1 \
                --disable-root-check \
+               --with-mailuser=daemon \
+               --with-mailgroup=daemon \
+               --with-locking-method=fcntl \
 
 override_dh_auto_configure:
-       dh_auto_configure -- $(COMMON_CONFOPTS)
+       dh_auto_configure -- PS=/bin/ps $(COMMON_CONFOPTS)
 
 override_dh_install:
-       pod2man --center='Debian GNU/Linux Documentation' --release='Debian GNU/Linux '`cat /etc/debian_version` --section=8 debian/authenumerate.pod > debian/tmp/usr/share/man/man8/authenumerate.8
+       pod2man --center='Debian GNU/Linux Documentation' \
+               --release='Debian GNU/Linux '`cat /etc/debian_version` \
+               --section=8 debian/authenumerate.pod \
+               --verbose \
+               > debian/tmp/usr/share/man/man8/authenumerate.8
 
 # Change default module list
        perl -pe 's/^authmodulelist=".*?"/authmodulelist="authpam"/' debian/tmp/etc/courier/authdaemonrc.dist > debian/tmp/etc/courier/authdaemonrc
-       rm debian/tmp/etc/courier/authdaemonrc.dist
+       rm -v debian/tmp/etc/courier/authdaemonrc.dist
 
 # Change default LDAP server to localhost
        perl -pe 's/^(LDAP_SERVER\s+)ldap.example.com/$$1localhost/' debian/tmp/etc/courier/authldaprc.dist > debian/tmp/etc/courier/authldaprc
-       rm debian/tmp/etc/courier/authldaprc.dist
+       rm -v debian/tmp/etc/courier/authldaprc.dist
 
 # Change default MySQL server to localhost
        perl -pe 's/^(MYSQL_SERVER\s+)mysql.example.com/$$1localhost/;s%^(#?\s*MYSQL_SOCKET\s+)/.*%$$1/var/run/mysqld/mysqld.sock%' debian/tmp/etc/courier/authmysqlrc.dist > debian/tmp/etc/courier/authmysqlrc
-       rm debian/tmp/etc/courier/authmysqlrc.dist
+       rm -v debian/tmp/etc/courier/authmysqlrc.dist
 
 # Change default SQlite 3 path to /var/lib/courier/users.db
        perl -pe 's%^(SQLITE_DATABASE\s+)/var/users.db%$$1/var/lib/courier/users.db%' debian/tmp/etc/courier/authsqliterc.dist > debian/tmp/etc/courier/authsqliterc
-       rm debian/tmp/etc/courier/authsqliterc.dist
+       rm -v debian/tmp/etc/courier/authsqliterc.dist
 
-       mv debian/tmp/etc/courier/authpgsqlrc.dist debian/tmp/etc/courier/authpgsqlrc
+       mv -v debian/tmp/etc/courier/authpgsqlrc.dist debian/tmp/etc/courier/authpgsqlrc
 
        dh_install --fail-missing -X.la