diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-12-27 23:55:53 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-12-27 23:55:53 +0000 |
commit | 65eeff79fff8a1bfdf67ca51d147384f46f4d5c0 (patch) | |
tree | fbfdff322b28d9a3c37e6e31c94caf1d8e48dac1 /core/openvpn | |
parent | d53c44f055929b18d7d1b25f8367ee5836c435fc (diff) |
Fri Dec 27 23:54:04 UTC 2013
Diffstat (limited to 'core/openvpn')
-rw-r--r-- | core/openvpn/PKGBUILD | 50 | ||||
-rw-r--r-- | core/openvpn/openvpn-2.3.0-fix-systemd-ask-password-path.patch | 11 | ||||
-rw-r--r-- | core/openvpn/openvpn.install | 8 | ||||
-rw-r--r-- | core/openvpn/openvpn@.service | 1 |
4 files changed, 25 insertions, 45 deletions
diff --git a/core/openvpn/PKGBUILD b/core/openvpn/PKGBUILD index 47050c051..cce0d84ec 100644 --- a/core/openvpn/PKGBUILD +++ b/core/openvpn/PKGBUILD @@ -1,34 +1,25 @@ -# $Id: PKGBUILD 197835 2013-10-30 11:06:16Z allan $ +# $Id: PKGBUILD 199780 2013-11-16 09:28:42Z thomas $ # Maintainer: Thomas Bächler <thomas@archlinux.org> pkgname=openvpn pkgver=2.3.2 -pkgrel=1 +pkgrel=2 pkgdesc="An easy-to-use, robust, and highly configurable VPN (Virtual Private Network)" arch=(i686 x86_64) url="http://openvpn.net/index.php/open-source.html" depends=('openssl' 'lzo2' 'iproute2') makedepends=('systemd') license=('custom') -backup=(usr/share/openvpn/easy-rsa/vars - usr/share/openvpn/easy-rsa/openssl-1.0.0.cnf) +install=openvpn.install source=(http://swupdate.openvpn.net/community/releases/openvpn-${pkgver}.tar.gz http://swupdate.openvpn.net/community/releases/openvpn-${pkgver}.tar.gz.asc - http://build.openvpn.net/downloads/releases/easy-rsa-2.2.0_master.tar.gz - http://build.openvpn.net/downloads/releases/easy-rsa-2.2.0_master.tar.gz.asc - openvpn@.service - openvpn-2.3.0-fix-systemd-ask-password-path.patch) + openvpn@.service) md5sums=('06e5f93dbf13f2c19647ca15ffc23ac1' 'SKIP' - 'fbf818b6e1f212e77b9ce0e6d92584a1' - 'SKIP' - '57ef7353ba2c28c04dfc387c3ca77a4f' - 'e1bd1523e38745e948c710db1a330bb1') + '71fab8d1c2aa3a1f2609e259eaaf88b3') build() { - cd $srcdir/$pkgname-$pkgver - patch -p0 -i $srcdir/openvpn-2.3.0-fix-systemd-ask-password-path.patch - # Build openvpn + cd "${srcdir}"/$pkgname-$pkgver CFLAGS="$CFLAGS -DPLUGIN_LIBDIR=\\\"/usr/lib/openvpn\\\"" ./configure \ --prefix=/usr \ --sbindir=/usr/bin \ @@ -37,29 +28,22 @@ build() { --enable-iproute2 \ --enable-systemd make - # Build easy-rsa - cd $srcdir/easy-rsa-2.2.0_master - ./configure --prefix=/usr --with-easyrsadir=/usr/share/openvpn/easy-rsa - make } package() { - cd $srcdir/$pkgname-$pkgver + cd "${srcdir}"/$pkgname-$pkgver # Install openvpn - make DESTDIR=$pkgdir install - install -d -m755 $pkgdir/etc/openvpn + make DESTDIR="${pkgdir}" install + install -d -m755 "${pkgdir}"/etc/openvpn # Install examples - install -d -m755 $pkgdir/usr/share/openvpn - cp -r sample/sample-config-files $pkgdir/usr/share/openvpn/examples + install -d -m755 "${pkgdir}"/usr/share/openvpn + cp -r sample/sample-config-files "${pkgdir}"/usr/share/openvpn/examples # Install license - install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING + install -d -m755 "${pkgdir}"/usr/share/licenses/${pkgname}/ + ln -sf /usr/share/doc/${pkgname}/{COPYING,COPYRIGHT.GPL} "${pkgdir}"/usr/share/licenses/${pkgname}/ # Install contrib - install -d -m755 $pkgdir/usr/share/openvpn/contrib - cp -r contrib $pkgdir/usr/share/openvpn - # Install easy-rsa - cd $srcdir/easy-rsa-2.2.0_master - make install DESTDIR=$pkgdir - rm -f ${pkgdir}/usr/share/openvpn/easy-rsa/openssl-0.9.?.cnf - # Install rc scripts - install -D -m644 $srcdir/openvpn@.service $pkgdir/usr/lib/systemd/system/openvpn@.service + install -d -m755 "${pkgdir}"/usr/share/openvpn/contrib + cp -r contrib "${pkgdir}"/usr/share/openvpn + # Install systemd service + install -D -m644 "${srcdir}"/openvpn@.service "${pkgdir}"/usr/lib/systemd/system/openvpn@.service } diff --git a/core/openvpn/openvpn-2.3.0-fix-systemd-ask-password-path.patch b/core/openvpn/openvpn-2.3.0-fix-systemd-ask-password-path.patch deleted file mode 100644 index 77291727a..000000000 --- a/core/openvpn/openvpn-2.3.0-fix-systemd-ask-password-path.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/openvpn/console.c.orig 2013-01-30 09:42:57.480257300 +0100 -+++ src/openvpn/console.c 2013-01-30 09:43:07.446179811 +0100 -@@ -162,7 +162,7 @@ get_console_input_systemd (const char *p - struct argv argv; - - argv_init (&argv); -- argv_printf (&argv, "/bin/systemd-ask-password"); -+ argv_printf (&argv, "/usr/bin/systemd-ask-password"); - argv_printf_cat (&argv, "%s", prompt); - - if ((std_out = openvpn_popen (&argv, NULL)) < 0) { diff --git a/core/openvpn/openvpn.install b/core/openvpn/openvpn.install new file mode 100644 index 000000000..5fd3285cb --- /dev/null +++ b/core/openvpn/openvpn.install @@ -0,0 +1,8 @@ +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + if [ $(vercmp 2.3.2-1 $2) -ge 0 ]; then + echo ">>> easy-rsa has moved into its own package. Run:" + echo ">>> # pacman -S easy-rsa" + fi +} diff --git a/core/openvpn/openvpn@.service b/core/openvpn/openvpn@.service index 63fdf0e36..de456266f 100644 --- a/core/openvpn/openvpn@.service +++ b/core/openvpn/openvpn@.service @@ -1,6 +1,5 @@ [Unit] Description=OpenVPN connection to %i -After=network.target [Service] Type=forking |