summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-10-08 17:39:05 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-10-08 17:39:05 -0500
commitb0ff37c37303880d0ae8c16aba53eeee43681fae (patch)
treeab0ae7dcdf48cd18b2bf74c9f3649637f9a70b2b /pcr
parent0a7b0f75dbb04f4256ebc2a1a56ad4bc02527946 (diff)
openrc-video: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r--pcr/openrc-video/PKGBUILD49
-rw-r--r--pcr/openrc-video/virtualgl.install4
2 files changed, 53 insertions, 0 deletions
diff --git a/pcr/openrc-video/PKGBUILD b/pcr/openrc-video/PKGBUILD
new file mode 100644
index 000000000..f64dfd8d4
--- /dev/null
+++ b/pcr/openrc-video/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer (Arch): artoo <artoo@manjaro.org>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_url="https://raw.githubusercontent.com/gentoo/gentoo/master"
+
+pkgbase=openrc-video
+pkgname=('virtualgl-openrc')
+pkgver=20160528
+pkgrel=1.parabola1
+arch=('any')
+url="https://github.com/manjaro/packages-openrc"
+license=('GPL')
+groups=('openrc-video')
+source=("vgl.confd::${_url}/x11-misc/virtualgl/files/vgl.confd-r2"
+ "vgl.initd::${_url}/x11-misc/virtualgl/files/vgl.initd-r3"
+ "${_url}/x11-misc/virtualgl/files/vgl-helper.sh")
+sha256sums=('5356391cec2e297f2fafa370f42be225ad4238ac61182b90720a3d914261a80f'
+ '09ce3a70aea80f71a7fdfd46421f93d44f302abe0a709bf9cfd459485649acd1'
+ '438c928840fbfb9274604296b8178e7f97b42a3428d115e1de6e609ea3146497')
+
+pkgver() {
+ date +%Y%m%d
+}
+
+_inst_initd(){
+ install -Dm755 ${srcdir}/$1.initd ${pkgdir}/etc/init.d/$1
+
+ sed -e 's|#!/sbin/runscript|#!/usr/bin/openrc-run|' \
+ -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|' \
+ -e 's|/var/run|/run|g' \
+ -i ${pkgdir}/etc/init.d/$1
+}
+
+_inst_confd(){
+ install -Dm755 ${srcdir}/$1.confd ${pkgdir}/etc/conf.d/$1
+}
+
+package_virtualgl-openrc() {
+ pkgdesc="OpenRC virtualgl init script"
+ depends=('openrc' 'virtualgl')
+ install=virtualgl.install
+ backup=('etc/conf.d/vgl')
+
+ _inst_confd 'vgl'
+ _inst_initd 'vgl'
+
+ install -Dm755 "${srcdir}/vgl-helper.sh" "${pkgdir}"/usr/lib/vgl-helper.sh
+ install -d "${pkgdir}"/var/lib/VirtualGL
+}
diff --git a/pcr/openrc-video/virtualgl.install b/pcr/openrc-video/virtualgl.install
new file mode 100644
index 000000000..89648c3c2
--- /dev/null
+++ b/pcr/openrc-video/virtualgl.install
@@ -0,0 +1,4 @@
+post_install() {
+ chown root:video /var/lib/VirtualGL
+ chmod 0750 /var/lib/VirtualGL
+}