summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Podgorny2015-10-13 19:33:54 +0200
committerRadek Podgorny2015-10-13 19:41:05 +0200
commitff862e4a9adab4f05ace9d5a5cd2e94ad02135cd (patch)
tree86da83510418b88f941dc095e9ef67e0f9a7998b
parente5e77127b28c5958cf92d91bf54652205ec87def (diff)
downloadaur-ff862e4a9adab4f05ace9d5a5cd2e94ad02135cd.tar.gz
install service file to correct location
-rw-r--r--PKGBUILD18
-rw-r--r--postsrsd.service15
2 files changed, 11 insertions, 22 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4a2901c85f12..35602162df40 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,6 @@
-# Maintainer: Thomas Haider <t.haider@deprecate.de>
+# Maintainers:
+# Radek Podgorny <radek@podgorny.cz>
+# Thomas Haider <t.haider@deprecate.de>
pkgname=postsrsd-git
pkgver=85.90718d7
@@ -13,9 +15,8 @@ backup=('etc/postsrsd/postsrsd.conf')
url="https://github.com/roehling/postsrsd"
install=postsrsd.install
license=(GPL2)
-source=('git+https://github.com/roehling/postsrsd.git' 'postsrsd.service')
-sha1sums=('SKIP'
- 'b30e40b2f012ce45a8b04ede1f1f025facbb44f9')
+source=('git+https://github.com/roehling/postsrsd.git')
+sha1sums=('SKIP')
pkgver() {
cd "$srcdir/postsrsd"
@@ -25,20 +26,23 @@ pkgver() {
build() {
cd "$srcdir/postsrsd"
+ ###sed -e 's|${SYSCONF_DIR}/systemd/system|/usr/lib/systemd/system|g' -i postinstall.cmake.in
+ rm -rf build
mkdir build
cd build
- cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DGENERATE_SRS_SECRET=OFF
+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DGENERATE_SRS_SECRET=OFF
make all
}
package() {
cd "$srcdir/postsrsd/build"
make DESTDIR="$pkgdir/" install
-
+
rm -rf $pkgdir/usr/lib
mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin"
sed -e 's/^\(RUN_AS=\)nobody/#\1postsrsd/;s/\(\/etc\/postsrsd\)\(\.secret\)/\1\/postsrsd\2/' \
-e 's/^\(# is \).*$/\1localhost\.localdomain/'< postsrsd.default > postsrsd.conf
install -D -m644 "postsrsd.conf" "$pkgdir/etc/postsrsd/postsrsd.conf"
- install -D -m644 "$srcdir/postsrsd.service" "$pkgdir/usr/lib/systemd/system/postsrsd.service"
+ mkdir -p "$pkgdir/usr/lib/systemd/system"
+ mv "$pkgdir/etc/systemd/system/postsrsd.service" "$pkgdir/usr/lib/systemd/system/"
}
diff --git a/postsrsd.service b/postsrsd.service
index e72f97045f56..e69de29bb2d1 100644
--- a/postsrsd.service
+++ b/postsrsd.service
@@ -1,15 +0,0 @@
-[Unit]
-Description=Postfix Sender Rewriting Scheme daemon
-
-[Service]
-Type=forking
-RuntimeDirectory=postsrsd
-PIDFile=/run/postsrsd/postsrsd.pid
-Environment=SRS_DOMAIN=localhost.localdomain SRS_FORWARD_PORT=10001 SRS_REVERSE_PORT=10002 SRS_SECRET=/etc/postsrsd/postsrsd.secret \
- SRS_EXCLUDE_DOMAINS= RUN_AS=postsrsd CHROOT=/run/postsrsd
-EnvironmentFile=/etc/postsrsd/postsrsd.conf
-ExecStart=/usr/bin/postsrsd -D -4 -f${SRS_FORWARD_PORT} -r${SRS_REVERSE_PORT} -d${SRS_DOMAIN} -s${SRS_SECRET} -u${RUN_AS} \
- -c${CHROOT} -X${SRS_EXCLUDE_DOMAINS} -p/run/postsrsd/postsrsd.pid
-
-[Install]
-WantedBy=multi-user.target