2010-03-13 23:25:19 +08:00
|
|
|
pkgname=openvpn
|
2017-06-28 21:34:36 +08:00
|
|
|
pkgver=2.3.17
|
2016-05-13 10:29:28 +08:00
|
|
|
pkgrel=1
|
2010-03-13 23:25:19 +08:00
|
|
|
pkgdesc="An easy-to-use, robust, and highly configurable VPN (Virtual Private Network)"
|
2012-12-16 09:16:25 +08:00
|
|
|
arch=('x86_64')
|
2010-03-13 23:25:19 +08:00
|
|
|
url="http://openvpn.net/index.php/open-source.html"
|
2014-11-10 07:46:32 +08:00
|
|
|
depends=('openssl' 'lzo2' 'iproute2' 'systemd')
|
2017-06-28 21:34:36 +08:00
|
|
|
makedepends=('cmake')
|
2010-03-13 23:25:19 +08:00
|
|
|
license=('custom')
|
2014-11-10 07:46:32 +08:00
|
|
|
backup=(usr/share/openvpn/easy-rsa/vars)
|
2016-05-13 10:29:28 +08:00
|
|
|
source=("http://swupdate.openvpn.net/community/releases/openvpn-${pkgver}.tar.xz"
|
2016-04-01 20:32:46 +08:00
|
|
|
"http://build.openvpn.net/downloads/releases/easy-rsa-2.2.0_master.tar.gz"
|
2012-12-16 09:16:25 +08:00
|
|
|
'openvpn@.service')
|
2017-06-28 21:34:36 +08:00
|
|
|
sha256sums=('d300029416b045666f2dc957bdde407ba97894428b5ad8433df789e793ccc1d3'
|
2014-11-10 07:46:32 +08:00
|
|
|
'd23ddc3a764b40d03ada76f387c92ae4dcf4f5266da54c2bae130325b05eebe2'
|
2016-05-13 10:29:28 +08:00
|
|
|
'47a4ee993f8aaa7370e9a84384fcfc993fd76aa4db11c46629b156d0c5fad49a')
|
2010-03-13 23:25:19 +08:00
|
|
|
|
|
|
|
build() {
|
2014-11-10 07:46:32 +08:00
|
|
|
cd "${srcdir}"/$pkgname-$pkgver
|
|
|
|
CFLAGS="$CFLAGS -DPLUGIN_LIBDIR=\\\"/usr/lib/openvpn\\\"" ./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--enable-password-save \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--enable-iproute2 \
|
2016-05-13 10:29:28 +08:00
|
|
|
--enable-systemd \
|
|
|
|
--enable-x509-alt-username
|
2011-05-02 05:41:40 +08:00
|
|
|
make
|
|
|
|
|
2013-07-20 21:46:18 +08:00
|
|
|
# Build easy-rsa
|
|
|
|
cd $srcdir/easy-rsa-2.2.0_master
|
|
|
|
./configure --prefix=/usr --with-easyrsadir=/usr/share/openvpn/easy-rsa
|
|
|
|
make
|
2011-05-02 05:41:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2014-11-10 07:46:32 +08:00
|
|
|
cd "${srcdir}"/$pkgname-$pkgver
|
2011-05-02 05:41:40 +08:00
|
|
|
# Install openvpn
|
2014-11-10 07:46:32 +08:00
|
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
install -d -m755 "${pkgdir}"/etc/openvpn
|
2010-03-13 23:25:19 +08:00
|
|
|
# Install examples
|
2014-11-10 07:46:32 +08:00
|
|
|
install -d -m755 "${pkgdir}"/usr/share/openvpn
|
|
|
|
cp -r sample/sample-config-files "${pkgdir}"/usr/share/openvpn/examples
|
2010-03-13 23:25:19 +08:00
|
|
|
# Install license
|
2014-11-10 07:46:32 +08:00
|
|
|
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 systemd service
|
|
|
|
install -D -m644 "${srcdir}"/openvpn@.service "${pkgdir}"/usr/lib/systemd/system/openvpn@.service
|
|
|
|
|
2010-03-13 23:25:19 +08:00
|
|
|
# Install easy-rsa
|
2013-07-20 21:46:18 +08:00
|
|
|
cd $srcdir/easy-rsa-2.2.0_master
|
|
|
|
make install DESTDIR=$pkgdir
|
|
|
|
rm -f ${pkgdir}/usr/share/ope
|
2010-03-13 23:25:19 +08:00
|
|
|
}
|