diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/atomic-ops/APKBUILD | 27 | ||||
-rw-r--r-- | testing/lua-discount/APKBUILD | 22 | ||||
-rw-r--r-- | testing/openvpn/APKBUILD | 55 | ||||
-rw-r--r-- | testing/openvpn/openvpn.initd | 63 |
4 files changed, 167 insertions, 0 deletions
diff --git a/testing/atomic-ops/APKBUILD b/testing/atomic-ops/APKBUILD new file mode 100644 index 0000000000..aff442f512 --- /dev/null +++ b/testing/atomic-ops/APKBUILD @@ -0,0 +1,27 @@ +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=atomic-ops +pkgver=1.2_p20080819 +_realver=1.2+cvs20080819 +pkgrel=0 +pkgdesc="A library for atomic operations" +url="http://www.hpl.hp.com/research/linux/atomic_ops/download.php4" +license="GPL" +depends="" +makedepends="" +install= +subpackages= +source="http://ftp.de.debian.org/debian/pool/main/liba/libatomic-ops/libatomic-ops_$_realver.orig.tar.gz" + +build() { + cd "$srcdir"/libatomic_ops-${pkgver%_p*} + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + make || return 1 + make DESTDIR="$pkgdir" install +} + +md5sums="bf26c062f28796e3daaab586a38abec1 libatomic-ops_1.2+cvs20080819.orig.tar.gz" diff --git a/testing/lua-discount/APKBUILD b/testing/lua-discount/APKBUILD new file mode 100644 index 0000000000..9fe7cfd373 --- /dev/null +++ b/testing/lua-discount/APKBUILD @@ -0,0 +1,22 @@ +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=lua-discount +pkgver=1.2.10.1 +pkgrel=0 +pkgdesc="Lua binding to discount, a Markdown implementation in C" +url="http://asbradbury.org/projects/lua-discount" +license="BSD" +depends="lua" +makedepends="lua-dev" +install= +subpackages= +source="http://luaforge.net/frs/download.php/3758/lua-discount-1.2.10.1.tar.gz" + +build() { + cd "$srcdir"/$pkgname-$pkgver + + make || return 1 + install -D -m644 discount.so "$pkgdir"/usr/lib/lua/5.1/discount.so +} + +md5sums="7dc7055816dc755aacb48bfd5eb2eb5b lua-discount-1.2.10.1.tar.gz" diff --git a/testing/openvpn/APKBUILD b/testing/openvpn/APKBUILD new file mode 100644 index 0000000000..2c38df4c84 --- /dev/null +++ b/testing/openvpn/APKBUILD @@ -0,0 +1,55 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=openvpn +pkgver=2.1_rc19 +pkgrel=0 +pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)" +url="http://openvpn.sourceforge.net/" +license="custom" +subpackages="$pkgname-doc" +depends="iproute2" +makedepends="openssl-dev lzo-dev" +install= +source="http://$pkgname.net/release/$pkgname-$pkgver.tar.gz + openvpn.initd + " + +build() { + cd "$srcdir"/$pkgname-$pkgver + + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --enable-ssl \ + --enable-crypto \ + --disable-threads \ + --enable-iproute2 + + make || return 1 + + cd plugin/down-root + make || return 1 + cd ../.. + + make DESTDIR="$pkgdir" install || return 1 + + # install plugins + install -d "$pkgdir"/usr/lib/$pkgname + cp plugin/*/*.so "$pkgdir"/usr/lib/$pkgname + + # install easy-rsa + sed -i -e 's/--directory/-d/g; s/--mode=/-m/g' easy-rsa/2.0/Makefile + sed -i -e '1s|#!/bin/bash|#!/bin/sh|' easy-rsa/2.0/* + make -C easy-rsa/2.0 DESTDIR="$pkgdir" \ + PREFIX=etc/openvpn/easy-rsa \ + install + + # install examples + mkdir -p "$pkgdir"/usr/share/doc/$pkgname/examples + cp -a sample-config-files "$pkgdir"/usr/share/doc/$pkgname/examples + install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING + + # install init.d + install -Dm755 ../openvpn.initd "$pkgdir"/etc/init.d/openvpn + +} +md5sums="ba2ee667a8b7606b125b7d32f47ca578 openvpn-2.1_rc19.tar.gz +10390247d1fdc4fd1ebec1ebae8872be openvpn.initd" diff --git a/testing/openvpn/openvpn.initd b/testing/openvpn/openvpn.initd new file mode 100644 index 0000000000..a6e4529e1c --- /dev/null +++ b/testing/openvpn/openvpn.initd @@ -0,0 +1,63 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +VPNDIR="/etc/openvpn" +VPN="${SVCNAME#*.}" +if [ -n "${VPN}" ] && [ "${SVCNAME}" != "openvpn" ]; then + VPNPID="/var/run/openvpn.${VPN}.pid" +else + VPNPID="/var/run/openvpn.pid" +fi +VPNCONF="${VPNDIR}/${VPN}.conf" + +depend() { + need localmount net + before netmount + after bootmisc +} + +checktundevice() { + if [ ! -e /dev/net/tun ]; then + if ! modprobe tun ; then + eerror "TUN/TAP support is not available in this kernel" + return 1 + fi + fi + if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then + ebegin "Detected broken /dev/net/tun symlink, fixing..." + rm -f /dev/net/tun + ln -s /dev/misc/net/tun /dev/net/tun + eend $? + fi +} + +start() { + ebegin "Starting ${SVCNAME}" + + checktundevice || return 1 + + if [ ! -e "${VPNCONF}" ]; then + eend 1 "${VPNCONF} does not exist" + return 1 + fi + + local args="" + # If the config file does not specify the cd option, we do + # But if we specify it, we override the config option which we do not want + if ! grep -q "^[ \t]*cd[ \t].*" "${VPNCONF}" ; then + args="${args} --cd ${VPNDIR}" + fi + + start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \ + -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon ${args} + eend $? "Check your logs to see why startup failed" +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec /usr/sbin/openvpn --pidfile "${VPNPID}" + eend $? +} + +# vim: ts=4 |