Import Debian changes 0.66.4-9
[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 include /usr/share/dpkg/default.mk
9
10 # see FEATURE AREAS in dpkg-buildflags(1)
11 #export DEB_BUILD_MAINT_OPTIONS = hardening=+all
12
13 # see ENVIRONMENT in dpkg-buildflags(1)
14 # package maintainers to append CFLAGS
15 #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
16 # package maintainers to append LDFLAGS
17 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
18
19 export DPKG_GENSYMBOLS_CHECK_LEVEL=4
20
21 # main packaging script based on dh7 syntax
22 %:
23 dh $@ --with autoreconf --with autotools-dev
24
25 COMMON_CONFOPTS=--with-authdaemonvar=/run/courier/authdaemon \
26 --with-pkgconfdir=/etc/courier \
27 --libdir=\$${prefix}/lib \
28 --libexecdir=\$${prefix}/lib/courier \
29 --datadir=\$${prefix}/lib/courier \
30 --localstatedir=/var/lib/courier \
31 --without-socks \
32 --with-authpam \
33 --with-authpipe \
34 --without-authpwd \
35 --with-authmysql \
36 --with-mysql-includes=/usr/include/mysql \
37 --with-mysql-libs=/usr/lib \
38 --with-authmysqlrc=/etc/courier/authmysqlrc \
39 --with-authpgsql \
40 --with-pgsql-includes=`pg_config --includedir` \
41 --with-pgsql-libs=/usr/lib \
42 --with-authpgsqlrc=/etc/courier/authpgsqlrc \
43 --without-authshadow \
44 --with-authldap \
45 --with-authldaprc=/etc/courier/authldaprc \
46 --with-authsqlite="" \
47 --with-authsqliterc=/etc/courier/authsqliterc \
48 --with-authcram \
49 --with-db=gdbm \
50 --without-fcgi \
51 --with-htmllibdir=/usr/share/sqwebmail \
52 --with-ispell=/usr/bin/ispell \
53 --enable-userdb \
54 --enable-syslog=1 \
55 --disable-root-check \
56
57 override_dh_auto_configure:
58 dh_auto_configure -- $(COMMON_CONFOPTS)
59
60 override_dh_install:
61 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
62
63 # Change default module list
64 perl -pe 's/^authmodulelist=".*?"/authmodulelist="authpam"/' debian/tmp/etc/courier/authdaemonrc.dist > debian/tmp/etc/courier/authdaemonrc
65 rm debian/tmp/etc/courier/authdaemonrc.dist
66
67 # Change default LDAP server to localhost
68 perl -pe 's/^(LDAP_SERVER\s+)ldap.example.com/$$1localhost/' debian/tmp/etc/courier/authldaprc.dist > debian/tmp/etc/courier/authldaprc
69 rm debian/tmp/etc/courier/authldaprc.dist
70
71 # Change default MySQL server to localhost
72 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
73 rm debian/tmp/etc/courier/authmysqlrc.dist
74
75 # Change default SQlite 3 path to /var/lib/courier/users.db
76 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
77 rm debian/tmp/etc/courier/authsqliterc.dist
78
79 mv debian/tmp/etc/courier/authpgsqlrc.dist debian/tmp/etc/courier/authpgsqlrc
80
81 dh_install --fail-missing -X.la