> In that case, we'll want to put this into a separate binary package.  This is 
> on our radar to do, but if you can put together a complete patch, that will 
> get it done that much sooner.

Tested patch (builds fine):

-- debian/rules        2016-02-24 02:46:28.000000000 +0100
+++ /tmp/rules  2016-02-24 20:55:34.658229654 +0100
@@ -52,6 +52,7 @@
        -DHAS_SQLITE -DMYORIGIN_FROM_FILE \
        $(shell getconf LFS_CFLAGS) \
        -DHAS_CDB \
+       -DHAS_LMDB \
        -DHAS_MYSQL -I/usr/include/mysql \
        -DHAS_PGSQL -I`pg_config --includedir` \
        -DHAS_SQLITE -I/usr/include \
@@ -74,6 +75,7 @@
                AUXLIBS="${AUXLIBS} -L$$(pwd)/debian" OPT="$(OFLAGS)" \
                AUXLIBS_CDB="-lcdb -L../../lib -L. -lpostfix-util" \
                AUXLIBS_LDAP="-lldap -llber -L../../lib -L. -lpostfix-util 
-lpostfix-global" \
+               AUXLIBS_LMDB="-llmdb -L../../lib -L. -lpostfix-util" \
                AUXLIBS_MYSQL="-lmysqlclient -L../../lib -L. -lpostfix-util 
-lpostfix-global" \
                AUXLIBS_PCRE="-lpcre -L../../lib -L. -lpostfix-util" \
                AUXLIBS_PGSQL="-lpq -L../../lib -L. -lpostfix-util 
-lpostfix-global" \
@@ -120,6 +122,7 @@
        for i in $(libdir)/lib*.1.0.1; do ln -sf $${i##*/} $${i%.*.*}; done
        install lib/postfix-cdb.so.1.0.1 ${base}-cdb/${plibdir}
        install lib/postfix-ldap.so.1.0.1 ${base}-ldap/${plibdir}
+       install lib/postfix-lmdb.so.1.0.1 $(base)-lmdb/${plibdir}
        install lib/postfix-mysql.so.1.0.1 ${base}-mysql/${plibdir}
        install lib/postfix-pcre.so.1.0.1 ${base}-pcre/${plibdir}
        install lib/postfix-pgsql.so.1.0.1 ${base}-pgsql/${plibdir}
@@ -167,6 +170,7 @@
        install debian/update-libc.d 
${base}/etc/resolvconf/update-libc.d/postfix
        install debian/postfix-cdb.lintian-override 
${base}-cdb/usr/share/lintian/overrides/${package}-cdb
        install debian/postfix-ldap.lintian-override 
${base}-ldap/usr/share/lintian/overrides/${package}-ldap
+       install debian/postfix-lmdb.lintian-override 
${base}-lmdb/usr/share/lintian/overrides/${package}-lmdb
        install debian/postfix.lintian-override 
${base}/usr/share/lintian/overrides/${package}
        install debian/postfix-mysql.lintian-override 
${base}-mysql/usr/share/lintian/overrides/${package}-mysql
        install debian/postfix-pcre.lintian-override 
${base}-pcre/usr/share/lintian/overrides/${package}-pcre

--- debian/control      2016-02-24 02:46:28.000000000 +0100
+++ /tmp/control        2016-02-24 20:55:50.082150028 +0100
@@ -30,6 +30,15 @@
  This provides support for LDAP maps in Postfix. If you plan to use LDAP maps
  with Postfix, you need this.
 
+Package: postfix-lmdb
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, postfix (= ${binary:Version}), 
liblmdb0 (>=0.9.14)
+Description: LMDB map support for Postfix
+ ${Description}
+ .
+ This provides support for LMDB maps in Postfix. If you plan to use LMDB maps
+ with Postfix, you need this.
+
 Package: postfix-cdb
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, postfix (= ${binary:Version})

$ cat postfix-lmdb.README.debian 
The postfix-doc package contains documentation on how to configure this
map type.  See /usr/share/doc/postfix/html/LMDB_README.html

$ cat postfix-lmdb.dirs 
usr/lib/postfix
usr/share/lintian/overrides

$ cat postfix-lmdb.files 
usr/lib/postfix/postfix-lmdb.so.1.0.1

$ cat postfix-lmdb.lintian-override 
postfix-lmdb: postinst-has-useless-call-to-ldconfig
postfix-lmdb: postrm-has-useless-call-to-ldconfig

$ cat postfix-lmdb.postinst 
#! /bin/sh
# postinst script for #PACKAGE#
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <postinst> `configure' <most-recently-configured-version>
#        * <old-postinst> `abort-upgrade' <new version>
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
#          <new-version>
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
#          <failed-install-package> <version> `removing'
#          <conflicting-package> <version>
# for details, see /usr/share/doc/packaging-manual/
#
# quoting from the policy:
#     Any necessary prompting should almost always be confined to the
#     post-installation script, and should be protected with a conditional
#     so that unnecessary prompting doesn't happen if a package's
#     installation fails and the `postinst' is called with `abort-upgrade',
#     `abort-remove' or `abort-deconfigure'.

. /usr/share/postfix/postinst.functions

case "$1" in
    configure)
        version="$2"
        # deal with the old version's brain damage
        if [ "X$version" != X ] && \
           dpkg --compare-versions $version lt 2.3.3-3; then
                delmap lmdb
        fi
        addmap lmdb dict_lmdb_open
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)

    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

$ cat postfix-lmdb.prerm 
#! /bin/sh
# prerm script for #PACKAGE#
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <prerm> `remove'
#        * <old-prerm> `upgrade' <new-version>
#        * <new-prerm> `failed-upgrade' <old-version>
#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
#        * <deconfigured's-prerm> `deconfigure' `in-favour'
#          <package-being-installed> <version> `removing'
#          <conflicting-package> <version>
# for details, see /usr/share/doc/packaging-manual/

case "$1" in
    remove|upgrade|deconfigure)
#       install-info --quiet --remove /usr/info/#PACKAGE#.info.gz
        ;;
    failed-upgrade)
        ;;
    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

$ postfix-lmdb.copyright

—> To be copied from existing file

Reply via email to