Merge branch 'debian'
[hcoop/debian/courier-authlib.git] / debian / rules
CommitLineData
426e7833 1#!/usr/bin/make -f
1420868b
OS
2# See debhelper(7) (uncomment to enable)
3# output every command that modifies files on the build system.
4#DH_VERBOSE = 1
426e7833 5
1420868b
OS
6# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
7DPKG_EXPORT_BUILDFLAGS = 1
426e7833 8
1420868b 9# see FEATURE AREAS in dpkg-buildflags(1)
463a5c94 10export DEB_BUILD_MAINT_OPTIONS = hardening=+all
426e7833 11
1420868b
OS
12# see ENVIRONMENT in dpkg-buildflags(1)
13# package maintainers to append CFLAGS
14#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
15# package maintainers to append LDFLAGS
16#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
426e7833 17
463a5c94
MW
18# the build captures $SHELL, hard-wire to "/bin/sh"
19export CONFIG_SHELL=/bin/sh
20
21include /usr/share/dpkg/default.mk
01037b08 22
1420868b
OS
23# main packaging script based on dh7 syntax
24%:
463a5c94 25 dh $@ --with autoreconf,pkgkde_symbolshelper
426e7833 26
1420868b 27COMMON_CONFOPTS=--with-authdaemonvar=/run/courier/authdaemon \
426e7833 28 --with-pkgconfdir=/etc/courier \
1420868b 29 --libdir=\$${prefix}/lib \
426e7833 30 --libexecdir=\$${prefix}/lib/courier \
31 --datadir=\$${prefix}/lib/courier \
32 --localstatedir=/var/lib/courier \
463a5c94
MW
33 --with-mailuser=courier \
34 --with-mailgroup=courier \
426e7833 35 --without-socks \
36 --with-authpam \
37 --with-authpipe \
38 --without-authpwd \
39 --with-authmysql \
40 --with-mysql-includes=/usr/include/mysql \
41 --with-mysql-libs=/usr/lib \
42 --with-authmysqlrc=/etc/courier/authmysqlrc \
43 --with-authpgsql \
44 --with-pgsql-includes=`pg_config --includedir` \
45 --with-pgsql-libs=/usr/lib \
46 --with-authpgsqlrc=/etc/courier/authpgsqlrc \
47 --without-authshadow \
426e7833 48 --with-authldap \
49 --with-authldaprc=/etc/courier/authldaprc \
1420868b
OS
50 --with-authsqlite="" \
51 --with-authsqliterc=/etc/courier/authsqliterc \
426e7833 52 --with-authcram \
53 --with-db=gdbm \
54 --without-fcgi \
55 --with-htmllibdir=/usr/share/sqwebmail \
56 --with-ispell=/usr/bin/ispell \
57 --enable-userdb \
58 --enable-syslog=1 \
1420868b 59 --disable-root-check \
463a5c94
MW
60 --with-mailuser=daemon \
61 --with-mailgroup=daemon \
62 --with-locking-method=fcntl \
426e7833 63
1420868b 64override_dh_auto_configure:
463a5c94 65 dh_auto_configure -- PS=/bin/ps $(COMMON_CONFOPTS)
426e7833 66
1420868b 67override_dh_install:
463a5c94
MW
68 pod2man --center='Debian GNU/Linux Documentation' \
69 --release='Debian GNU/Linux '`cat /etc/debian_version` \
70 --section=8 debian/authenumerate.pod \
71 --verbose \
72 > debian/tmp/usr/share/man/man8/authenumerate.8
426e7833 73
1420868b
OS
74# Change default module list
75 perl -pe 's/^authmodulelist=".*?"/authmodulelist="authpam"/' debian/tmp/etc/courier/authdaemonrc.dist > debian/tmp/etc/courier/authdaemonrc
463a5c94 76 rm -v debian/tmp/etc/courier/authdaemonrc.dist
426e7833 77
1420868b
OS
78# Change default LDAP server to localhost
79 perl -pe 's/^(LDAP_SERVER\s+)ldap.example.com/$$1localhost/' debian/tmp/etc/courier/authldaprc.dist > debian/tmp/etc/courier/authldaprc
463a5c94 80 rm -v debian/tmp/etc/courier/authldaprc.dist
426e7833 81
1420868b
OS
82# Change default MySQL server to localhost
83 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
463a5c94 84 rm -v debian/tmp/etc/courier/authmysqlrc.dist
940be80e 85
1420868b
OS
86# Change default SQlite 3 path to /var/lib/courier/users.db
87 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
463a5c94 88 rm -v debian/tmp/etc/courier/authsqliterc.dist
426e7833 89
463a5c94 90 mv -v debian/tmp/etc/courier/authpgsqlrc.dist debian/tmp/etc/courier/authpgsqlrc
426e7833 91
1420868b 92 dh_install --fail-missing -X.la