35 lines
1.4 KiB
Plaintext
35 lines
1.4 KiB
Plaintext
# Description: Mailman, the GNU Mailing List Manager
|
|
# URL: https://www.gnu.org/software/mailman/
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
|
# Depends on: gunicorn python3-aiosmtpd python3-alembic python3-authheaders python3-click python3-dateutil python3-falcon python3-flufl-bounce python3-flufl-i18n python3-flufl-lock python3-lazr-config python3-passlib python3-requests python3-zope-component python3-zope-configuration
|
|
|
|
name=mailman
|
|
version=3.3.9
|
|
release=1
|
|
source=(https://gitlab.com/mailman/mailman/-/archive/v$version/mailman-v$version.tar.bz2
|
|
$name.service)
|
|
|
|
build() {
|
|
cd $name-v$version
|
|
|
|
printf "[mailman]\nlayout: fhs\n" >> ../$name.cfg
|
|
sed -e 's|/var/tmp/mailman|/var/lib/mailman|g' \
|
|
-i src/mailman/config/schema.cfg
|
|
sed -e 's|/var/run|/run|g' \
|
|
-e 's|/sbin|/usr/bin|' \
|
|
-i src/mailman/config/mailman.cfg
|
|
|
|
/usr/bin/python3 -m build --wheel --skip-dependency-check --no-isolation
|
|
/usr/bin/python3 -m installer --compile-bytecode 2 --destdir=$PKG dist/*.whl
|
|
|
|
install -vDm 640 -o root -g mailman ../$name.cfg -t $PKG/etc/
|
|
mkdir -p $PKG/var/{lib,spool,log,lock}/$name $PKG/etc/mailman.d
|
|
mkdir -p $PKG/var/lib/$name/{archives,cache,data,lists,messages,templates}
|
|
chown -R mailman:root $PKG/var/{lib,spool,log,lock}/$name \
|
|
$PKG/etc/mailman.d
|
|
chmod 0775 $PKG/var/log/$name
|
|
chmod 1777 $PKG/var/lock
|
|
|
|
install -Dm755 $SRC/mailman.service $PKG/etc/rc.d/$name
|
|
}
|