addedd postfix memcached libcanberra

This commit is contained in:
joborun linux 2022-06-25 14:08:45 +03:00
parent d44c62b3a7
commit 1c9e9846ec
27 changed files with 881 additions and 0 deletions

View File

@ -0,0 +1,13 @@
#!/bin/sh
case "${DESKTOP_SESSION-}" in
gnome*) # Done by gnome-settings-daemon
;;
*)
# Extra check in case DESKTOP_SESSION is not set correctly
if [ -z "${GNOME_DESKTOP_SESSION_ID-}" ]; then
GTK_MODULES="${GTK_MODULES:+$GTK_MODULES:}canberra-gtk-module"
export GTK_MODULES
fi
;;
esac

88
libcanberra/PKGBUILD Normal file
View File

@ -0,0 +1,88 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=libcanberra
pkgver=0.30.r2.gc0620e4
_pkgver=0.30
pkgrel=01
epoch=1
pkgdesc="A small and lightweight implementation of the XDG Sound Theme Specification w/o systemd"
url="http://0pointer.de/lennart/projects/libcanberra"
arch=(x86_64)
depends=(libvorbis libltdl alsa-lib libpulse tdb)
makedepends=(gtk-doc libpulse gstreamer gtk2 gtk3 git)
# options=(!emptydirs libtool debug) ### uncomment this to produce the debug pkg
options=(!emptydirs libtool)
_commit=c0620e432650e81062c1967cc669829dbd29b310 # master
source=("$pkgname::git://git.0pointer.de/libcanberra.git"
# libcanberra.xinit
# 40-libcanberra-gtk-module.sh
libcanberra-multi-backend.patch)
pkgver() {
cd $pkgname
git describe --tags --long | sed -r 's,^[^0-9]*,,;s,([^-]*-g),r\1,;s,[-_],.,g'
}
prepare() {
cd $pkgname
# https://bugs.archlinux.org/task/71341
# https://bugs.freedesktop.org/show_bug.cgi?id=51662
git apply -3 ../libcanberra-multi-backend.patch
./autogen.sh
}
build() {
cd $pkgname
./configure \
--sysconfdir=/etc \
--prefix=/usr \
--localstatedir=/var \
--disable-static \
--with-builtin=dso \
--enable-null \
--disable-oss \
--enable-alsa \
--enable-gstreamer \
--enable-pulse \
--with-systemdsystemunitdir=no \
--enable-gtk-doc
# Fight unused direct deps
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool
make
}
package_libcanberra() {
install=libcanberra.install
optdepends=("$pkgname-pulse: PulseAudio driver"
"$pkgname-gstreamer: GStreamer driver")
provides=($pkgname{,-gtk,-gtk3}.so)
conflicts=("$pkgname-git")
cd $pkgname
make -j1 DESTDIR="$pkgdir" install
rm "$pkgdir"/usr/lib/*.la
rm "$pkgdir"/usr/lib/gtk-{2,3}.0/modules/*.la
# FS#52370: Remove login, logout and system-ready sounds.
# We have no sound themes that include these so do not play them.
rm -r "$pkgdir"/usr/share/{gnome,gdm}
}
#---- license gpg-key sha256sums ----
license=(LGPL)
sha256sums=(SKIP
de146cae3e40a16b38c8edb4f1a3a423c64eb9c5000e36c316b677e9909c9b06) # libcanberra-multi-backend.patch

65
libcanberra/PKGBUILD-arch Normal file
View File

@ -0,0 +1,65 @@
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=libcanberra
pkgver=0.30+r2+gc0620e4
pkgrel=1
epoch=1
pkgdesc="A small and lightweight implementation of the XDG Sound Theme Specification"
url="http://0pointer.de/lennart/projects/libcanberra"
arch=(x86_64)
license=(LGPL)
depends=(libvorbis libltdl alsa-lib libpulse tdb sound-theme-freedesktop)
makedepends=(gtk-doc gtk2 gtk3 git)
provides=(libcanberra-pulse libcanberra{,-gtk,-gtk3}.so)
replaces=("libcanberra-pulse<0.30+2+gc0620e4-4")
options=(libtool debug)
_commit=c0620e432650e81062c1967cc669829dbd29b310 # master
source=("git+http://git.0pointer.net/clone/libcanberra.git#commit=$_commit"
40-libcanberra-gtk-module.sh
libcanberra-multi-backend.patch)
sha256sums=('SKIP'
'a0d0b135d3fea5c703a5f84208b79d66f671b082ae85f67b629ee2568a7ddc30'
'de146cae3e40a16b38c8edb4f1a3a423c64eb9c5000e36c316b677e9909c9b06')
pkgver() {
cd libcanberra
git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
}
prepare() {
cd libcanberra
# https://bugs.archlinux.org/task/71341
# https://bugs.freedesktop.org/show_bug.cgi?id=51662
git apply -3 ../libcanberra-multi-backend.patch
./autogen.sh
}
build() {
cd libcanberra
./configure --sysconfdir=/etc --prefix=/usr --localstatedir=/var \
--disable-static --with-builtin=dso --enable-null --disable-oss \
--enable-alsa --enable-pulse \
--with-systemdsystemunitdir=/usr/lib/systemd/system --enable-gtk-doc
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
package_libcanberra() {
cd libcanberra
make -j1 DESTDIR="$pkgdir" install
rm "$pkgdir"/usr/lib/*.la
rm "$pkgdir"/usr/lib/gtk-{2,3}.0/modules/*.la
# FS#52370: Remove login, logout and system-ready sounds.
# We have no sound themes that include these so do not play them.
rm -r "$pkgdir"/usr/share/{gnome,gdm}
install -Dt "$pkgdir/etc/X11/xinit/xinitrc.d" ../40-libcanberra-gtk-module.sh
}
# vim:set sw=2 et:

0
libcanberra/PKGBUILD-aur Normal file
View File

1
libcanberra/clean Normal file
View File

@ -0,0 +1 @@
rm -rf {src,pkg,libcanberra}

11
libcanberra/deps Normal file
View File

@ -0,0 +1,11 @@
git
autoconf
automake
libvorbis
alsa-lib
libpulse
tdb
gtk-doc
gstreamer
gtk2
gtk3

View File

@ -0,0 +1,26 @@
Index: libcanberra-0.29/src/driver-order.c
===================================================================
--- libcanberra-0.29.orig/src/driver-order.c
+++ libcanberra-0.29/src/driver-order.c
@@ -30,6 +30,7 @@
#include "driver-order.h"
const char* const ca_driver_order[] = {
+ "multi",
#ifdef HAVE_PULSE
"pulse",
#endif
Index: libcanberra-0.29/src/multi.c
===================================================================
--- libcanberra-0.29.orig/src/multi.c
+++ libcanberra-0.29/src/multi.c
@@ -107,8 +107,7 @@ int driver_open(ca_context *c) {
int ret = CA_SUCCESS;
ca_return_val_if_fail(c, CA_ERROR_INVALID);
- ca_return_val_if_fail(c->driver, CA_ERROR_NODRIVER);
- ca_return_val_if_fail(!strncmp(c->driver, "multi", 5), CA_ERROR_NODRIVER);
+ ca_return_val_if_fail(!c->driver || strncmp(c->driver, "multi", 5) == 0, CA_ERROR_NODRIVER);
ca_return_val_if_fail(!PRIVATE(c), CA_ERROR_STATE);
if (!(c->private = p = ca_new0(struct private, 1)))

View File

@ -0,0 +1,5 @@
pre_upgrade() {
if [ -f usr/share/gconf/schemas/libcanberra.schemas ] && [ -x usr/sbin/gconfpkg ]; then
usr/sbin/gconfpkg --uninstall libcanberra
fi
}

View File

@ -0,0 +1,17 @@
#!/bin/bash
case "${DESKTOP_SESSION-}" in
gnome) # Done by gnome-settings-daemon
;;
*)
# Extra check in case DESKTOP_SESSION is not set correctly
if [[ -z ${GNOME_DESKTOP_SESSION_ID-} ]]; then
if [[ -z ${GTK_MODULES-} ]]; then
GTK_MODULES="canberra-gtk-module"
else
GTK_MODULES="$GTK_MODULES:canberra-gtk-module"
fi
export GTK_MODULES
fi
;;
esac

5
libcanberra/time Normal file
View File

@ -0,0 +1,5 @@
real 0m30.200s
user 0m24.743s
sys 0m2.819s

55
memcached/PKGBUILD Normal file
View File

@ -0,0 +1,55 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=memcached
pkgver=1.6.15
pkgrel=01
pkgdesc='Distributed memory object caching system w/o systemd'
url='https://memcached.org/'
arch=('x86_64')
depends=('glibc' 'libevent' 'libseccomp' 'libseccomp.so')
optdepends=('perl: for memcached-tool usage')
source=(https://www.memcached.org/files/${pkgname}-${pkgver}.tar.gz
memcached.sysusers
memcached.tmpfiles)
build() {
cd ${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--enable-seccomp
make
}
#check() {
# cd ${pkgname}-${pkgver}
# make test
#}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
install -Dm 755 scripts/memcached-tool -t "${pkgdir}/usr/bin"
install -Dm 644 scripts/memcached-tool.1 -t "${pkgdir}/usr/share/man/man1"
install -Dm 644 ../memcached.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/memcached.conf"
install -Dm 644 ../memcached.sysusers "${pkgdir}/usr/lib/sysusers.d/memcached.conf"
}
#---- license gpg-key sha256sums ----
license=('GPL')
sha512sums=('00ee15eb7932420a25f3ce973bc7fcc5ba77a514091883f8b4e58ea861073caa91c676c0020f03c768077e20c76f34bca96616be104af3fbc8e7e78303958f3d'
'e6ddcab9a6fee024072b6363ef60aa176ed258369bf3a17d475f19b1f410ffd6195b9c5737dc5b1371e8974b44bdbdaa109927acaeb54fb40302a5d67d7c13a8'
'960705ff74d25afed477e0b2a5872a3a4fb49ed3105a351f0d0224abc947778f9dbda81e80be94ab636da4a8411a9dd56a8fd4513e5b86a3096a14fa67f1548b')
sha256sums=(8d7abe3d649378edbba16f42ef1d66ca3f2ac075f2eb97145ce164388e6ed515 # memcached-1.6.15.tar.gz
228c4f536f3c9f9eee4e11226ec8846a22d4ba46c2d3bf2811413efcc322609a # memcached.sysusers
c4d0ae2218b99a276ff6e0084ae81e66add0ca9347e4bde70e9172db6e44002a) # memcached.tmpfiles

54
memcached/PKGBUILD-arch Normal file
View File

@ -0,0 +1,54 @@
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Dan McGee <dan@archlinux.org>
# Contributor: Michael Irwin <6d6469@gmail.com>
pkgname=memcached
pkgver=1.6.15
pkgrel=1
pkgdesc='Distributed memory object caching system'
url='https://memcached.org/'
arch=('x86_64')
license=('GPL')
depends=('glibc' 'libevent' 'libseccomp' 'libseccomp.so')
optdepends=('perl: for memcached-tool usage')
source=(https://www.memcached.org/files/${pkgname}-${pkgver}.tar.gz
memcached.service.patch
memcached.tmpfiles
memcached.sysusers)
sha512sums=('00ee15eb7932420a25f3ce973bc7fcc5ba77a514091883f8b4e58ea861073caa91c676c0020f03c768077e20c76f34bca96616be104af3fbc8e7e78303958f3d'
'dd21f49062054c601469f9abc9ee39a0f06c604e8805e7bc9bf2cfa65429962f93e7ac67764257c578fc15b1e75394956f350162c99b084c76a6e14d9331f31f'
'960705ff74d25afed477e0b2a5872a3a4fb49ed3105a351f0d0224abc947778f9dbda81e80be94ab636da4a8411a9dd56a8fd4513e5b86a3096a14fa67f1548b'
'e6ddcab9a6fee024072b6363ef60aa176ed258369bf3a17d475f19b1f410ffd6195b9c5737dc5b1371e8974b44bdbdaa109927acaeb54fb40302a5d67d7c13a8')
prepare() {
cd ${pkgname}-${pkgver}
patch -Np1 < ../memcached.service.patch
sed -e 's/^##safer##//g' -i scripts/*.service
}
build() {
cd ${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--enable-seccomp
make
}
check() {
cd ${pkgname}-${pkgver}
make test
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
install -Dm 755 scripts/memcached-tool -t "${pkgdir}/usr/bin"
install -Dm 644 scripts/memcached-tool.1 -t "${pkgdir}/usr/share/man/man1"
install -Dm 644 scripts/*.service -t "${pkgdir}/usr/lib/systemd/system"
install -Dm 644 ../memcached.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/memcached.conf"
install -Dm 644 ../memcached.sysusers "${pkgdir}/usr/lib/sysusers.d/memcached.conf"
}
# vim: ts=2 sw=2 et:

1
memcached/clean Normal file
View File

@ -0,0 +1 @@
rm -rf {src,pkg,memcached*tar.gz}

1
memcached/deps Normal file
View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@
u memcached - - -

View File

@ -0,0 +1 @@
d /run/memcached 0775 memcached memcached -

5
memcached/time Normal file
View File

@ -0,0 +1,5 @@
without check
real 1m4.355s
user 1m4.034s
sys 1m0.752s

236
postfix/PKGBUILD Normal file
View File

@ -0,0 +1,236 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=postfix
pkgname=(postfix postfix-cdb postfix-ldap postfix-lmdb postfix-mysql
postfix-pcre postfix-pgsql postfix-sqlite)
pkgver=3.7.2
pkgrel=01
pkgdesc="Fast, easy to administer, secure mail server w/o systemd"
arch=(x86_64)
url="http://www.postfix.org/"
depends=(glibc)
makedepends=(db icu libldap libnsl libsasl lmdb mariadb-libs openssl pcre2 postgresql-libs sqlite tinycdb zlib)
#options=(debug) ### uncomment this to have the debug pkg produced
source=(
https://de.postfix.org/ftpmirror/official/$pkgbase-$pkgver.tar.gz
$pkgbase-$pkgver.tar.gz.sig::https://de.postfix.org/ftpmirror/official/$pkgbase-$pkgver.tar.gz.gpg2
$pkgbase-3.5.8-main_defaults.patch
$pkgbase.install
$pkgbase.sysusers
$pkgbase.tmpfiles
)
_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() {
# add distribution defaults to main.cf (alias_maps and alias_database)
patch -Np1 -d $pkgbase-$pkgver -i ../$pkgbase-3.5.8-main_defaults.patch
}
build() {
local _ccargs=(
'-fPIC' '-fcommon'
'-DUSE_SASL_AUTH'
'-DUSE_CYRUS_SASL' '-I/usr/include/sasl'
'-DHAS_LDAP'
'-DUSE_LDAP_SASL'
'-DHAS_LMDB'
'-DUSE_TLS'
'-DHAS_MYSQL' '-I/usr/include/mysql'
'-DHAS_PCRE=2'
'-DHAS_PGSQL' '-I/usr/include/postgresql'
'-DHAS_SQLITE'
'-DHAS_CDB'
'-DDEF_COMMAND_DIR=\"/usr/bin\"'
'-DDEF_DAEMON_DIR=\"/usr/lib/postfix/bin\"'
'-DDEF_SENDMAIL_PATH=\"/usr/bin/sendmail\"'
'-DDEF_README_DIR=\"/usr/share/doc/postfix\"'
'-DDEF_MANPAGE_DIR=\"/usr/share/man\"'
)
# NOTE: descriptions of variables in makedefs
make makefiles \
DEBUG='' \
pie=yes \
shared=yes \
dynamicmaps=yes \
CCARGS="${_ccargs[*]}" \
AUXLIBS="$(pkgconf --libs openssl libsasl2) -lnsl" \
AUXLIBS_LDAP='-lldap -llber' \
AUXLIBS_LMDB="$(pkgconf --libs lmdb)" \
AUXLIBS_PCRE="$(pcre2-config --libs8)" \
AUXLIBS_MYSQL="$(pkgconf --libs mariadb)" \
AUXLIBS_PGSQL="$(pkgconf --libs libpq)" \
AUXLIBS_SQLITE="$(pkgconf --libs sqlite3)" \
AUXLIBS_CDB='-lcdb' \
SHLIB_RPATH="-Wl,-rpath,/usr/lib/postfix $LDFLAGS" \
OPT="$CFLAGS $CPPFLAGS $LDFLAGS" \
-C $pkgbase-$pkgver
make -C $pkgbase-$pkgver
}
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'
'postfix-cdb: for CDB integration'
'postfix-ldap: for LDAP integration'
'postfix-lmdb: for LMDB integration'
'postfix-mysql: for MySQL integration'
'postfix-pcre: for PCRE integration'
'postfix-pgsql: for PostgreSQL integration'
'postfix-sqlite: for SQLite integration'
)
conflicts=(smtp-server smtp-forwarder)
provides=(smtp-server smtp-forwarder)
backup=(etc/postfix/{access,aliases,canonical,generic,header_checks,main.cf,master.cf,relocated,transport,virtual})
install=$pkgbase.install
cd $pkgbase-$pkgver
LD_LIBRARY_PATH="lib:$LD_LIBRARY_PATH" \
sh postfix-install -non-interactive install_root="$pkgdir"
# additional man pages and scripts
for _name in posttls-finger {smtp,qmqp}-{sink,source}; do
install -vDm 644 man/man1/$_name.1 -t "$pkgdir/usr/share/man/man1/"
install -vDm 755 bin/$_name -t "$pkgdir/usr/bin/"
done
install -vDm 644 man/man1/qshape.1 -t "$pkgdir/usr/share/man/man1/"
install -vDm 755 auxiliary/qshape/qshape.pl "$pkgdir/usr/bin/qshape"
install -vDm 755 auxiliary/collate/collate.pl "$pkgdir/usr/bin/postfix-collate.pl"
install -vDm 755 auxiliary/collate/tlstype.pl "$pkgdir/usr/bin/postfix-tlstype.pl"
install -vDm 644 auxiliary/collate/README* -t "$pkgdir/usr/share/doc/$pkgbase/collate/"
# license
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgbase/"
# sysusers.d
install -vDm 644 ../$pkgbase.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgbase.conf"
# tmpfiles.d
# NOTE: follows setup in conf/postfix-files
install -vDm 644 ../$pkgbase.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgbase.conf"
# 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
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
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
(
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
rm -v "$pkgdir/etc/$pkgbase/makedefs.out"
sed -e '/makedefs/d' -i "$pkgdir/etc/$pkgbase/$pkgbase-files"
}
package_postfix-cdb() {
depends+=(postfix libcdb.so)
pkgdesc+=' (CDB integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-ldap() {
depends+=(postfix libldap)
pkgdesc+=' (LDAP integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-lmdb() {
depends+=(lmdb postfix)
pkgdesc+=' (LMDB integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-mysql() {
depends+=(postfix libmariadb.so)
pkgdesc+=' (MySQL integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-pcre() {
depends+=(pcre2 postfix)
pkgdesc+=' (PCRE integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-pgsql() {
depends+=(postfix libpq.so)
pkgdesc+=' (PostgreSQL integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-sqlite() {
depends+=(postfix sqlite)
pkgdesc+=' (SQLite integration)'
mv -v $pkgname/* "$pkgdir"
}
#---- license gpg-key sha256sums ----
license=(EPL)
validpgpkeys=('622C7C012254C186677469C50C0B590E80CA15A7') # Wietse Venema <wietse@porcupine.org>
sha256sums=(3785f76c2924a02873c0be0f0cd124a9166fc1aaf77ea2a06bd4ad795a6ed416 # postfix-3.7.2.tar.gz
81e321cfeac98e9d50fb4b5408e7ad4fa0ee8afc4c64c7c36fef92d4884c16ed # postfix-3.7.2.tar.gz.sig
99682cbc9edda4a10f8624d43ada577dd3bd8f2409ae5aef04ff7db0d956ef67 # postfix-3.5.8-main_defaults.patch
fec58a3edb242daa9e45d1dd58cf19193fcadb44bc8ad8dc4e6f92f04b7257e5 # postfix.install
63f39147887336bdd173fb9425998f0a0c6f00a31241f922a255c157bfd8d02e # postfix.sysusers
825106bc3a6db8872160c5d65be04ad92828a043b8c8decc531341f0fe4a5742) # postfix.tmpfiles

238
postfix/PKGBUILD-arch Normal file
View File

@ -0,0 +1,238 @@
# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Jeff Brodnax <tullyarcher@bellsouth.net>
# Contributor: Paul Mattal <paul@archlinux.org>
pkgbase=postfix
pkgname=(postfix postfix-cdb postfix-ldap postfix-lmdb postfix-mysql
postfix-pcre postfix-pgsql postfix-sqlite)
pkgver=3.7.2
pkgrel=1
pkgdesc="Fast, easy to administer, secure mail server"
arch=(x86_64)
url="http://www.postfix.org/"
license=(EPL)
depends=(glibc)
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
$pkgname.service
$pkgname.sysusers
$pkgname.tmpfiles
)
sha512sums=('23bb1af6bf3743c741f108da136f64613f9062d121dc459944ac192275335952cd309ffec6c380f5d36430605eec538c2549c3fdee9d4597f739d9d1b0a033fc'
'SKIP'
'7b2785aa8120ca3ff91b405baf675e9e11f8d58b18a9b842672e7ae30932febddac10556a70823d8746fcb160bceb4dbabdee45cf46b02fc0127057656fb85c4'
'27f54747ad480d65b560c9dbc97e12c6353e4bceca0ffe3e358e31de56db0ad79928164c9f8790c73a9f791daa378253d2ee29b5a766661778553ec889b2cf97'
'a7f15970f613ae7b98ce1b84ca0a6034ce3cc7b2b9ce7160dad9731f740fb762f4a54f44acceb5f06f8744fa9e952b088086af8a69da388a600b742a3cda37f2'
'd08574a6acd595fc146513c92dc1bb341c3432d67de1e93ab73a7ce60e385dd34f3a55e3d3d7aec5f358ac4aae260f028599ac47650ebc663cea3043a760a7bc')
b2sums=('3f7aaba222b64274f756ea37b8ac06c29469d9183879deb4942a709d75783f4a8ca81204971b6658aba4b5bea46ed9c21b14e1f8fc6b613f257acd3aad16c170'
'SKIP'
'b5f19e0619f1fb017cd889c14e341c21146b3afe7b9eefcdb7fb1eb83a357434b899d1e92f3ab0023c78ef8f2de6ae54c4599ee0f0bd04d257f4ca0a4dc9a16c'
'02dd441cf6e4a7c2bc0de876f020b0784d811f77a5c6102dd075d67b07158dbc53c8b4d62bc8035283d4f349008574b1c3fac03f4519d56ffd809cb5bcfb7bea'
'db58b7deb24cea16fb84f56680f0000683f72e11a95039969878e3819607aad5e65af9d9f50007e7710609065c0e3ebb9b30c1d929162b74eca5e74434d82cf1'
'de31693cea5f452a9c8c0d1cf5210a6e67c0176f8b1a4d74106f2e803911569e9fdbb2301b3b5dc7ad6a6da285026b1a3ed3de52117d216b030cf0d92348909d')
validpgpkeys=('622C7C012254C186677469C50C0B590E80CA15A7') # Wietse Venema <wietse@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() {
# add distribution defaults to main.cf (alias_maps and alias_database)
patch -Np1 -d $pkgbase-$pkgver -i ../$pkgbase-3.5.8-main_defaults.patch
}
build() {
local _ccargs=(
'-fPIC' '-fcommon'
'-DUSE_SASL_AUTH'
'-DUSE_CYRUS_SASL' '-I/usr/include/sasl'
'-DHAS_LDAP'
'-DUSE_LDAP_SASL'
'-DHAS_LMDB'
'-DUSE_TLS'
'-DHAS_MYSQL' '-I/usr/include/mysql'
'-DHAS_PCRE=2'
'-DHAS_PGSQL' '-I/usr/include/postgresql'
'-DHAS_SQLITE'
'-DHAS_CDB'
'-DDEF_COMMAND_DIR=\"/usr/bin\"'
'-DDEF_DAEMON_DIR=\"/usr/lib/postfix/bin\"'
'-DDEF_SENDMAIL_PATH=\"/usr/bin/sendmail\"'
'-DDEF_README_DIR=\"/usr/share/doc/postfix\"'
'-DDEF_MANPAGE_DIR=\"/usr/share/man\"'
)
# NOTE: descriptions of variables in makedefs
make makefiles \
DEBUG='' \
pie=yes \
shared=yes \
dynamicmaps=yes \
CCARGS="${_ccargs[*]}" \
AUXLIBS="$(pkgconf --libs openssl libsasl2) -lnsl" \
AUXLIBS_LDAP='-lldap -llber' \
AUXLIBS_LMDB="$(pkgconf --libs lmdb)" \
AUXLIBS_PCRE="$(pcre2-config --libs8)" \
AUXLIBS_MYSQL="$(pkgconf --libs mariadb)" \
AUXLIBS_PGSQL="$(pkgconf --libs libpq)" \
AUXLIBS_SQLITE="$(pkgconf --libs sqlite3)" \
AUXLIBS_CDB='-lcdb' \
SHLIB_RPATH="-Wl,-rpath,/usr/lib/postfix $LDFLAGS" \
OPT="$CFLAGS $CPPFLAGS $LDFLAGS" \
-C $pkgbase-$pkgver
make -C $pkgbase-$pkgver
}
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'
'postfix-cdb: for CDB integration'
'postfix-ldap: for LDAP integration'
'postfix-lmdb: for LMDB integration'
'postfix-mysql: for MySQL integration'
'postfix-pcre: for PCRE integration'
'postfix-pgsql: for PostgreSQL integration'
'postfix-sqlite: for SQLite integration'
)
conflicts=(smtp-server smtp-forwarder)
provides=(smtp-server smtp-forwarder)
backup=(etc/postfix/{access,aliases,canonical,generic,header_checks,main.cf,master.cf,relocated,transport,virtual})
install=$pkgbase.install
cd $pkgname-$pkgver
LD_LIBRARY_PATH="lib:$LD_LIBRARY_PATH" \
sh postfix-install -non-interactive install_root="$pkgdir"
# additional man pages and scripts
for _name in posttls-finger {smtp,qmqp}-{sink,source}; do
install -vDm 644 man/man1/$_name.1 -t "$pkgdir/usr/share/man/man1/"
install -vDm 755 bin/$_name -t "$pkgdir/usr/bin/"
done
install -vDm 644 man/man1/qshape.1 -t "$pkgdir/usr/share/man/man1/"
install -vDm 755 auxiliary/qshape/qshape.pl "$pkgdir/usr/bin/qshape"
install -vDm 755 auxiliary/collate/collate.pl "$pkgdir/usr/bin/postfix-collate.pl"
install -vDm 755 auxiliary/collate/tlstype.pl "$pkgdir/usr/bin/postfix-tlstype.pl"
install -vDm 644 auxiliary/collate/README* -t "$pkgdir/usr/share/doc/$pkgname/collate/"
# license
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
# systemd service
install -vDm 644 ../$pkgname.service -t "$pkgdir/usr/lib/systemd/system/"
# sysusers.d
install -vDm 644 ../$pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
# tmpfiles.d
# 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
# remove targetted files from main configuration files
for _feature in {cdb,ldap,lmdb,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"
(
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
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
(
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
rm -v "$pkgdir/etc/$pkgname/makedefs.out"
sed -e '/makedefs/d' -i "$pkgdir/etc/$pkgname/$pkgname-files"
}
package_postfix-cdb() {
depends+=(postfix libcdb.so)
pkgdesc+=' (CDB integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-ldap() {
depends+=(postfix libldap)
pkgdesc+=' (LDAP integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-lmdb() {
depends+=(lmdb postfix)
pkgdesc+=' (LMDB integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-mysql() {
depends+=(postfix libmariadb.so)
pkgdesc+=' (MySQL integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-pcre() {
depends+=(pcre2 postfix)
pkgdesc+=' (PCRE integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-pgsql() {
depends+=(postfix libpq.so)
pkgdesc+=' (PostgreSQL integration)'
mv -v $pkgname/* "$pkgdir"
}
package_postfix-sqlite() {
depends+=(postfix sqlite)
pkgdesc+=' (SQLite integration)'
mv -v $pkgname/* "$pkgdir"
}

1
postfix/clean Normal file
View File

@ -0,0 +1 @@
rm -rf {src,pkg,postfix*tar.gz*}

6
postfix/deps Normal file
View File

@ -0,0 +1,6 @@
postgresql-libs
tinycdb
libnsl lmdb
mariadb-libs

1
postfix/key Normal file
View File

@ -0,0 +1 @@
gpg --recv-keys 0C0B590E80CA15A7

View File

@ -0,0 +1,19 @@
diff -ruN a/conf/main.cf b/conf/main.cf
--- a/conf/main.cf 2019-06-16 02:33:53.000000000 +0200
+++ b/conf/main.cf 2020-11-09 18:22:06.436205639 +0100
@@ -401,6 +401,7 @@
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
+alias_maps = hash:/etc/postfix/aliases
# The alias_database parameter specifies the alias database(s) that
# are built with "newaliases" or "sendmail -bi". This is a separate
@@ -411,6 +412,7 @@
#alias_database = dbm:/etc/mail/aliases
#alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
+alias_database = $alias_maps
# ADDRESS EXTENSIONS (e.g., user+foo)
#

8
postfix/postfix.install Normal file
View File

@ -0,0 +1,8 @@
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
# introduction of split packages
if [ "$(vercmp "$2" "3.5.9")" -le 0 ]; then
echo "WARNING: The following features are now only available via optdepends: cdb, ldap, lmdb, mysql, pcre, pgsql, sqlite."
fi
}

2
postfix/postfix.sysusers Normal file
View File

@ -0,0 +1,2 @@
g postdrop 75 -
u postfix 73 - /var/spool/postfix

16
postfix/postfix.tmpfiles Normal file
View File

@ -0,0 +1,16 @@
z /usr/bin/postdrop 2755 root postdrop
z /usr/bin/postqueue 2755 root postdrop
z /var/lib/postfix 700 postfix root
z /var/spool/postfix/active 700 postfix root
z /var/spool/postfix/bounce 700 postfix root
z /var/spool/postfix/corrupt 700 postfix root
z /var/spool/postfix/defer 700 postfix root
z /var/spool/postfix/deferred 700 postfix root
z /var/spool/postfix/flush 700 postfix root
z /var/spool/postfix/hold 700 postfix root
z /var/spool/postfix/incoming 700 postfix root
z /var/spool/postfix/maildrop 730 postfix postdrop
z /var/spool/postfix/private 700 postfix root
z /var/spool/postfix/public 710 postfix postdrop
z /var/spool/postfix/saved 700 postfix root
z /var/spool/postfix/trace 700 postfix root

5
postfix/time Normal file
View File

@ -0,0 +1,5 @@
real 0m53.516s
user 1m50.547s
sys 0m11.206s