summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Jobin2019-01-10 01:27:17 +0000
committerMathieu Jobin2019-01-10 01:27:17 +0000
commit10570348bbba0d014d159eb604f9c8a86472aa57 (patch)
tree92d4e4748d43c44e39aad4cf3c24f8532421fffe
parentdd16b304c224eaad1a05a2f525832aa9c636bd52 (diff)
downloadaur-10570348bbba0d014d159eb604f9c8a86472aa57.tar.gz
clean up version, dependencies and script
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD30
2 files changed, 20 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1f3c19f78ea..d8ec0663e75 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = netvirt-agent-git
pkgdesc = NetVirt is an open source network virtualization platform (NVP).
- pkgver = 0.6.r20.g3798298
- pkgrel = 3798298
+ pkgver = v2.0.2b
+ pkgrel = 1
url = http://netvirt.org
arch = i686
arch = x86_64
@@ -9,7 +9,10 @@ pkgbase = netvirt-agent-git
makedepends = git
makedepends = scons
makedepends = cmake
- makedepends = libcap
+ depends = jansson
+ depends = curl
+ depends = libevent
+ depends = openssl
source = netvirt-agent-git::git+https://github.com/netvirt/netvirt.git
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 260fe0199c5..995d381af9e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,15 +2,15 @@
pkgname=netvirt-agent-git
srcgiturl=https://github.com/netvirt/netvirt
-pkgver=v0.6.r593.g9b8c178
+pkgver=v2.0.2b
pkgrel=1
pkgdesc="NetVirt is an open source network virtualization platform (NVP)."
arch=('i686' 'x86_64')
url="http://netvirt.org"
license=('GPLv3')
-depends=('jansson' 'curl' 'libevent')
+depends=('jansson' 'curl' 'libevent' 'openssl')
optdepends=()
-makedepends=('git' 'scons' 'cmake' 'libcap') # 'libqt4-dev' 'libssl-dev')
+makedepends=('git' 'scons' 'cmake') # 'libqt4-dev' 'libssl-dev')
source=("${pkgname}::git+${srcgiturl}.git")
md5sums=('SKIP')
@@ -19,7 +19,12 @@ pkgver() {
sha=`echo "$gitinfo" | head -n 1 | cut -c -7`
tag=`echo "$gitinfo" | tail -n 1 | awk -F "/" {'print $3'}`
commits=`curl -s ${srcgiturl}/releases/tag/${tag} | grep -o "[0-9]* commits" | awk {'print $1'}`
- printf "%s.r%s.g%s" $tag $commits $sha
+ if [ "$commit" = "" ]; then
+ printf $tag
+ else
+ printf "%s.r%s.g%s" $tag $commits $sha
+ fi
+
}
prepare() {
@@ -38,7 +43,7 @@ build() {
[ -d ${srcdir}/${pkgname}/build ] && rm -fr ${srcdir}/${pkgname}/build
mkdir ${srcdir}/${pkgname}/build
cd ${srcdir}/${pkgname}/build
- cmake .. -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}/usr -DWITH_GUI=OFF -DOPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0 -DOPENSSL_SSL_LIBRARY=/usr/lib/openssl-1.0/libssl.so -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/openssl-1.0/libcrypto.so -DOPENSSL_ROOT_DIR=/usr/lib/openssl-1.0 -DOPENSSL_LIBRARIES=/usr/lib/openssl-1.0
+ cmake .. -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}/usr -DWITH_GUI=OFF
make nvagent
echo ======================== build completed ========================
}
@@ -50,27 +55,20 @@ package() {
#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
+ sudo setcap cap_net_bind_service,cap_net_admin=ep /usr/bin/netvirt-agent2
" > ${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
-
mkdir -p ${pkgdir}/usr/lib/systemd/system
# ArchLinux uses SystemD, Yeah
- cat << EOF > ${pkgdir}/usr/lib/systemd/system/netvirt-agent.service
+ cat << EOF > ${pkgdir}/usr/lib/systemd/system/netvirt-agent2.service
[Unit]
-Description=Netvirt Agent
+Description=Netvirt Agent2
After=network.target
[Service]
Environment="HOME=/root"
-ExecStart=/usr/bin/netvirt-agent
+ExecStart=/usr/bin/netvirt-agent2
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always