Skip to content
Snippets Groups Projects
Commit 2a97c327 authored by Geert Hendrickx's avatar Geert Hendrickx Committed by David Runge
Browse files

Add optional MongoDB support as postfix-mongodb, available as of Postfix 3.9.

parent 49a15aaf
No related branches found
No related tags found
1 merge request!4Add optional MongoDB support as postfix-mongodb (available as of Postfix 3.9)
......@@ -6,7 +6,7 @@
pkgbase=postfix
pkgname=(
postfix
postfix-{cdb,ldap,lmdb,mysql,pcre,pgsql,sqlite}
postfix-{cdb,ldap,lmdb,mongodb,mysql,pcre,pgsql,sqlite}
)
pkgver=3.8.6
pkgrel=1
......@@ -26,6 +26,7 @@ makedepends=(
libsasl
lmdb
mariadb-libs
mongo-c-driver
openssl
pcre2
postgresql-libs
......@@ -78,6 +79,7 @@ build() {
'-DUSE_LDAP_SASL'
'-DHAS_LMDB'
'-DUSE_TLS'
'-DHAS_MONGODB' '-I/usr/include/libmongoc-1.0' '-I/usr/include/libbson-1.0'
'-DHAS_MYSQL' '-I/usr/include/mysql'
'-DHAS_PCRE=2'
'-DHAS_PGSQL' '-I/usr/include/postgresql'
......@@ -100,6 +102,7 @@ build() {
AUXLIBS_LDAP='-lldap -llber'
AUXLIBS_LMDB="$(pkgconf --libs lmdb)"
AUXLIBS_PCRE="$(pcre2-config --libs8)"
AUXLIBS_MONGODB="$(pkgconf --libs libmongoc-1.0)"
AUXLIBS_MYSQL="$(pkgconf --libs mariadb)"
AUXLIBS_PGSQL="$(pkgconf --libs libpq)"
AUXLIBS_SQLITE="$(pkgconf --libs sqlite3)"
......@@ -133,6 +136,7 @@ package_postfix() {
'postfix-cdb: for CDB integration'
'postfix-ldap: for LDAP integration'
'postfix-lmdb: for LMDB integration'
'postfix-mongodb: for MongoDB integration'
'postfix-mysql: for MySQL integration'
'postfix-pcre: for PCRE integration'
'postfix-pgsql: for PostgreSQL integration'
......@@ -169,7 +173,7 @@ package_postfix() {
# create dynamicmaps.cf.d and postfix-files.d entries for split packages
# remove targetted files from main configuration files
for _feature in {cdb,ldap,lmdb,mysql,pcre,pgsql,sqlite}; do
for _feature in {cdb,ldap,lmdb,mongodb,mysql,pcre,pgsql,sqlite}; do
printf "Split out dynamicmaps file for %s\n" $pkgbase-$_feature
grep "$pkgbase-$_feature" "$_dynamicmaps_file" > "$_dynamicmaps_dir/$pkgbase-$_feature.cf"
sed -e "/$pkgbase-$_feature/d" -i "$_dynamicmaps_file"
......@@ -244,6 +248,17 @@ package_postfix-lmdb() {
install -vDm 644 $pkgbase-$pkgver/{LICENSE,COPYRIGHT} -t "$pkgdir/usr/share/licenses/$pkgname/"
}
package_postfix-mongodb() {
depends+=(
mongo-c-driver
postfix
)
pkgdesc+=' (MongoDB integration)'
mv -v $pkgname/* "$pkgdir"
install -vDm 644 $pkgbase-$pkgver/{LICENSE,COPYRIGHT} -t "$pkgdir/usr/share/licenses/$pkgname/"
}
package_postfix-mysql() {
depends+=(
mariadb-libs libmariadb.so
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment