mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-14 00:24:36 +02:00
116 lines
4 KiB
Text
116 lines
4 KiB
Text
# Contributor: Noel Kuntze <noel.kuntze@thermi.consulting>
|
|
# Maintainer: Noel Kuntze <noel.kuntze@thermi.consulting>
|
|
pkgname=piler
|
|
pkgver=1.4.7
|
|
pkgrel=0
|
|
pkgdesc="Open source email archiving solution with all the necessary features for your enterprise"
|
|
url="https://www.mailpiler.org/"
|
|
arch="x86_64 aarch64" # libmanticore-columnar is only supported on x86_64 and aarch64
|
|
license="GPL-3.0-only"
|
|
_php=php83
|
|
depends="
|
|
bash
|
|
catdoc
|
|
coreutils
|
|
findutils
|
|
libcurl
|
|
libzip
|
|
libmanticore-columnar
|
|
manticore
|
|
memcached
|
|
poppler-utils
|
|
python3
|
|
py3-mysqlclient
|
|
sysstat
|
|
tnef
|
|
tre
|
|
unrtf
|
|
xlhtml
|
|
"
|
|
#optional = poppler: for reading attachments
|
|
# catdoc: for reading attachments
|
|
# tnef: for reading attachments
|
|
# bash is required to execute the cron maintenance scripts
|
|
makedepends="$depends curl-dev mariadb-dev $_php-dev openssl-dev tre-dev libzip-dev"
|
|
install="$pkgname.pre-install"
|
|
options="!check"
|
|
subpackages="$pkgname-openrc"
|
|
pkgusers="piler"
|
|
pkggroups="piler"
|
|
source="https://github.com/jsuto/piler/archive/refs/tags/piler-$pkgver.tar.gz
|
|
0001-manticore-conf.patch
|
|
|
|
piler.initd
|
|
piler-smtp.initd
|
|
searchd.initd
|
|
searchd.confd
|
|
"
|
|
builddir="$srcdir/piler-piler-$pkgver"
|
|
|
|
build() {
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--sbindir=/usr/bin \
|
|
--localstatedir=/var \
|
|
--libexecdir=/usr/lib \
|
|
--with-piler-user=root \
|
|
--enable-memcached
|
|
|
|
#Attention! The makefile is not formulated correctly for multithreading! We need to use one thread or it breaks.
|
|
make -j1
|
|
}
|
|
|
|
package() {
|
|
|
|
make installdirs DESTDIR="$pkgdir"
|
|
make install DESTDIR="$pkgdir"
|
|
|
|
# service files
|
|
rm -rf "$pkgdir"/etc/init.d
|
|
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
|
|
install -Dm755 "$srcdir"/$pkgname-smtp.initd "$pkgdir"/etc/init.d/$pkgname-smtp
|
|
install -Dm755 "$srcdir"/searchd.initd "$pkgdir"/etc/init.d/searchd
|
|
install -Dm644 "$srcdir"/searchd.confd "$pkgdir"/etc/conf.d/searchd
|
|
|
|
# crontab
|
|
install -Dm600 "$pkgdir"/usr/share/piler/piler.cron "$pkgdir"/etc/crontabs/piler
|
|
|
|
# php-fpm fix
|
|
sed -i "s@/run/php/php.*-fpm.sock@/run/php-fpm${_php#php}/piler.sock@" contrib/webserver/piler-nginx.conf
|
|
|
|
# configuration
|
|
install -Dm655 "$builddir"/contrib/webserver/piler-nginx.conf "$pkgdir"/etc/piler/piler-nginx.conf
|
|
install -Dm644 "$builddir"/etc/example.conf "$pkgdir"/etc/piler/piler.conf
|
|
install -Dm644 "$builddir"/etc/smtp.acl.example "$pkgdir"/etc/piler/smtp.acl.example
|
|
install -Dm644 "$builddir"/util/db-upgrade.sql "$pkgdir"/usr/share/piler/db-upgrade.sql
|
|
mv "$pkgdir"/etc/piler/manticore.conf.dist "$pkgdir"/etc/piler/manticore.conf
|
|
mv "$pkgdir"/etc/piler/config-site.dist.php "$pkgdir"/etc/piler/config-site.php
|
|
rm -f "$pkgdir"/etc/piler/sphinx.conf.dist
|
|
touch "$pkgdir"/etc/piler/MANTICORE
|
|
|
|
# license
|
|
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
# Fix directory permissions
|
|
chmod -R a-s "$pkgdir"/usr/bin
|
|
chmod 644 "$pkgdir"/etc/piler/*
|
|
chmod 770 "$pkgdir"/var/piler/www/tmp "$pkgdir"/var/piler/www/images
|
|
chown piler:www-data "$pkgdir"/var/piler/www/tmp
|
|
|
|
install -d "$pkgdir"/var/log/$pkgname
|
|
|
|
# remove unnecessary files
|
|
rm -f "$pkgdir"/usr/lib/piler/*.service "$pkgdir"/usr/lib/piler/postinstall.sh
|
|
}
|
|
|
|
sha512sums="
|
|
0794b3d7e88a164c356bfc643594cb6ffb860be4a3bf26fa1a2dd1c4e3bf26442a08334a1ee7eb63fc2801a0bb27881f2bbe0f98cf9a26619b964bb3531d1166 piler-1.4.7.tar.gz
|
|
918c2809db685f676cf3319d687568d380eba3dd43e8c36b00648abb420fe35d036aa1b21d51fe43497aa297546341c1fbdd79ab643bfed4a9f80874a027c446 0001-manticore-conf.patch
|
|
89f4f2136fbe5a7d5106f79533d4b3487ef67d7f8c1added31193114bf4471cff63d1c99bfde23aafb4915e5c00292907b7fd568964ceb8b32da7009f3d4e59b piler.initd
|
|
3cf50479a0a8b79c1d41f4c4eaa7393630a03f6b007cd8d62b3538bd85d44bc68b949134ad671600073a35428aa0fef7ea2b03ff881f9dc5fdcf444f5e282a01 piler-smtp.initd
|
|
c4ad4742c3bd899d8f8004f16252b4862e19683cba6d3d4a7c86d9ed90942c7b3878fc713915aa299b28852f798fedee5ae73e28844d653383d6c7a07698fde4 searchd.initd
|
|
d6a57f4f972786898d39e94666daa36ba6265dbb577d97e4a9586d4e7b2f3f7b4e69537b316529123186df30f530dc54c03af10c88c8e205192d2b8568571bb3 searchd.confd
|
|
"
|