summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Jobin2015-06-08 20:35:53 +0900
committerMathieu Jobin2015-06-08 20:39:37 +0900
commited431e35153f3a5609af3b79ad69098795da9ea2 (patch)
treeb311abba113d1a3d3eaf9c1ac0ea4abc6c563559
parentd5030c1c2c653087fa3ff0b1e364e5258ad0139d (diff)
downloadaur-ed431e35153f3a5609af3b79ad69098795da9ea2.tar.gz
PKGBUILD update
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD15
2 files changed, 15 insertions, 1 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8d8610078b7..1f3c19f78ea 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -9,6 +9,7 @@ pkgbase = netvirt-agent-git
makedepends = git
makedepends = scons
makedepends = cmake
+ makedepends = libcap
source = netvirt-agent-git::git+https://github.com/netvirt/netvirt.git
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 1dd319613f5..d0f1e84a043 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@ url=("http://netvirt.org" "https://github.com/netvirt/netvirt")
license='GPLv3'
depends=()
optdepends=()
-makedepends=('git' 'scons' 'cmake') # 'libqt4-dev' 'libssl-dev')
+makedepends=('git' 'scons' 'cmake' 'libcap') # 'libqt4-dev' 'libssl-dev')
source="${pkgname}::git+https://github.com/netvirt/netvirt.git"
md5sums=('SKIP')
@@ -56,5 +56,18 @@ build() {
package() {
cd ${srcdir}/${pkgname}/build
make install
+
+ #TODO: this could/should become a post_install item
+ echo "#!/bin/sh
+ sudo chmod 666 /dev/net/tun
+ sudo setcap cap_net_bind_service,cap_net_admin=ep /usr/bin/netvirt-agent
+ " > ${pkgdir}/usr/bin/netvirt-allow_user
+
+ # restartd on ubuntu allow to easily create a daemon with any command,
+ # but unfortunatelly, it does not look to be available under arch linux
+ #echo "#!/bin/sh
+ #sudo pacman -S restartd
+ #echo 'netvirt-agent \"netvirt-agent\" \"sleep 20 && su - \$USER -c netvirt-agent &\" \"\"' | sudo tee -a /etc/restartd.conf
+ #" > ${pkgdir}/usr/bin/netvirt-daemonize
}