# Contributor: Kevin Daudt # Maintainer: Kevin Daudt pkgname=postsrsd pkgver=2.0.7 pkgrel=0 pkgdesc="Postfix Sender Rewriting Scheme daemon" url="https://github.com/roehling/postsrsd" arch="all" license="GPL-3.0-only AND BSD-3-Clause AND FSFUL" makedepends=" autoconf automake confuse-dev cmake help2man samurai sqlite-dev " #checkdepends="subunit-dev" pkgusers="postsrsd" install="$pkgname.pre-install postsrsd.pre-upgrade" subpackages="$pkgname-doc $pkgname-openrc" source="$pkgname-$pkgver.tar.gz::https://github.com/roehling/postsrsd/archive/$pkgver.tar.gz postsrsd-conf-change-defaults.patch cmake-dont-install-systemdfile.patch postsrsd.initd " # secfixes: # 1.6-r4: # - CVE-2020-35573 build() { cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS \ -DCMAKE_INSTALL_PREFIX=/usr/ \ -DWITH_SQLITE=ON \ -DTESTS_WITH_ASAN=OFF \ -DGENERATE_SRS_SECRET=OFF \ -DPOSTSRSD_USER=postsrsd cmake --build build } check() { cd build CTEST_OUTPUT_ON_FAILURE=TRUE ctest } package() { DESTDIR="$pkgdir" cmake --install build install -Dm0644 build/postsrsd.conf -t "$pkgdir"/etc/postsrsd/ install -Dm0755 "$srcdir"/postsrsd.initd "$pkgdir"/etc/init.d/postsrsd } sha512sums=" dfa1c9dca840f92ee0500e3fc2daed011245f9e0fddf38f0d5d67d4ffa173f535f6edd6b49857d812b4b96cbb8a3e3bdfca99782431576e8223b861c332d6678 postsrsd-2.0.7.tar.gz 7bd2525c96a1270c7484282efec502acc58fc9dea0e3f31595eb6a33f17c39645ea02e7a36b528078cfc599a5296cce5ca6a81744cef159e49d5e6827171b69b postsrsd-conf-change-defaults.patch 4b871700d7aebfe21bcd13e5f57b1c2ea27902d827c64027b4d36971ba4d2bb8b4bc144b0f5bd9baf75ff47bb3aba562c9fff517cbb11475bbc35b5137542806 cmake-dont-install-systemdfile.patch 213a45f07de7f45ddbfaa905a80682ac7a9762d6f0c62b11101aaeee07a7ffe802a392dc1a97389adfed7ca16e8268ad0dc20e99b8501a9a7c21736dca79a7e1 postsrsd.initd "