core/openvpn/PKGBUILD

65 lines
2.1 KiB
Bash
Raw Normal View History

#
# Core packages for Chakra, part of chakra-project.org
#
2013-07-20 21:46:18 +08:00
# maintainer <inkane@chakra-project.org>
# contributor <abveritas[at]chakra-project[dot]org>
2010-03-13 23:25:19 +08:00
pkgname=openvpn
2014-12-03 12:42:30 +08:00
pkgver=2.3.6
pkgrel=1
2010-03-13 23:25:19 +08:00
pkgdesc="An easy-to-use, robust, and highly configurable VPN (Virtual Private Network)"
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')
2013-07-20 21:46:18 +08:00
makedepends=('systemd')
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)
2013-07-20 21:46:18 +08:00
source=(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{,.asc}
'openvpn@.service')
sha256sums=('7baed2ff39c12e1a1a289ec0b46fcc49ff094ca58b8d8d5f29b36ac649ee5b26'
2014-11-10 07:46:32 +08:00
'SKIP'
'd23ddc3a764b40d03ada76f387c92ae4dcf4f5266da54c2bae130325b05eebe2'
'SKIP'
'4696aefe672b4a2e3e201d3c2c0211b08e87a3a1a039788013846629a79ec6fd')
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 \
--enable-systemd
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
}