summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD33
-rw-r--r--spread-daemon.install21
-rw-r--r--spread.service14
4 files changed, 89 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5855fd0e651
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = spread-daemon
+ pkgdesc = Spread is an open source toolkit that provides a high performance messaging service - Daemon and C API
+ pkgver = 4.4.0
+ pkgrel = 2
+ url = http://www.spread.org
+ install = spread-daemon.install
+ arch = x86_64
+ arch = i686
+ arch = armv6h
+ license = custom
+ depends = glibc
+ options = !makeflags
+ source = http://www.spread.org/download/spread-src-4.4.0.tar.gz?FILE=spread-src-4.4.0.tar.gz&name=aur&company=archlinux&email=foo@example.org
+ source = spread-daemon.install
+ source = spread.service
+ md5sums = 969d315ce857982192bd48441353d944
+ md5sums = 05e01e6f5e775be72608854e6f0d7695
+ md5sums = 93a08034a2a55644b8c57cd821e3a353
+
+pkgname = spread-daemon
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..4ea3ef0764f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: languiar <languitar at semipol dot de>
+# Contributor: Brian Bidulock <bidulock@openss7.org>
+pkgname=spread-daemon
+pkgver=4.4.0
+pkgrel=2
+pkgdesc="Spread is an open source toolkit that provides a high performance messaging service - Daemon and C API"
+url="http://www.spread.org"
+license=('custom')
+depends=(glibc)
+makedepends=()
+options=(!makeflags)
+arch=('x86_64' 'i686' 'armv6h')
+install=$pkgname.install
+source=("http://www.spread.org/download/spread-src-$pkgver.tar.gz?FILE=spread-src-$pkgver.tar.gz&name=aur&company=archlinux&email=foo@example.org" $pkgname.install spread.service)
+md5sums=('969d315ce857982192bd48441353d944'
+ '05e01e6f5e775be72608854e6f0d7695'
+ '93a08034a2a55644b8c57cd821e3a353')
+
+build() {
+ cd $srcdir/spread-src-$pkgver
+
+ export CFLAGS="$CFLAGS -fPIC"
+ ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc \
+ --sbindir=/usr/bin
+ make || return 1
+}
+
+package() {
+ cd $srcdir/spread-src-$pkgver
+ make DESTDIR=$pkgdir install
+ install -D license.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE || return 1
+ install -Dm644 "${srcdir}/spread.service" "${pkgdir}/usr/lib/systemd/system/spread.service"
+}
diff --git a/spread-daemon.install b/spread-daemon.install
new file mode 100644
index 00000000000..54db7cb041e
--- /dev/null
+++ b/spread-daemon.install
@@ -0,0 +1,21 @@
+post_install() {
+ getent group spread &>/dev/null || groupadd -r spread >/dev/null
+ getent passwd spread &>/dev/null || useradd -r -d /var/lib/spread -s /bin/false -g spread spread >/dev/null
+ true
+}
+
+post_upgrade() {
+ post_install
+ true
+}
+
+pre_remove() {
+ systemctl stop spread.service &>/dev/null
+ true
+}
+
+post_remove() {
+ getent passwd spread &>/dev/null && userdel spread >/dev/null
+ getent group spread &>/dev/null && groupdel spread >/dev/null
+ true
+}
diff --git a/spread.service b/spread.service
new file mode 100644
index 00000000000..2ef90ad3528
--- /dev/null
+++ b/spread.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=spread messaging daemon
+After=syslog.target network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/spread $SPREAD_OPTS
+
+User=spread
+Group=spread
+UMask=0007
+
+[Install]
+WantedBy=multi-user.target