summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLackOfDream2016-11-14 22:05:07 +0900
committerLackOfDream2016-11-14 22:05:13 +0900
commit21c40c6841d4bca7759dab6c6c71b0b3af42280b (patch)
treea9ad61e0a7ddf6127cb56298fa4ba70c630ce17f
downloadaur-lrun-json.tar.gz
init
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD43
-rw-r--r--lrun.install14
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1beba44cdad9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = lrun-json
+ pkgdesc = Run command on Linux with resources limited.
+ pkgver = 1.1.5
+ pkgrel = 1
+ url = https://github.com/lackofdream/lrun
+ install = lrun.install
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = gcc>=4.4
+ makedepends = pkg-config
+ makedepends = ruby
+ depends = linux>=2.6.26
+ optdepends = libseccomp>=2.0
+ conflicts = lrun
+ source = lrun-1.1.5.tar.gz::https://github.com/lackofdream/lrun/archive/v1.1.5.tar.gz
+ sha256sums = cd451ac28afcb31ac1b20241ad47cdf8cf7dbd221bc0abd0ee83c956eb82a771
+
+pkgname = lrun-json
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3528274d74b9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+set -u
+pkgname='lrun-json'
+_pkgname='lrun'
+pkgver='1.1.5'
+pkgrel='1'
+pkgdesc='Run command on Linux with resources limited.'
+url="https://github.com/lackofdream/${_pkgname}"
+arch=('i686' 'x86_64')
+license=('MIT')
+depends=('linux>=2.6.26')
+optdepends=('libseccomp>=2.0')
+makedepends=('gcc>=4.4' 'pkg-config' 'ruby')
+conflicts=('lrun')
+_verwatch=("${url}/releases" "${url#*github.com}/archive/v\(.*\)\.tar\.gz" 'l')
+source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/lackofdream/${_pkgname}/archive/v${pkgver}.tar.gz")
+sha256sums=('cd451ac28afcb31ac1b20241ad47cdf8cf7dbd221bc0abd0ee83c956eb82a771')
+install="${_pkgname}.install"
+
+prepare() {
+ set -u
+ pkg-config --max-version 2.9 libseccomp || echo 'libseccomp 1.x or 2.x not found, syscall filter will not work'
+ set +u
+}
+
+build() {
+ set -u
+ cd "${_pkgname}-${pkgver}/src/"
+ #rake
+ PREFIX="${pkgdir}/usr" rake
+ set +u
+}
+
+package() {
+ set -u
+ cd "${_pkgname}-${pkgver}/src/"
+ install -Dpm4550 -oroot -g 593 -s 'lrun' -t "${pkgdir}/usr/bin/"
+
+ install -Dpm644 '../LICENSE' -t "${pkgdir}/usr/share/licenses/${_pkgname}/"
+ set +u
+}
+set +u
+
+# vim:set ts=2 sw=2 et:
diff --git a/lrun.install b/lrun.install
new file mode 100644
index 000000000000..55c6a58c1c57
--- /dev/null
+++ b/lrun.install
@@ -0,0 +1,14 @@
+post_upgrade() {
+ /usr/bin/getent group 'lrun' >/dev/null 2>&1 || usr/bin/groupadd -g '593' 'lrun' &>/dev/null
+}
+
+post_install() {
+ post_upgrade
+ echo 'NOTE: To run lrun as normal user you have to add yourself into lrun group'
+}
+
+post_remove() {
+ if /usr/bin/getent group 'lrun' >/dev/null 2>&1; then
+ /usr/bin/groupdel 'lrun'
+ fi
+}