diff options
author | Christian Hesse | 2016-12-15 20:25:32 +0100 |
---|---|---|
committer | Christian Hesse | 2016-12-15 20:25:32 +0100 |
commit | c47e7f6081c20d34f0ba3705aa2cf70c6278921d (patch) | |
tree | defb9fda9619f7cb5bc4a07ac7bc199ba66989e7 /PKGBUILD | |
download | aur-openvpn-radiusplugin-git.tar.gz |
commit openvpn-radiusplugin-git 2.2.r1.g79d9869-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0f5546f30e28 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Christian Hesse <mail@eworm.de> + +pkgname=openvpn-radiusplugin-git +pkgver=2.2.r1.g79d9869 +pkgrel=1 +pkgdesc='Radiusplugin for OpenVPN - git checkout' +url='https://github.com/ValdikSS/openvpn-radiusplugin' +arch=('i686' 'x86_64') +depends=('libgcrypt' 'openvpn') +makedepends=('git') +conflicts=('openvpn-radiusplugin') +provides=('openvpn-radiusplugin') +source=("git://github.com/ValdikSS/openvpn-radiusplugin.git") +sha256sums=('SKIP') + +pkgver() { + cd openvpn-radiusplugin/ + + if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then + printf '%s.r%s.g%s' \ + "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG})" \ + "$(git rev-list --count ${GITTAG}..)" \ + "$(git log -1 --format='%h')" + else + printf '0.r%s.g%s' \ + "$(git rev-list --count master)" \ + "$(git log -1 --format='%h')" + fi +} + +build() { + cd openvpn-radiusplugin/ + + make +} + +package() { + cd openvpn-radiusplugin/ + + install -Dm0755 radiusplugin.so "${pkgdir}"/usr/lib/openvpn/plugins/radiusplugin.so + install -Dm0644 radiusplugin.cnf "${pkgdir}"/usr/share/openvpn/examples/radiusplugin.cnf +} |