Import Debian changes 0.69.0-2
[hcoop/debian/courier-authlib.git] / debian / rules
1 #!/usr/bin/make -f
2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
4 #DH_VERBOSE = 1
5
6 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
7 DPKG_EXPORT_BUILDFLAGS = 1
8
9 # see FEATURE AREAS in dpkg-buildflags(1)
10 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
11
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
17
18 # the build captures $SHELL, hard-wire to "/bin/sh"
19 export CONFIG_SHELL=/bin/sh
20
21 include /usr/share/dpkg/default.mk
22
23 # main packaging script based on dh7 syntax
24 %:
25 dh $@ --with autoreconf,pkgkde_symbolshelper
26
27 COMMON_CONFOPTS=--with-authdaemonvar=/run/courier/authdaemon \
28 --with-pkgconfdir=/etc/courier \
29 --libdir=\$${prefix}/lib \
30 --libexecdir=\$${prefix}/lib/courier \
31 --datadir=\$${prefix}/lib/courier \
32 --localstatedir=/var/lib/courier \
33 --with-mailuser=courier \
34 --with-mailgroup=courier \
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 \
48 --with-authldap \
49 --with-authldaprc=/etc/courier/authldaprc \
50 --with-authsqlite="" \
51 --with-authsqliterc=/etc/courier/authsqliterc \
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 \
59 --disable-root-check \
60 --with-mailuser=daemon \
61 --with-mailgroup=daemon \
62 --with-locking-method=fcntl \
63
64 override_dh_auto_configure:
65 dh_auto_configure -- PS=/bin/ps $(COMMON_CONFOPTS)
66
67 override_dh_install:
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
73
74 # Change default module list
75 perl -pe 's/^authmodulelist=".*?"/authmodulelist="authpam"/' debian/tmp/etc/courier/authdaemonrc.dist > debian/tmp/etc/courier/authdaemonrc
76 rm -v debian/tmp/etc/courier/authdaemonrc.dist
77
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
80 rm -v debian/tmp/etc/courier/authldaprc.dist
81
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
84 rm -v debian/tmp/etc/courier/authmysqlrc.dist
85
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
88 rm -v debian/tmp/etc/courier/authsqliterc.dist
89
90 mv -v debian/tmp/etc/courier/authpgsqlrc.dist debian/tmp/etc/courier/authpgsqlrc
91
92 dh_install --fail-missing -X.la