diff options
author | Christian Hesse | 2016-11-27 13:31:03 +0100 |
---|---|---|
committer | Christian Hesse | 2016-11-27 13:31:03 +0100 |
commit | c2b78348798cfc1823ba0675d2bf16a51cddcb7a (patch) | |
tree | 76b9e4ab37bd16d2b91ad0f1f83455e03c81d52a /PKGBUILD | |
parent | 6831caf7724d088243bafdf6a99a3042e59bf40d (diff) | |
download | aur-c2b78348798cfc1823ba0675d2bf16a51cddcb7a.tar.gz |
commit openvpn-git 2.4.beta2.r0.g9bc2be7-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 57 |
1 files changed, 37 insertions, 20 deletions
@@ -1,11 +1,11 @@ # Maintainer: Christian Hesse <mail@eworm.de> pkgname=openvpn-git -pkgver=2.4.beta1.r1.g237fd7f +pkgver=2.4.beta2.r0.g9bc2be7 pkgrel=1 -pkgdesc="An easy-to-use, robust, and highly configurable VPN (Virtual Private Network) - git checkout" +pkgdesc='An easy-to-use, robust and highly configurable VPN (Virtual Private Network) - git checkout' arch=(i686 x86_64) -url="http://openvpn.net/index.php/open-source.html" +url='http://openvpn.net/index.php/open-source.html' depends=('openssl' 'lzo' 'snappy' 'lz4' 'iproute2' 'libsystemd' 'pkcs11-helper') optdepends=('easy-rsa: easy CA and certificate handling') makedepends=('git' 'systemd') @@ -13,8 +13,10 @@ conflicts=('openvpn' 'openvpn-dev') provides=('openvpn=2.4.0' 'openvpn-dev') license=('custom') # for 2.3.x release branch use: git://git.code.sf.net/p/openvpn/openvpn#branch=release/2.3 -source=('git://git.code.sf.net/p/openvpn/openvpn') -sha256sums=('SKIP') +source=('git://git.code.sf.net/p/openvpn/openvpn' + '0001-systemd.patch') +sha256sums=('SKIP' + '21d09aea89ab3c61239ab4f619ba5885bbd89a45424efb249b108877ed03529e') pkgver() { cd openvpn/ @@ -31,44 +33,59 @@ pkgver() { fi } +prepare() { + cd openvpn/ + + # modifications to upstream systemd units + patch -Np1 < "${srcdir}"/0001-systemd.patch +} + build() { cd openvpn/ - # Build openvpn autoreconf -vi - CFLAGS="${CFLAGS} -DPLUGIN_LIBDIR=\\\"/usr/lib/openvpn\\\"" ./configure \ + CFLAGS="${CFLAGS} -DPLUGIN_LIBDIR=\\\"/usr/lib/openvpn/plugins\\\"" \ + ./configure \ --prefix=/usr \ --sbindir=/usr/bin \ - --enable-password-save \ - --mandir=/usr/share/man \ --enable-iproute2 \ - --enable-systemd \ + --enable-password-save \ --enable-pkcs11 \ + --enable-plugins \ + --enable-systemd \ --enable-x509-alt-username make } +check() { + cd openvpn/ + + make check +} + package() { cd openvpn/ # Install openvpn - make DESTDIR=${pkgdir} install - install -d -m0755 ${pkgdir}/etc/openvpn + make DESTDIR="${pkgdir}" install + + # Create empty configuration directory + install -d -m0750 -g 90 "${pkgdir}"/etc/openvpn/{client,server} # Install examples - install -d -m0755 ${pkgdir}/usr/share/openvpn - cp -r sample/sample-config-files ${pkgdir}/usr/share/openvpn/examples + install -d -m0755 "${pkgdir}"/usr/share/openvpn + cp -r sample/sample-config-files "${pkgdir}"/usr/share/openvpn/examples # Install license - install -d -m0755 ${pkgdir}/usr/share/licenses/openvpn - ln -sf /usr/share/doc/${pkgname}/{COPYING,COPYRIGHT.GPL} ${pkgdir}/usr/share/licenses/openvpn + install -d -m0755 "${pkgdir}"/usr/share/licenses/openvpn + ln -sf /usr/share/doc/"${pkgname}"/{COPYING,COPYRIGHT.GPL} "${pkgdir}"/usr/share/licenses/openvpn # Install contrib - install -d -m0755 ${pkgdir}/usr/share/openvpn/contrib - cp -r contrib ${pkgdir}/usr/share/openvpn + install -d -m0755 "${pkgdir}"/usr/share/openvpn/contrib + cp -r contrib "${pkgdir}"/usr/share/openvpn # Install systemd services - install -D -m0644 distro/systemd/openvpn-client@.service ${pkgdir}/usr/lib/systemd/system/openvpn-client@.service - install -D -m0644 distro/systemd/openvpn-server@.service ${pkgdir}/usr/lib/systemd/system/openvpn-server@.service + install -d -m0755 "${pkgdir}"/usr/lib/systemd/system/ + install -m0644 distro/systemd/openvpn-{client,server}@.service "${pkgdir}"/usr/lib/systemd/system/ } |