Commit | Line | Data |
---|---|---|
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/* |
7 | DPKG_EXPORT_BUILDFLAGS = 1 | |
8 | include /usr/share/dpkg/default.mk | |
426e7833 | 9 | |
1420868b OS |
10 | # see FEATURE AREAS in dpkg-buildflags(1) |
11 | #export DEB_BUILD_MAINT_OPTIONS = hardening=+all | |
426e7833 | 12 | |
1420868b OS |
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 | |
426e7833 | 18 | |
1420868b | 19 | export DPKG_GENSYMBOLS_CHECK_LEVEL=4 |
01037b08 | 20 | |
1420868b OS |
21 | # main packaging script based on dh7 syntax |
22 | %: | |
23 | dh $@ --with autoreconf --with autotools-dev | |
426e7833 | 24 | |
1420868b | 25 | COMMON_CONFOPTS=--with-authdaemonvar=/run/courier/authdaemon \ |
426e7833 | 26 | --with-pkgconfdir=/etc/courier \ |
1420868b | 27 | --libdir=\$${prefix}/lib \ |
426e7833 | 28 | --libexecdir=\$${prefix}/lib/courier \ |
29 | --datadir=\$${prefix}/lib/courier \ | |
30 | --localstatedir=/var/lib/courier \ | |
426e7833 | 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 \ | |
426e7833 | 44 | --with-authldap \ |
45 | --with-authldaprc=/etc/courier/authldaprc \ | |
1420868b OS |
46 | --with-authsqlite="" \ |
47 | --with-authsqliterc=/etc/courier/authsqliterc \ | |
426e7833 | 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 \ | |
1420868b | 55 | --disable-root-check \ |
426e7833 | 56 | |
1420868b OS |
57 | override_dh_auto_configure: |
58 | dh_auto_configure -- $(COMMON_CONFOPTS) | |
426e7833 | 59 | |
1420868b OS |
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 | |
426e7833 | 62 | |
1420868b OS |
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 | |
426e7833 | 66 | |
1420868b OS |
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 | |
426e7833 | 70 | |
1420868b OS |
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 | |
940be80e | 74 | |
1420868b OS |
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 | |
426e7833 | 78 | |
1420868b | 79 | mv debian/tmp/etc/courier/authpgsqlrc.dist debian/tmp/etc/courier/authpgsqlrc |
426e7833 | 80 | |
1420868b | 81 | dh_install --fail-missing -X.la |