diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-11-05 13:29:23 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-12-22 10:06:23 -0300 |
commit | a2165b238194d7b710665b58b0701a2cfb240bb4 (patch) | |
tree | 68346655a5aef8af2483ea8a4292b6d90eae90cc /pcr/memlockd | |
parent | 973c8ea201b35d7d22d19019a028152dfad360ce (diff) |
memlockd
Diffstat (limited to 'pcr/memlockd')
-rw-r--r-- | pcr/memlockd/PKGBUILD | 28 | ||||
-rw-r--r-- | pcr/memlockd/memlockd.install | 22 |
2 files changed, 50 insertions, 0 deletions
diff --git a/pcr/memlockd/PKGBUILD b/pcr/memlockd/PKGBUILD new file mode 100644 index 000000000..a24d1b597 --- /dev/null +++ b/pcr/memlockd/PKGBUILD @@ -0,0 +1,28 @@ +# Contributor: fauno <fauno@parabola.nu> +pkgname=memlockd +pkgver=1.1.1 +pkgrel=1 +pkgdesc="daemon that locks files into memory" +arch=('i686' 'x86_64') +url="http://doc.coker.com.au/projects/memlockd/" +license=('GPL3') +depends=('glibc') +# main site doesn't announce 1.1.1 +source=(http://ftp.de.debian.org/debian/pool/main/${pkgname:0:1}/${pkgname}/${pkgname}_${pkgver}.tar.gz) +install=${pkgname}.install +backup=(etc/memlockd.cfg) +md5sums=('5e7a895b032eaa55f8cf15104e43364d') + +build() { + cd "$srcdir/$pkgname-$pkgver" + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + install -d -m 750 "${pkgdir}/usr/lib/memlockd" "${pkgdir}/etc/memlockd.d" + install -D -m 644 memlockd.8 "${pkgdir}/usr/share/man/man8/memlockd.8" + install -D -m 755 memlockd "${pkgdir}/usr/bin/memlockd" + install -D -m 640 memlockd.cfg "${pkgdir}/etc/memlockd.cfg" + install -D -m 644 memlockd.service "${pkgdir}/usr/lib/systemd/system/memlockd.service" +} diff --git a/pcr/memlockd/memlockd.install b/pcr/memlockd/memlockd.install new file mode 100644 index 000000000..a744f441a --- /dev/null +++ b/pcr/memlockd/memlockd.install @@ -0,0 +1,22 @@ +#!/bin/sh +# arg 1: the new package version +post_install() { + getent group memlockd >/dev/null || + groupadd --system memlockd + + getent passwd memlockd >/dev/null || + useradd --system \ + --gid memlockd \ + --shell /bin/false \ + --no-create-home \ + --home /usr/lib/memlockd \ + memlockd + + chown memlockd:memlockd /usr/lib/memlockd /etc/memlockd.d +} + +# arg 1: the old package version +pre_remove() { + userdel memlockd &>/dev/null + groupdel memlockd &>/dev/null +} |