Mail archive
alpine-devel

Re: [alpine-devel] [PATCH] Initial APKBUILD file for xl2tpd

From: William Pitcock <nenolod_at_dereferenced.org>
Date: Sun, 3 Jul 2011 13:12:16 -0500

hi,

On Sat, Jul 2, 2011 at 10:57 AM, Fabian Affolter
<fabian_at_affolter-engineering.ch> wrote:
>
> This package was requested in ticket #699.
>
> Package description
> xl2tpd is an implementation of the Layer 2 Tunnelling Protocol (RFC 2661).
> L2TP allows you to tunnel PPP over UDP. Some ISPs use L2TP to tunnel user
> sessions from dial-in servers (modem banks, ADSL DSLAMs) to back-end PPP
> servers. Another important application is Virtual Private Networks where
> the IPsec protocol is used to secure the L2TP connection (L2TP/IPsec,
> RFC 3193). The L2TP/IPsec protocol is mainly used by Windows and
> Mac OS X clients. On Linux, xl2tpd can be used in combination with IPsec
> implementations such as Openswan.
> ---
>  testing/xl2tpd/APKBUILD     |   46 +++++++++++++++++++++++++++++++++++++++++++
>  testing/xl2tpd/xl2tpd.confd |    7 ++++++
>  testing/xl2tpd/xl2tpd.initd |   31 +++++++++++++++++++++++++++++
>  3 files changed, 84 insertions(+), 0 deletions(-)
>  create mode 100644 testing/xl2tpd/APKBUILD
>  create mode 100644 testing/xl2tpd/xl2tpd.confd
>  create mode 100644 testing/xl2tpd/xl2tpd.initd
>
> diff --git a/testing/xl2tpd/APKBUILD b/testing/xl2tpd/APKBUILD
> new file mode 100644
> index 0000000..80adeb8
> --- /dev/null
> +++ b/testing/xl2tpd/APKBUILD
> _at_@ -0,0 +1,46 @@
> +# Contributor: Fabian Affolter <fabian_at_affolter-engineering.ch>
> +# Maintainer:
> +pkgname=xl2tpd
> +pkgver=1.2.8
> +pkgrel=0
> +pkgdesc="A layer 2 tunneling protocol daemon"
> +url="http://www.xelerance.com/services/software/xl2tpd/"
> +arch="all"
> +license="GPL2"
> +depends="ppp"
> +depends_dev=""
> +makedepends="libpcap-dev"
> +install=""
> +subpackages="$pkgname-doc"
> +source="ftp://ftp.xelerance.com/xl2tpd/$pkgname-$pkgver.tar.gz
> +       $pkgname.initd
> +       $pkgname.confd
> +       "
> +
> +_builddir="$srcdir"/$pkgname-$pkgver
> +
> +build() {
> +       cd "$_builddir"
> +       make || return 1
> +}
> +
> +package() {
> +       cd "$_builddir"
> +       make \
> +               DESTDIR="$pkgdir" \
> +               PREFIX=/usr \
> +               MANDIR="$pkgdir"/usr/share/man \
> +               install || return 1
> +
> +       install -m755 -D "$srcdir"/$pkgname.initd \
> +               "$pkgdir"/etc/init.d/$pkgname || return 1
> +       install -m644 -D "$srcdir"/$pkgname.confd \
> +               "$pkgdir"/etc/conf.d/$pkgname || return 1
> +       # Install sample configuration file
> +       install -m755 -D "$srcdir"/$pkgname-$pkgver/examples/$pkgname.conf \
> +               "$pkgdir"/etc/$pkgname/$pkgname.conf || return 1

if the package example configuration is useful, then you should
install it as a default configuration.

>
> +}
> +
> +md5sums="8748ac5e2f5289963d9a908eede546b5  xl2tpd-1.2.8.tar.gz
> +a6228e5a9894209ba3b0e7ca063fe722  xl2tpd.initd
> +cbcac88f5b728b1441891947a4babbcb  xl2tpd.confd"
> diff --git a/testing/xl2tpd/xl2tpd.confd b/testing/xl2tpd/xl2tpd.confd
> new file mode 100644
> index 0000000..486252b
> --- /dev/null
> +++ b/testing/xl2tpd/xl2tpd.confd
> _at_@ -0,0 +1,7 @@
> +# Sample conf.d file for alpine linux
> +
> +#
> +# Specify daemon options here.
> +#
> +
> +sample_opts=""

this should be renamed to either 'opts' or 'xl2tpd_opts'.  it may be
additionally helpful to list commonly
used options.

>
> diff --git a/testing/xl2tpd/xl2tpd.initd b/testing/xl2tpd/xl2tpd.initd
> new file mode 100644
> index 0000000..4b338c6
> --- /dev/null
> +++ b/testing/xl2tpd/xl2tpd.initd
> _at_@ -0,0 +1,31 @@
> +#!/sbin/runscript
> +
> +# Sample init.d file for alpine linux.

please remove this comment.

> +
> +name=xl2tpd
> +daemon=/usr/sbin/$name
> +user=nobody
> +group=nobody
> +
> +depend() {
> +       need net
> +       after firewall
> +}
> +
> +start() {
> +       ebegin "Starting ${name}"
> +               start-stop-daemon --start --quiet \
> +                       --pidfile /var/run/${name}.pid \
> +                       --chuid ${user}:${group} \
> +                       --exec ${daemon} -- ${sample_opts}

${sample_opts} needs to be renamed to ${xl2tpd_opts} as mentioned above.

> +       eend $?
> +}
> +
> +stop() {
> +       ebegin "Stopping ${name}"
> +               start-stop-daemon --stop --quiet \
> +                       --pidfile /var/run/$name.pid \
> +                       --exec ${daemon}
> +       eend $?
> +}
> +
> --
> 1.7.4.5
>

otherwise it looks fine. however, maintainer field is blank, so it
won't be able to leave testing without a maintainer.

william


---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Sun Jul 03 2011 - 13:12:16 UTC