diff options
Diffstat (limited to 'pcr')
-rw-r--r-- | pcr/rmilter/PKGBUILD | 45 | ||||
-rw-r--r-- | pcr/rmilter/rmilter.install | 18 |
2 files changed, 63 insertions, 0 deletions
diff --git a/pcr/rmilter/PKGBUILD b/pcr/rmilter/PKGBUILD new file mode 100644 index 000000000..98906b32c --- /dev/null +++ b/pcr/rmilter/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Oleksandr Natalenko <oleksandr@natalenko.name> +# Maintainer (Parabola): fauno <fauno@parabola.nu> +pkgname=rmilter +pkgver=1.8.6 +pkgrel=1 +epoch= +pkgdesc="Another sendmail milter for different mail checks." +arch=('x86_64' 'i686') +url="http://rspamd.com" +license=('custom:BSD') +depends=('openssl' 'pcre' 'libmilter' 'opendkim') +makedepends=('cmake' 'pkgconfig' 'bison' 'flex') + +backup=('etc/rmilter/rmilter-grey.conf') + +install=rmilter.install + +source=("${pkgname}-${pkgver}.tar.gz::https://codeload.github.com/vstakhov/${pkgname}/tar.gz/${pkgver}") + +sha256sums=('dd00e10a6c5e2a7682bd81155f8cb09fbdbed0416e1c7ccc955a4338c85f144f') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + cmake \ + -DENABLE_DEBUG=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DRMILTER_USER=_rmilter \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DSBINDIR=/usr/bin \ + -DENABLE_MEMCACHED=OFF \ + -DWANT_SYSTEMD_UNITS=ON \ + . + + make -j$(nproc) +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}/" install + + install -Dm0644 "${pkgname}.conf.sample" "${pkgdir}/etc/${pkgname}/${pkgname}.conf.sample" + install -Dm0644 "${pkgname}-grey.conf" "${pkgdir}/etc/${pkgname}/${pkgname}-grey.conf" + install -Dm0644 'debian/copyright' "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} diff --git a/pcr/rmilter/rmilter.install b/pcr/rmilter/rmilter.install new file mode 100644 index 000000000..93846ce09 --- /dev/null +++ b/pcr/rmilter/rmilter.install @@ -0,0 +1,18 @@ +## arg 1: the new package version +post_install() { + if ! getent passwd _rmilter >/dev/null; then + useradd -r -M -c 'rmilter daemon' -d / -s /usr/bin/nologin _rmilter + passwd -l _rmilter >/dev/null + fi + mkdir -p /run/rmilter + chown _rmilter:_rmilter /run/rmilter +} + +## arg 1: the old package version +post_remove() { + if getent passwd _rmilter >/dev/null; then + userdel _rmilter + fi +} + +# vim:set ts=2 sw=2 et: |