[arch-commits] Commit in postfix/trunk (PKGBUILD)
David Runge
dvzrv at gemini.archlinux.org
Sun Feb 6 18:42:31 UTC 2022
Date: Sunday, February 6, 2022 @ 18:42:31
Author: dvzrv
Revision: 436340
upgpkg: postfix 3.7.0-1: Upgrade to 3.7.0.
Replace pcre with pcre2.
Simplify installation of files for split packages.
Modified:
postfix/trunk/PKGBUILD
----------+
PKGBUILD | 127 ++++++++++++++++++++++++++++++-------------------------------
1 file changed, 63 insertions(+), 64 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-02-06 18:12:20 UTC (rev 436339)
+++ PKGBUILD 2022-02-06 18:42:31 UTC (rev 436340)
@@ -6,7 +6,7 @@
pkgbase=postfix
pkgname=(postfix postfix-cdb postfix-ldap postfix-lmdb postfix-mysql
postfix-pcre postfix-pgsql postfix-sqlite)
-pkgver=3.6.4
+pkgver=3.7.0
pkgrel=1
pkgdesc="Fast, easy to administer, secure mail server"
arch=(x86_64)
@@ -13,8 +13,9 @@
url="http://www.postfix.org/"
license=(EPL)
depends=(glibc)
-makedepends=(db icu libldap libnsl libsasl lmdb mariadb-libs openssl pcre
+makedepends=(db icu libldap libnsl libsasl lmdb mariadb-libs openssl pcre2
postgresql-libs sqlite tinycdb zlib)
+options=(debug)
source=("https://de.postfix.org/ftpmirror/official/${pkgname}-${pkgver}.tar.gz"
"${pkgname}-${pkgver}.tar.gz.sig::https://de.postfix.org/ftpmirror/official/${pkgname}-${pkgver}.tar.gz.gpg2"
"${pkgname}-3.5.8-main_defaults.patch"
@@ -22,13 +23,13 @@
"${pkgname}.sysusers"
"${pkgname}.tmpfiles"
)
-sha512sums=('f5813801377a5887d27720cc7f85a6a68f8ca82fc7a9e852b27c8967996b3d64f651cc16e2b021d55316a074b4778e19155bb60c8f0885d4aaf72766cab7c4cd'
+sha512sums=('f2fb5c0399100c19e428b68728a8ce62b1fb74d365038373f22ed698c1d0fece506b3f1335c322b949875a4a9fa96fa0a7680b12641d596d09615e8fef061da4'
'SKIP'
'7b2785aa8120ca3ff91b405baf675e9e11f8d58b18a9b842672e7ae30932febddac10556a70823d8746fcb160bceb4dbabdee45cf46b02fc0127057656fb85c4'
'27f54747ad480d65b560c9dbc97e12c6353e4bceca0ffe3e358e31de56db0ad79928164c9f8790c73a9f791daa378253d2ee29b5a766661778553ec889b2cf97'
'a7f15970f613ae7b98ce1b84ca0a6034ce3cc7b2b9ce7160dad9731f740fb762f4a54f44acceb5f06f8744fa9e952b088086af8a69da388a600b742a3cda37f2'
'd08574a6acd595fc146513c92dc1bb341c3432d67de1e93ab73a7ce60e385dd34f3a55e3d3d7aec5f358ac4aae260f028599ac47650ebc663cea3043a760a7bc')
-b2sums=('2b410413e18cc2792bab7b75bcb8bcf36191c6abca8f2fea0ce54053f7a0be681352542ea8a3e26752a60ddc026bbc6ce84c926cc721811b43f3debc07b557cf'
+b2sums=('7388ad49862c97e20179a2d3ed26069f21e8a578790fcb8adc9f5b648202269bd4c07905931237dab905d991002bcfd9f03d11e6a85b46fcf0e3b72412d852eb'
'SKIP'
'b5f19e0619f1fb017cd889c14e341c21146b3afe7b9eefcdb7fb1eb83a357434b899d1e92f3ab0023c78ef8f2de6ae54c4599ee0f0bd04d257f4ca0a4dc9a16c'
'02dd441cf6e4a7c2bc0de876f020b0784d811f77a5c6102dd075d67b07158dbc53c8b4d62bc8035283d4f349008574b1c3fac03f4519d56ffd809cb5bcfb7bea'
@@ -36,13 +37,20 @@
'de31693cea5f452a9c8c0d1cf5210a6e67c0176f8b1a4d74106f2e803911569e9fdbb2301b3b5dc7ad6a6da285026b1a3ed3de52117d216b030cf0d92348909d')
validpgpkeys=('622C7C012254C186677469C50C0B590E80CA15A7') # Wietse Venema <wietse at porcupine.org>
+_pick() {
+ local p="$1" f d; shift
+ for f; do
+ d="$srcdir/$p/${f#$pkgdir/}"
+ mkdir -p "$(dirname "$d")"
+ mv "$f" "$d"
+ rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
+ done
+}
+
prepare() {
cd "${pkgbase}-${pkgver}"
# add distribution defaults to main.cf (alias_maps and alias_database)
patch -Np1 -i ../"${pkgbase}-3.5.8-main_defaults.patch"
-
- # create work directories for split package configuration
- mkdir -vp dynamicmaps.cf.d "${pkgbase}-files.d"
}
build() {
@@ -55,6 +63,7 @@
'-DHAS_LMDB'
'-DUSE_TLS'
'-DHAS_MYSQL' '-I/usr/include/mysql'
+ '-DHAS_PCRE=2'
'-DHAS_PGSQL' '-I/usr/include/postgresql'
'-DHAS_SQLITE'
'-DHAS_CDB'
@@ -76,7 +85,7 @@
AUXLIBS="$(pkgconf --libs openssl libsasl2) -lnsl" \
AUXLIBS_LDAP='-lldap -llber' \
AUXLIBS_LMDB="$(pkgconf --libs lmdb)" \
- AUXLIBS_PCRE="$(pkgconf --libs pcre)" \
+ AUXLIBS_PCRE="$(pcre2-config --libs32)" \
AUXLIBS_MYSQL="$(pkgconf --libs mariadb)" \
AUXLIBS_PGSQL="$(pkgconf --libs libpq)" \
AUXLIBS_SQLITE="$(pkgconf --libs sqlite3)" \
@@ -90,6 +99,11 @@
package_postfix() {
local _name _feature
+ local _dynamicmaps_file="${pkgdir}/etc/${pkgbase}/dynamicmaps.cf"
+ local _dynamicmaps_dir="${pkgdir}/etc/${pkgbase}/dynamicmaps.cf.d"
+ local _files_file="${pkgdir}/etc/${pkgbase}/${pkgbase}-files"
+ local _files_dir="${pkgdir}/etc/${pkgbase}/${pkgbase}-files.d"
+
depends+=(db libsasl openssl zlib libicuuc.so libnsl.so)
optdepends=(
'perl: for postfix-collate.pl, postfix-tlstype.pl and qshape'
@@ -130,24 +144,43 @@
# NOTE: follows setup in conf/postfix-files
install -vDm 644 "../${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
- # create dynamicmaps.cf.d/ and postfix-files.d/ entries for split packages
+ # 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
- grep "${pkgbase}-${_feature}" "${pkgdir}/etc/${pkgbase}/dynamicmaps.cf" > "dynamicmaps.cf.d/${pkgbase}-${_feature}.cf"
- sed -e "/${pkgbase}-${_feature}/d" -i "${pkgdir}/etc/${pkgbase}/dynamicmaps.cf"
- grep "${pkgbase}-${_feature}" "${pkgdir}/etc/${pkgbase}/${pkgbase}-files" > "${pkgbase}-files.d/${pkgbase}-${_feature}.cf"
- sed -e "/${pkgbase}-${_feature}/d" -i "${pkgdir}/etc/${pkgbase}/${pkgname}-files"
- grep "${_feature^^}_README:" "${pkgdir}/etc/${pkgbase}/${pkgbase}-files" >> "${pkgbase}-files.d/${pkgbase}-${_feature}.cf"
- sed -e "/${_feature^^}_README:/d" -i "${pkgdir}/etc/${pkgbase}/${pkgname}-files"
+ 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"
+ (
+ cd "$pkgdir"
+ _pick $pkgbase-$_feature etc/$pkgbase/dynamicmaps.cf.d/$pkgbase-$_feature.cf
+ )
+
+ printf "Split out %s from %s-files.d\n" $pkgbase-$_feature $pkgbase
+ grep "${pkgbase}-${_feature}" "$_files_file" > "$_files_dir/${pkgbase}-${_feature}.cf"
+ sed -e "/${pkgbase}-${_feature}/d" -i "$_files_file"
+
+ printf "Split %s from %s-files\n" ${_feature^^}_README $pkgbase
+ grep "${_feature^^}_README:" "$_files_file" >> "$_files_dir/${pkgbase}-${_feature}.cf"
+ sed -e "/${_feature^^}_README:/d" -i "$_files_file"
+
if [[ "${_feature}" != cdb ]]; then
- grep "${_feature}_table.5:" "${pkgdir}/etc/${pkgbase}/${pkgbase}-files" >> "${pkgbase}-files.d/${pkgbase}-${_feature}.cf"
- sed -e "/${_feature}_table.5:/d" -i "${pkgdir}/etc/${pkgbase}/${pkgname}-files"
- # remove files, that are part of the split packages
- rm -vf "${pkgdir}/usr/share/man/man5/${_feature}_table.5"
+ printf "Split %s from %s-files\n" ${_feature}_table.5 $pkgbase
+ grep "${_feature}_table.5:" "$_files_file" >> "$_files_dir/${pkgbase}-${_feature}.cf"
+ sed -e "/${_feature}_table.5:/d" -i "$_files_file"
+ (
+ cd "$pkgdir"
+ _pick $pkgbase-$_feature usr/share/man/man5/${_feature}_table.5
+ )
fi
- # remove files, that are part of the split packages
- rm -vf "${pkgdir}/usr/lib/${pkgbase}/${pkgbase}-${_feature}.so"
- rm -vf "${pkgdir}/usr/share/doc/${pkgbase}/${_feature^^}_README"
+ (
+ cd "$pkgdir"
+ _pick $pkgbase-$_feature etc/$pkgbase/$pkgbase-files.d/$pkgbase-$_feature.cf
+ _pick $pkgbase-$_feature usr/lib/$pkgbase/$pkgbase-$_feature.so
+ _pick $pkgbase-$_feature usr/share/doc/${pkgbase}/${_feature^^}_README
+ )
+ # install directories that are otherwise cleared by calls to _pick()
+ install -vdm 755 "$_dynamicmaps_dir"
+ install -vdm 755 "$_files_dir"
done
# remove non-reproducible file, that only lists what the build circumstances were
@@ -159,11 +192,7 @@
depends+=(postfix libcdb.so)
pkgdesc+=' (CDB integration)'
- cd "${pkgbase}-${pkgver}"
- install -vDm 755 lib/${pkgname}.so -t "${pkgdir}/usr/lib/${pkgbase}/"
- install -vDm 644 "dynamicmaps.cf.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/dynamicmaps.cf.d/"
- install -vDm 644 "${pkgbase}-files.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/${pkgbase}-files.d/"
- install -vDm 644 README_FILES/CDB_README -t "${pkgdir}/usr/share/doc/${pkgbase}/"
+ mv -v $pkgname/* "$pkgdir"
}
package_postfix-ldap() {
@@ -170,12 +199,7 @@
depends+=(postfix libldap)
pkgdesc+=' (LDAP integration)'
- cd "${pkgbase}-${pkgver}"
- install -vDm 755 lib/${pkgname}.so -t "${pkgdir}/usr/lib/${pkgbase}/"
- install -vDm 644 "dynamicmaps.cf.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/dynamicmaps.cf.d/"
- install -vDm 644 "${pkgbase}-files.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/${pkgbase}-files.d/"
- install -vDm 644 man/man5/ldap_table.5 -t "${pkgdir}/usr/share/man/man5/"
- install -vDm 644 README_FILES/LDAP_README -t "${pkgdir}/usr/share/doc/${pkgbase}/"
+ mv -v $pkgname/* "$pkgdir"
}
package_postfix-lmdb() {
@@ -182,12 +206,7 @@
depends+=(lmdb postfix)
pkgdesc+=' (LMDB integration)'
- cd "${pkgbase}-${pkgver}"
- install -vDm 755 lib/${pkgname}.so -t "${pkgdir}/usr/lib/${pkgbase}/"
- install -vDm 644 "dynamicmaps.cf.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/dynamicmaps.cf.d/"
- install -vDm 644 "${pkgbase}-files.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/${pkgbase}-files.d/"
- install -vDm 644 man/man5/lmdb_table.5 -t "${pkgdir}/usr/share/man/man5/"
- install -vDm 644 README_FILES/LMDB_README -t "${pkgdir}/usr/share/doc/${pkgbase}/"
+ mv -v $pkgname/* "$pkgdir"
}
package_postfix-mysql() {
@@ -194,24 +213,14 @@
depends+=(postfix libmariadb.so)
pkgdesc+=' (MySQL integration)'
- cd "${pkgbase}-${pkgver}"
- install -vDm 755 lib/${pkgname}.so -t "${pkgdir}/usr/lib/${pkgbase}/"
- install -vDm 644 "dynamicmaps.cf.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/dynamicmaps.cf.d/"
- install -vDm 644 "${pkgbase}-files.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/${pkgbase}-files.d/"
- install -vDm 644 man/man5/mysql_table.5 -t "${pkgdir}/usr/share/man/man5/"
- install -vDm 644 README_FILES/MYSQL_README -t "${pkgdir}/usr/share/doc/${pkgbase}/"
+ mv -v $pkgname/* "$pkgdir"
}
package_postfix-pcre() {
- depends+=(pcre postfix)
+ depends+=(pcre2 postfix)
pkgdesc+=' (PCRE integration)'
- cd "${pkgbase}-${pkgver}"
- install -vDm 755 lib/${pkgname}.so -t "${pkgdir}/usr/lib/${pkgbase}/"
- install -vDm 644 "dynamicmaps.cf.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/dynamicmaps.cf.d/"
- install -vDm 644 "${pkgbase}-files.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/${pkgbase}-files.d/"
- install -vDm 644 man/man5/pcre_table.5 -t "${pkgdir}/usr/share/man/man5/"
- install -vDm 644 README_FILES/PCRE_README -t "${pkgdir}/usr/share/doc/${pkgbase}/"
+ mv -v $pkgname/* "$pkgdir"
}
package_postfix-pgsql() {
@@ -218,12 +227,7 @@
depends+=(postfix libpq.so)
pkgdesc+=' (PostgreSQL integration)'
- cd "${pkgbase}-${pkgver}"
- install -vDm 755 lib/${pkgname}.so -t "${pkgdir}/usr/lib/${pkgbase}/"
- install -vDm 644 "dynamicmaps.cf.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/dynamicmaps.cf.d/"
- install -vDm 644 "${pkgbase}-files.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/${pkgbase}-files.d/"
- install -vDm 644 man/man5/pgsql_table.5 -t "${pkgdir}/usr/share/man/man5/"
- install -vDm 644 README_FILES/PGSQL_README -t "${pkgdir}/usr/share/doc/${pkgbase}/"
+ mv -v $pkgname/* "$pkgdir"
}
package_postfix-sqlite() {
@@ -230,10 +234,5 @@
depends+=(postfix sqlite)
pkgdesc+=' (SQLite integration)'
- cd "${pkgbase}-${pkgver}"
- install -vDm 755 lib/${pkgname}.so -t "${pkgdir}/usr/lib/${pkgbase}/"
- install -vDm 644 "dynamicmaps.cf.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/dynamicmaps.cf.d/"
- install -vDm 644 "${pkgbase}-files.d/${pkgname}.cf" -t "${pkgdir}/etc/${pkgbase}/${pkgbase}-files.d/"
- install -vDm 644 man/man5/sqlite_table.5 -t "${pkgdir}/usr/share/man/man5/"
- install -vDm 644 README_FILES/SQLITE_README -t "${pkgdir}/usr/share/doc/${pkgbase}/"
+ mv -v $pkgname/* "$pkgdir"
}
More information about the arch-commits
mailing list