core/openvpn/PKGBUILD

68 lines
2.2 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
2013-07-20 21:46:18 +08:00
pkgver=2.3.2
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"
depends=('openssl' 'lzo2' 'iproute2')
2013-07-20 21:46:18 +08:00
makedepends=('systemd')
2010-03-13 23:25:19 +08:00
license=('custom')
backup=(usr/share/openvpn/easy-rsa/vars
usr/share/openvpn/easy-rsa/openssl.cnf
etc/conf.d/openvpn-tapdev)
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-2.3.0-fix-systemd-ask-password-path.patch"
'openvpn@.service')
2013-07-20 21:46:18 +08:00
md5sums=('06e5f93dbf13f2c19647ca15ffc23ac1'
'7203a3f37b9a4351411429c96a3b089b'
'fbf818b6e1f212e77b9ce0e6d92584a1'
'46df49b85f9850fec287e311279bdbef'
'e1bd1523e38745e948c710db1a330bb1'
2012-06-24 21:16:00 +08:00
'44047df812a3fcd57a7e36a61732a9b9')
2010-03-13 23:25:19 +08:00
build() {
cd $srcdir/$pkgname-$pkgver
2013-07-20 21:46:18 +08:00
patch -p0 -i $srcdir/openvpn-2.3.0-fix-systemd-ask-password-path.patch
2011-05-02 05:41:40 +08:00
# Build openvpn
CFLAGS="$CFLAGS -DPLUGIN_LIBDIR=\\\"/usr/lib/openvpn\\\""
./configure --prefix=/usr \
--enable-password-save \
--mandir=/usr/share/man \
2013-07-20 21:46:18 +08:00
--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() {
cd $srcdir/$pkgname-$pkgver
# Install openvpn
make DESTDIR=$pkgdir install
2010-03-13 23:25:19 +08:00
install -d -m755 $pkgdir/etc/openvpn
# Install examples
install -d -m755 $pkgdir/usr/share/openvpn
2013-07-20 21:46:18 +08:00
cp -r sample/sample-config-files $pkgdir/usr/share/openvpn/examples
2010-03-13 23:25:19 +08:00
find $pkgdir/usr/share/openvpn -type f -exec chmod 644 {} \;
find $pkgdir/usr/share/openvpn -type d -exec chmod 755 {} \;
# Install license
2011-05-02 05:41:40 +08:00
install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
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
2012-06-24 21:16:00 +08:00
# install systemd units
install -Dm644 "$srcdir/openvpn@.service" "$pkgdir/usr/lib/systemd/system/openvpn@.service"
2010-03-13 23:25:19 +08:00
}