summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2012-03-09 14:14:18 +0000
committerFabian Affolter <fabian@affolter-engineering.ch>2012-03-09 14:14:18 +0000
commitf43c7bfc8aea4be004ca2907491e18fac1d6ea86 (patch)
tree97dff11e37e9a30275c8af0ca423138ee8d18012 /testing
parentd2ee3e5212c39a5a5bae4078ff3592f8d874147d (diff)
parentfdc032ee84a0277f1e2b444deb489cda1ad76ae6 (diff)
downloadaports-f43c7bfc8aea4be004ca2907491e18fac1d6ea86.tar.bz2
aports-f43c7bfc8aea4be004ca2907491e18fac1d6ea86.tar.xz
Merge branch 'master' of git://git.alpinelinux.org/aports
Diffstat (limited to 'testing')
-rw-r--r--testing/bind/APKBUILD122
-rw-r--r--testing/bind/bind.127.zone11
-rw-r--r--testing/bind/bind.conf53
-rw-r--r--testing/bind/bind.confd8
-rw-r--r--testing/bind/bind.initd90
-rw-r--r--testing/bind/bind.localhost.zone11
-rw-r--r--testing/bind/bind.named.ca85
-rw-r--r--testing/bind/bind.pre-install6
-rw-r--r--testing/bind/bind.so_bsdcompat.patch11
-rw-r--r--testing/bonding/APKBUILD43
-rwxr-xr-xtesting/bonding/bonding.post-down64
-rwxr-xr-xtesting/bonding/bonding.pre-up141
-rwxr-xr-xtesting/bonding/bonding.up45
-rw-r--r--testing/libdvdnav/APKBUILD40
-rw-r--r--testing/libdvdread/APKBUILD40
-rw-r--r--testing/libebml/APKBUILD38
-rw-r--r--testing/libmatroska/APKBUILD38
-rw-r--r--testing/vlan/APKBUILD47
-rw-r--r--testing/vlan/mvlan.post-down14
-rw-r--r--testing/vlan/mvlan.pre-up14
-rw-r--r--testing/vlan/vlan.post-down27
-rw-r--r--testing/vlan/vlan.pre-up57
-rw-r--r--testing/vlc/APKBUILD216
-rw-r--r--testing/vlc/uclibc-inhibit-spawn.patch76
-rw-r--r--testing/vlc/uclibc-no-xscreensaver.patch18
-rw-r--r--testing/vlc/uclibc3.patch38
-rw-r--r--testing/vlc/vlc-1.1.7-disable-cache-gen.patch12
-rw-r--r--testing/vlc/vlc-daemon.pre-install13
-rw-r--r--testing/vlc/vlc.confd11
-rwxr-xr-xtesting/vlc/vlc.initd22
-rw-r--r--testing/vlc/vlc.trigger4
-rw-r--r--testing/xf86-video-openchrome/APKBUILD18
32 files changed, 863 insertions, 570 deletions
diff --git a/testing/bind/APKBUILD b/testing/bind/APKBUILD
new file mode 100644
index 000000000..c2c81775f
--- /dev/null
+++ b/testing/bind/APKBUILD
@@ -0,0 +1,122 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=bind
+pkgver=9.9.0
+_ver=${pkgver%_p*}
+_p=${pkgver#*_p}
+[ "$_p" != "$pkgver" ] && _ver="${_ver}-P$_p"
+pkgrel=0
+pkgdesc="BIND - Berkeley Internet Name Domain - Name Server and tools"
+url="http://www.isc.org"
+arch="all"
+license="as-is"
+depends=
+pkgusers="named"
+pkggroups="named"
+makedepends="openssl-dev perl"
+install="$pkgname.pre-install"
+subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-tools"
+source="http://ftp.isc.org/isc/bind9/${_ver}/bind-${_ver}.tar.gz
+ bind.so_bsdcompat.patch
+ $pkgname.initd
+ $pkgname.confd
+ $pkgname.conf
+ $pkgname.127.zone
+ $pkgname.localhost.zone
+ $pkgname.named.ca
+ "
+
+_builddir="$srcdir/bind-${_ver}"
+
+prepare() {
+ cd "$_builddir"
+
+ ### http://bugs.gentoo.org/show_bug.cgi?id=227333
+ export CFLAGS="$CFLAGS -D_GNU_SOURCE"
+
+ # Adjusting PATHs in manpages
+ for i in bin/named/named.8 bin/check/named-checkconf.8 bin/rndc/rndc.8; do
+ sed -i \
+ -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
+ -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
+ -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
+ "${i}" || return 1
+ done
+
+ patch -p0 -i "$srcdir"/bind.so_bsdcompat.patch || return 1
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/bind \
+ --localstatedir=/var \
+ --with-openssl=/usr \
+ --disable-linux-caps \
+ --without-libxml2 \
+ --disable-threads \
+ --enable-ipv6 \
+ --enable-shared \
+ --enable-static \
+ --with-libtool \
+ --with-randomdev=/dev/random \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -d -m0770 -g named -o root "$pkgdir"/var/bind \
+ "$pkgdir"/var/bind/sec \
+ "$pkgdir"/var/bind/dyn \
+ "$pkgdir"/var/run/named \
+ "$pkgdir"/var/log/named \
+ || return 1
+
+ install -d -m0750 -g named -o root "$pkgdir"/etc/bind \
+ "$pkgdir"/var/bind/pri || return 1
+
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+
+ install -Dm755 "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/named || return 1
+ install -Dm644 "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/named || return 1
+ install -Dm644 "$srcdir"/$pkgname.conf \
+ "$pkgdir"/etc/bind/named.conf || return 1
+ install -Dm644 "$srcdir"/$pkgname.named.ca \
+ "$pkgdir"/var/bind/named.ca || return 1
+ install -Dm644 "$srcdir"/$pkgname.127.zone \
+ "$pkgdir"/var/bind/pri/127.zone || return 1
+ install -Dm644 "$srcdir"/$pkgname.localhost.zone \
+ "$pkgdir"/var/bind/pri/localhost.zone || return 1
+ cd "$pkgdir"/var/bind
+ ln -s named.ca root.cache || return 1
+}
+
+libs() {
+ install=
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
+}
+
+tools() {
+ install=
+ depends=
+ mkdir -p "$subpkgdir"/usr/bin
+ for i in dig host nslookup nsupdate; do
+ mv "$pkgdir"/usr/bin/${i} "$subpkgdir"/usr/bin/ || return 1
+ done
+}
+
+md5sums="9281d0b04f711d28153ba1ab04a54026 bind-9.9.0.tar.gz
+f270a5b0a28ab6e818840c5c368ddbcc bind.so_bsdcompat.patch
+da52267d5d56317d08c0fb170fc14da8 bind.initd
+418a367cecfdf8760c92235d3967867e bind.confd
+be5fd752bdbd59385f2a559d603098d5 bind.conf
+a7455b009b7fccd74ac6f6eaa6902a00 bind.127.zone
+c3220168fabfb31a25e8c3a545545e34 bind.localhost.zone
+a94e29ac677846f3d4d618c50b7d34f1 bind.named.ca"
diff --git a/testing/bind/bind.127.zone b/testing/bind/bind.127.zone
new file mode 100644
index 000000000..2ad28de52
--- /dev/null
+++ b/testing/bind/bind.127.zone
@@ -0,0 +1,11 @@
+$ORIGIN 127.in-addr.arpa.
+$TTL 1W
+@ 1D IN SOA localhost. root.localhost. (
+ 2002081601 ; serial
+ 3H ; refresh
+ 15M ; retry
+ 1W ; expiry
+ 1D ) ; minimum
+
+ 1D IN NS localhost.
+1 1D IN PTR localhost.
diff --git a/testing/bind/bind.conf b/testing/bind/bind.conf
new file mode 100644
index 000000000..d58c61bde
--- /dev/null
+++ b/testing/bind/bind.conf
@@ -0,0 +1,53 @@
+options {
+ directory "/var/bind";
+
+ // uncomment the following lines to turn on DNS forwarding,
+ // and change the forwarding ip address(es) :
+ //forward first;
+ //forwarders {
+ // 123.123.123.123;
+ // 123.123.123.123;
+ //};
+
+ listen-on-v6 { none; };
+ listen-on { 127.0.0.1; };
+
+ // to allow only specific hosts to use the DNS server:
+ //allow-query {
+ // 127.0.0.1;
+ //};
+
+ // if you have problems and are behind a firewall:
+ //query-source address * port 53;
+ pid-file "/var/run/named/named.pid";
+};
+
+// Briefly, a zone which has been declared delegation-only will be effectively
+// limited to containing NS RRs for subdomains, but no actual data beyond its
+// own apex (for example, its SOA RR and apex NS RRset). This can be used to
+// filter out "wildcard" or "synthesized" data from NAT boxes or from
+// authoritative name servers whose undelegated (in-zone) data is of no
+// interest.
+// See http://www.isc.org/products/BIND/delegation-only.html for more info
+
+//zone "COM" { type delegation-only; };
+//zone "NET" { type delegation-only; };
+
+zone "." IN {
+ type hint;
+ file "named.ca";
+};
+
+zone "localhost" IN {
+ type master;
+ file "pri/localhost.zone";
+ allow-update { none; };
+ notify no;
+};
+
+zone "127.in-addr.arpa" IN {
+ type master;
+ file "pri/127.zone";
+ allow-update { none; };
+ notify no;
+};
diff --git a/testing/bind/bind.confd b/testing/bind/bind.confd
new file mode 100644
index 000000000..a9af5676f
--- /dev/null
+++ b/testing/bind/bind.confd
@@ -0,0 +1,8 @@
+# Set various named options here.
+OPTS=""
+
+# Set this to the number of processors you have.
+# CPU="1"
+
+# Scheduling priority: 19 is the lowest and -20 is the highest.
+# NICELEVEL="0"
diff --git a/testing/bind/bind.initd b/testing/bind/bind.initd
new file mode 100644
index 000000000..fa9ffb343
--- /dev/null
+++ b/testing/bind/bind.initd
@@ -0,0 +1,90 @@
+#!/sbin/runscript
+
+extra_commands="checkconfig checkzones"
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use logger
+ provide dns
+}
+
+: ${NAMED_CONF:=/etc/bind/named.conf}
+
+depend() {
+ need net
+ after firewall
+ use logger
+ provide dns
+}
+
+_get_pidfile() {
+ [ -n "${PIDFILE}" ] || PIDFILE=$(\
+ /usr/sbin/named-checkconf -p ${NAMED_CONF} | grep 'pid-file' | cut -d\" -f2)
+ [ -z "${PIDFILE}" ] && PIDFILE=/var/run/named/named.pid
+}
+
+checkconfig() {
+ ebegin "Checking named configuration"
+
+ if [ ! -f "${NAMED_CONF}" ] ; then
+ eerror "No ${NAMED_CONF} file exists!"
+ return 1
+ fi
+
+ /usr/sbin/named-checkconf ${NAMED_CONF} || {
+ eerror "named-checkconf failed! Please fix your config first."
+ return 1
+ }
+ eend 0
+ return 0
+}
+
+checkzones() {
+ ebegin "Checking named configuration and zones"
+ /usr/sbin/named-checkconf -z -j ${NAMED_CONF}
+ eend $?
+}
+
+start() {
+ local piddir
+ ebegin "Starting named"
+ _get_pidfile
+ piddir="${PIDFILE%/*}"
+ if [ ! -d "${piddir}" ]; then
+ checkpath -q -d -o root:named -m 0770 "${piddir}" || {
+ eend 1
+ return 1
+ }
+ fi
+
+ checkconfig || { eend 1; return 1; }
+
+ # create piddir (usually /var/run/named) if necessary, bug 334535
+ _get_pidfile
+ piddir="${PIDFILE%/*}"
+ if [ ! -d "${piddir}" ]; then
+ checkpath -q -d -o root:named -m 0770 "${piddir}" || {
+ eend 1
+ return 1
+ }
+ fi
+
+ # In case someone have $CPU set in /etc/conf.d/named
+ if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then
+ CPU="-n ${CPU}"
+ fi
+
+ start-stop-daemon --start --pidfile ${PIDFILE} \
+ --nicelevel ${NICELEVEL:-0} \
+ --exec /usr/sbin/named \
+ -- -u named ${CPU} ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping named"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ eend $?
+}
+
diff --git a/testing/bind/bind.localhost.zone b/testing/bind/bind.localhost.zone
new file mode 100644
index 000000000..338d7050c
--- /dev/null
+++ b/testing/bind/bind.localhost.zone
@@ -0,0 +1,11 @@
+$TTL 1W
+@ IN SOA ns.localhost. root.localhost. (
+ 2002081601 ; Serial
+ 28800 ; Refresh
+ 14400 ; Retry
+ 604800 ; Expire - 1 week
+ 86400 ) ; Minimum
+@ IN NS ns
+ns IN A 127.0.0.1
+
+ns IN AAAA ::1
diff --git a/testing/bind/bind.named.ca b/testing/bind/bind.named.ca
new file mode 100644
index 000000000..902a7047f
--- /dev/null
+++ b/testing/bind/bind.named.ca
@@ -0,0 +1,85 @@
+; This file holds the information on root name servers needed to
+; initialize cache of Internet domain name servers
+; (e.g. reference this file in the "cache . <file>"
+; configuration file of BIND domain name servers).
+;
+; This file is made available by InterNIC
+; under anonymous FTP as
+; file /domain/named.root
+; on server FTP.INTERNIC.NET
+; -OR- RS.INTERNIC.NET
+;
+; last update: Feb 04, 2008
+; related version of root zone: 2008020400
+;
+; formerly NS.INTERNIC.NET
+;
+. 3600000 IN NS A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
+A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30
+;
+; formerly NS1.ISI.EDU
+;
+. 3600000 NS B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
+;
+; formerly C.PSI.NET
+;
+. 3600000 NS C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
+;
+; formerly TERP.UMD.EDU
+;
+. 3600000 NS D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
+;
+; formerly NS.NASA.GOV
+;
+. 3600000 NS E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
+;
+; formerly NS.ISC.ORG
+;
+. 3600000 NS F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
+F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
+;
+; formerly NS.NIC.DDN.MIL
+;
+. 3600000 NS G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
+;
+; formerly AOS.ARL.ARMY.MIL
+;
+. 3600000 NS H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
+H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803f:235
+;
+; formerly NIC.NORDU.NET
+;
+. 3600000 NS I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
+;
+; operated by VeriSign, Inc.
+;
+. 3600000 NS J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
+J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30
+;
+; operated by RIPE NCC
+;
+. 3600000 NS K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
+K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
+;
+; operated by ICANN
+;
+. 3600000 NS L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
+;
+; operated by WIDE
+;
+. 3600000 NS M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
+M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
+; End of File
diff --git a/testing/bind/bind.pre-install b/testing/bind/bind.pre-install
new file mode 100644
index 000000000..e0a615ef0
--- /dev/null
+++ b/testing/bind/bind.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S named 2>/dev/null
+adduser -h /etc/bind -s /bin/false -G named -D named 2>/dev/null
+exit 0
+
diff --git a/testing/bind/bind.so_bsdcompat.patch b/testing/bind/bind.so_bsdcompat.patch
new file mode 100644
index 000000000..83120f77d
--- /dev/null
+++ b/testing/bind/bind.so_bsdcompat.patch
@@ -0,0 +1,11 @@
+--- lib/isc/unix/socket.c.orig 2005-11-03 17:08:42.000000000 -0600
++++ lib/isc/unix/socket.c 2006-02-18 13:09:15.000000000 -0600
+@@ -245,6 +245,8 @@
+
+ #define SOCK_DEAD(s) ((s)->references == 0)
+
++#undef SO_BSDCOMPAT
++
+ static void
+ manager_log(isc_socketmgr_t *sockmgr,
+ isc_logcategory_t *category, isc_logmodule_t *module, int level,
diff --git a/testing/bonding/APKBUILD b/testing/bonding/APKBUILD
new file mode 100644
index 000000000..f77880b76
--- /dev/null
+++ b/testing/bonding/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+
+# those scripts are based on debians ifenslave-2.6 scripts
+
+pkgname=bonding
+pkgver=2.6
+pkgrel=1
+pkgdesc="Scripts for network interface bonding"
+url="http://wiki.alpinelinux.org/wiki/Bonding"
+arch="noarch"
+license="GPL"
+depends=""
+makedepends=""
+install=""
+subpackages=""
+source="bonding.pre-up bonding.up bonding.post-down"
+
+_builddir=
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ cd "$srcdir"
+ for i in pre-up up post-down; do
+ install -Dm755 bonding.$i "$pkgdir"/etc/network/if-$i.d/bonding
+ done
+}
+
+md5sums="8feef9949a42f0a84418f785827c1fd2 bonding.pre-up
+68e64f483be3f8730a4c522f1e63e92d bonding.up
+c5f6d07415118aa21d8e4730f9f18cab bonding.post-down"
diff --git a/testing/bonding/bonding.post-down b/testing/bonding/bonding.post-down
new file mode 100755
index 000000000..8dd4c07e9
--- /dev/null
+++ b/testing/bonding/bonding.post-down
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+[ "$VERBOSITY" = 1 ] && set -x
+
+sysfs()
+{
+ # Called with :
+ # $1 = value to write. Won't write if $1 is empty.
+ # $2 = basename of the file in bonding/ to write to.
+ if [ "$1" ] ; then
+ echo "$1" > "/sys/class/net/$IFACE/master/bonding/$2"
+ return $?
+ fi
+ return 0
+}
+
+sysfs_remove_all()
+{
+ # Called with:
+ # $1 = target filename
+ read values < "/sys/class/net/$IFACE/bonding/$1"
+ for value in $values ; do
+ echo "-$value" > "/sys/class/net/$IFACE/bonding/$1"
+ done
+}
+
+BOND_PARAMS="/sys/class/net/$IFACE/bonding"
+IFSTATE=/var/run/ifstate
+
+# free $IFACE if it is currently enslaved to a bonding device.
+if [ -f "/sys/class/net/$IFACE/master/bonding/slaves" ] ; then
+ echo "-$IFACE" > "/sys/class/net/$IFACE/master/bonding/slaves"
+
+ # The first slave in bond-primary found in current slaves becomes the primary.
+ # If no slave in bond-primary is found, then primary does not change and might be undefined if just removed.
+ for slave in $IF_BOND_PRIMARY ; do
+ if grep -sq "\\<$slave\\>" "/sys/class/net/$IFACE/master/bonding/slaves" ; then
+ sysfs "$slave" primary
+ break
+ fi
+ done
+fi
+
+# If $IFACE is not a master, exit.
+[ ! -f "$BOND_PARAMS/slaves" ] && exit
+
+# Unset multivalue sysfs entries, so that re-enabling the interface later won't cause error.
+
+sysfs_remove_all arp_ip_target
+
+# Remove any slaves of $IFACE.
+
+[ "$VERBOSITY" = 1 ] && v=-v
+read slaves < "$BOND_PARAMS/slaves"
+for slave in $slaves ; do
+ # If $slave is currently up in $IFSTATE, then bring it down, to keep $IFSTATE consistent.
+ # This is supposed to have the side effect of freeing the interface.
+ grep -q "^$slave=" $IFSTATE && ifdown $v $slave
+
+ # Anyway, ensure $slave is free.
+ if [ -f "/sys/class/net/$slave/master/bonding/slaves" ] ; then
+ echo "-$slave" > "$BOND_PARAMS/slaves" 2> /dev/null
+ fi
+done
diff --git a/testing/bonding/bonding.pre-up b/testing/bonding/bonding.pre-up
new file mode 100755
index 000000000..69f6fbe26
--- /dev/null
+++ b/testing/bonding/bonding.pre-up
@@ -0,0 +1,141 @@
+#!/bin/sh
+
+[ "$VERBOSITY" = 1 ] && set -x
+
+IFSTATE=/var/run/ifstate
+
+add_master()
+{
+ # Return if $BOND_MASTER is already a bonding interface.
+ [ -f "/sys/class/net/$BOND_MASTER/bonding/slaves" ] && return
+
+ # If the bonding module is not yet loaded, load it.
+ if [ ! -r /sys/class/net/bonding_masters ]; then
+ modprobe -q bonding
+ fi
+
+ # Create the master interface.
+ if ! grep -sq "\\<$BOND_MASTER\\>" /sys/class/net/bonding_masters; then
+ echo "+$BOND_MASTER" > /sys/class/net/bonding_masters
+ fi
+}
+
+sysfs()
+{
+ # Called with :
+ # $1 = value to write. Won't write if $1 is empty.
+ # $2 = basename of the file in bonding/ to write to.
+ if [ "$1" ] ; then
+ echo "$1" > "/sys/class/net/$BOND_MASTER/bonding/$2"
+ return $?
+ fi
+ return 0
+}
+
+sysfs_add()
+{
+ # Called with :
+ # $1 = values to write.
+ # $2 = target filename.
+ for value in $1; do
+ # Do not add $1 to $2 if already present.
+ if ! grep -sq "\\<$value\\>" /sys/class/net/$BOND_MASTER/bonding/$2
+ then
+ sysfs "+$value" "$2"
+ fi
+ done
+}
+
+ifup_slave()
+{
+ local v=
+ [ "$VERBOSITY" = 1 ] && v=-v
+ if [ "$1" != "$IFACE" ] && ! grep -q "^$1=" $IFSTATE && ifup -n "$1" >/dev/null 2>&1; then
+ ifup $v $1
+ fi
+}
+
+enslave_slaves()
+{
+ case "$BOND_SLAVES" in
+ none)
+ BOND_SLAVES=""
+ ;;
+ all)
+ BOND_SLAVES=`sed -ne 's/ *\(eth[^:]*\):.*/\1/p' /proc/net/dev`
+ AUTOIF="yes"
+ ;;
+ esac
+
+ for slave in $BOND_SLAVES ; do
+ if ( [ "$AUTOIF" ] && grep -q "^$slave=" $IFSTATE ) ; then
+ echo "Not enslaving interface $slave since it is already configured"
+ else
+ # Ensure $slave is down.
+ ip link set "$slave" down 2>/dev/null
+ if ! sysfs_add "$slave" slaves 2>/dev/null ; then
+ echo "Failed to enslave $slave to $BOND_MASTER. Is $BOND_MASTER ready and a bonding interface ?" >&2
+ else
+ # Bring up slave if it is defined in interfaces
+ # This is usefull to bring up slaves that need extra setup.
+ ifup_slave $slave
+ fi
+ fi
+ done
+}
+
+setup_master()
+{
+ sysfs "$IF_BOND_MODE" mode
+ sysfs "$IF_BOND_MIIMON" miimon
+ sysfs "$IF_BOND_USE_CARRIER" use_carrier
+ sysfs "$IF_BOND_UPDELAY" updelay
+ sysfs "$IF_BOND_DOWNDELAY" downdelay
+ sysfs "$IF_BOND_ARP_INTERVAL" arp_interval
+ sysfs "$IF_BOND_ARP_VALIDATE" arp_validate
+ sysfs "$IF_BOND_FAIL_OVER_MAC" fail_over_mac
+ sysfs "$IF_BOND_XMIT_HASH_POLICY" xmit_hash_policy
+ sysfs "$IF_BOND_LACP_RATE" lacp_rate
+ sysfs_add "$IF_BOND_ARP_IP_TARGET" arp_ip_target
+}
+
+setup_slaves()
+{
+ # The first slave in bond-primary found in current slaves becomes the primary.
+ # If no slave in bond-primary is found, then primary does not change.
+ for slave in $IF_BOND_PRIMARY ; do
+ if grep -sq "\\<$slave\\>" "/sys/class/net/$BOND_MASTER/bonding/slaves" ; then
+ sysfs "$slave" primary
+ break
+ fi
+ done
+
+ if [ "$IF_BOND_ACTIVE_SLAVE" ] ; then
+ # Need to force interface up before. Bonding will refuse to activate a down interface.
+ ip link set "$IF_BOND_ACTIVE_SLAVE" up
+ sysfs "$IF_BOND_ACTIVE_SLAVE" active_slave
+ fi
+}
+
+# Are there anything to do ?
+
+# Option slaves deprecated, replaced by bond-slaves, but still supported for backward compatibility.
+IF_BOND_SLAVES=${IF_BOND_SLAVES:-$IF_SLAVES}
+
+if [ "$IF_BOND_MASTER" ] ; then
+ BOND_MASTER="$IF_BOND_MASTER"
+ BOND_SLAVES="$IFACE"
+else
+ if [ "$IF_BOND_SLAVES" ] ; then
+ BOND_MASTER="$IFACE"
+ BOND_SLAVES="$IF_BOND_SLAVES"
+ fi
+fi
+
+# Exit if nothing to do...
+[ -z "$BOND_MASTER$BOND_SLAVES" ] && exit
+
+add_master
+setup_master
+enslave_slaves
+setup_slaves
diff --git a/testing/bonding/bonding.up b/testing/bonding/bonding.up
new file mode 100755
index 000000000..7f27421cd
--- /dev/null
+++ b/testing/bonding/bonding.up
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+[ "$VERBOSITY" = 1 ] && set -x
+
+sysfs()
+{
+ # Called with :
+ # $1 = value to write. Won't write if $1 is empty.
+ # $2 = basename of the file in bonding/ to write to.
+ if [ "$1" ] ; then
+ echo "$1" > "/sys/class/net/$IFACE/master/bonding/$2"
+ return $?
+ fi
+ return 0
+}
+
+# If the stanza bond-give-a-chance is set for a slave interface,
+# then force $IFACE to be the primary for some time, then restore primary to it previous value.
+
+# This stanza is designed to workaround a bug in wpa_supplicant, when used with bonding :
+
+# wpa_supplicant expect wifi authentication packets on the bond interface, but also send wifi authentication packets on the bond interface.
+# If the active interface is not the wifi interface at the time wpa_supplicant try to authenticate, the wifi AP won't receive anything, causing the authentication to fail.
+
+# In order for the wifi authentication to succeed, one need to give a chance to the wifi interface to send authentication packets.
+# "bond-give-a-chance 10" will set the wifi interface as the primary interface for 10 seconds, then restore the previous primary interface.
+# This is supposed to be enought to give a chance to wifi to authenticate properly.
+
+if [ "$IF_BOND_GIVE_A_CHANCE" ] ; then
+ read primary < "/sys/class/net/$IFACE/master/bonding/primary"
+ # Set the temporary primary.
+ sysfs "$IFACE" primary
+
+ # Wait for the link to be setup, but not longer that $IF_BOND_GIVE_A_CHANGE seconds.
+ while [ "$IF_BOND_GIVE_A_CHANCE" -gt 0 ] ; do
+ if ip link show $IFACE | grep -sq 'state UP'; then
+ break
+ fi
+ sleep 1
+ IF_BOND_GIVE_A_CHANCE=`expr $IF_BOND_GIVE_A_CHANCE - 1`
+ done
+
+ # Restore the previous primary.
+ sysfs "$primary" primary
+fi
diff --git a/testing/libdvdnav/APKBUILD b/testing/libdvdnav/APKBUILD
deleted file mode 100644
index e0a9e052a..000000000
--- a/testing/libdvdnav/APKBUILD
+++ /dev/null
@@ -1,40 +0,0 @@
-# Contributor: Timo Teräs <timo.teras@iki.fi>
-# Maintainer: Timo Teräs <timo.teras@iki.fi>
-pkgname=libdvdnav
-pkgver=4.2.0
-pkgrel=0
-pkgdesc="a library for sophisticated DVD navigation features"
-url="http://dvdnav.mplayerhq.hu/"
-arch="all"
-license="GPL"
-depends=""
-depends_dev="libdvdread-dev"
-makedepends="$depends_dev"
-install=""
-subpackages="$pkgname-dev"
-source="http://dvdnav.mplayerhq.hu/releases/$pkgname-$pkgver.tar.bz2"
-
-_builddir="$srcdir"/libdvdnav-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
-
-build() {
- cd "$_builddir"
- ./configure2 --prefix=/usr --disable-static --disable-debug --enable-shared || return 1
- make || return 1
-}
-
-package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
- rm -f "$pkgdir"/usr/lib/*.la
-}
-
-md5sums="53be8903f9802e101929a3451203bbf6 libdvdnav-4.2.0.tar.bz2"
diff --git a/testing/libdvdread/APKBUILD b/testing/libdvdread/APKBUILD
deleted file mode 100644
index 872c48e52..000000000
--- a/testing/libdvdread/APKBUILD
+++ /dev/null
@@ -1,40 +0,0 @@
-# Contributor: Timo Teräs <timo.teras@iki.fi>
-# Maintainer: Timo Teräs <timo.teras@iki.fi>
-pkgname=libdvdread
-pkgver=4.2.0
-pkgrel=0
-pkgdesc="a simple foundation for reading DVD video disks"
-url="http://dvdnav.mplayerhq.hu/"
-arch="all"
-license="GPL"
-depends=""
-depends_dev=""
-makedepends="$depends_dev"
-install=""
-subpackages="$pkgname-dev"
-source="http://dvdnav.mplayerhq.hu/releases/libdvdread-$pkgver.tar.bz2"
-
-_builddir="$srcdir"/libdvdread-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
-
-build() {
- cd "$_builddir"
- ./configure2 --prefix=/usr --disable-static --disable-debug --enable-shared || return 1
- make || return 1
-}
-
-package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
- rm -f "$pkgdir"/usr/lib/*.la
-}
-
-md5sums="ab7a19d3ab1a437ae754ef477d6231a4 libdvdread-4.2.0.tar.bz2"
diff --git a/testing/libebml/APKBUILD b/testing/libebml/APKBUILD
deleted file mode 100644
index 4f88ee46e..000000000
--- a/testing/libebml/APKBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# Contributor: Timo Teräs <timo.teras@iki.fi>
-# Maintainer: Timo Teräs <timo.teras@iki.fi>
-pkgname=libebml
-pkgver=1.2.2
-pkgrel=0
-pkgdesc="a C++ library to parse Extensible Binary Meta-Language files"
-url="http://www.matroska.org/"
-arch="all"
-license="LGPL"
-depends=""
-depends_dev=""
-makedepends="$depends_dev"
-install=""
-subpackages="$pkgname-dev"
-source="http://dl.matroska.org/downloads/$pkgname/$pkgname-$pkgver.tar.bz2"
-
-_builddir="$srcdir"/$pkgname-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
-
-build() {
- cd "$_builddir"
- make -C make/linux
-}
-
-package() {
- cd "$_builddir"
- make -C make/linux install prefix="$pkgdir/usr"
-}
-
-md5sums="726cc2bd1a525929ff35ff9854c0ebab libebml-1.2.2.tar.bz2"
diff --git a/testing/libmatroska/APKBUILD b/testing/libmatroska/APKBUILD
deleted file mode 100644
index d0112705d..000000000
--- a/testing/libmatroska/APKBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# Contributor: Timo Teräs <timo.teras@iki.fi>
-# Maintainer: Timo Teräs <timo.teras@iki.fi>
-pkgname=libmatroska
-pkgver=1.3.0
-pkgrel=0
-pkgdesc="a C++ library to parse Matroska files"
-url="http://www.matroska.org/"
-arch="all"
-license="LGPL"
-depends=""
-depends_dev="libebml-dev"
-makedepends="$depends_dev"
-install=""
-subpackages="$pkgname-dev"
-source="http://dl.matroska.org/downloads/$pkgname/$pkgname-$pkgver.tar.bz2"
-
-_builddir="$srcdir"/$pkgname-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
-
-build() {
- cd "$_builddir"
- make -C make/linux
-}
-
-package() {
- cd "$_builddir"
- make -C make/linux install prefix="$pkgdir/usr"
-}
-
-md5sums="f4a8c411f09d39c754eb726efd616043 libmatroska-1.3.0.tar.bz2"
diff --git a/testing/vlan/APKBUILD b/testing/vlan/APKBUILD
new file mode 100644
index 000000000..30910bcb4
--- /dev/null
+++ b/testing/vlan/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=vlan
+pkgver=1.9
+pkgrel=0
+pkgdesc="Scripts for configuring VLAN network interfaces"
+url="http://wiki.alpinelinux.org/wiki/Vlan"
+arch="noarch"
+license="GPL"
+depends=""
+makedepends=""
+install=""
+subpackages=""
+source="mvlan.post-down
+ mvlan.pre-up
+ vlan.post-down
+ vlan.pre-up
+ "
+
+_builddir=
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ cd "$srcdir"
+ for i in vlan mvlan; do
+ for j in pre-up post-down; do
+ install -Dm755 $i.$j "$pkgdir"/etc/network/if-$j.d/$i || return 1
+ done
+ done
+}
+
+md5sums="3683be24d1fc1d8565e945c349c41571 mvlan.post-down
+5b6232674e83b0dbfc24af523dd5ec03 mvlan.pre-up
+cebaa97c933ed0f4cafd92f864ab4bc8 vlan.post-down
+c9acef8c17d8af19590767f57eb11b6b vlan.pre-up"
diff --git a/testing/vlan/mvlan.post-down b/testing/vlan/mvlan.post-down
new file mode 100644
index 000000000..229fc0e7f
--- /dev/null
+++ b/testing/vlan/mvlan.post-down
@@ -0,0 +1,14 @@
+#!/bin/sh
+case "$IFACE" in
+ *#[0-9]*)
+ MVLANID="${IFACE##*#}"
+ IF_MVLAN_RAW_DEVICE="${IFACE%#*}"
+ ;;
+ *)
+ ;;
+esac
+if [ -n "$IF_MVLAN_RAW_DEVICE" ]
+then
+ # Kernel new style configuration
+ ip link del link dev "$IFACE"
+fi
diff --git a/testing/vlan/mvlan.pre-up b/testing/vlan/mvlan.pre-up
new file mode 100644
index 000000000..6713f3115
--- /dev/null
+++ b/testing/vlan/mvlan.pre-up
@@ -0,0 +1,14 @@
+#!/bin/sh
+case "$IFACE" in
+ *#[0-9]*)
+ MVLANID="${IFACE##*#}"
+ IF_MVLAN_RAW_DEVICE="${IFACE%#*}"
+ ;;
+ *)
+ ;;
+esac
+if [ -n "$IF_MVLAN_RAW_DEVICE" ]
+then
+ # Kernel new style configuration
+ ip link add link $IF_MVLAN_RAW_DEVICE name $IFACE type macvlan
+fi
diff --git a/testing/vlan/vlan.post-down b/testing/vlan/vlan.post-down
new file mode 100644
index 000000000..bf887ef14
--- /dev/null
+++ b/testing/vlan/vlan.post-down
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# If IFACE is an automagic vlan interface (without the vlan-raw-device
+# parameter) then let's try to discover the magic here.. Another way would be
+# to just probe for the right device name in /proc/net/vlan
+
+case "$IFACE" in
+ *#*) exit 0 ;;
+ *:*) exit 0 ;;
+ vlan*.*) exit 0 ;;
+ vlan*) VLAN_ID="${IFACE#vlan}" NAME1=VLAN;;
+ *.*) RAW_DEVICE="${IFACE%.*}"; VLAN_ID="${IFACE##*.}" NAME1=DEV;;
+ *) [ -n "${IF_VLAN_ID}" -o -n "${IF_VLAN_RAW_DEVICE}" ] || exit 0 ;;
+esac
+
+if [ -n "$IF_VLAN_RAW_DEVICE" ]; then
+ RAW_DEVICE="$IF_VLAN_RAW_DEVICE"
+fi
+
+if [ -n "$IF_VLAN_ID" ]; then
+ VLAN_ID="$IF_VLAN_ID"
+fi
+
+if [ -n "${RAW_DEVICE}" -o -n "${VLAN_ID}" ]
+then
+ vconfig rem "${IFACE}"
+fi
diff --git a/testing/vlan/vlan.pre-up b/testing/vlan/vlan.pre-up
new file mode 100644
index 000000000..450e0d335
--- /dev/null
+++ b/testing/vlan/vlan.pre-up
@@ -0,0 +1,57 @@
+#!/bin/sh
+do_vlan_config() {
+ local device="$1"
+ local id="$2"
+ local newname="$3"
+ local nametype="$4"
+ vconfig set_name_type ${nametype}
+ vconfig add ${device} ${id}
+}
+
+
+# Preferred method:
+# Autoguess construction from #520147
+case "$IFACE" in
+ *#*) exit 0 ;;
+ *:*) exit 0 ;;
+ vlan*.*) exit 0 ;;
+ vlan*) VLAN_ID="${IFACE#vlan}" NAME1=VLAN;;
+ *.*) RAW_DEVICE="${IFACE%.*}"; VLAN_ID="${IFACE##*.}" NAME1=DEV;;
+ *) [ -n "${IF_VLAN_ID}" -o -n "${IF_VLAN_RAW_DEVICE}" ] || exit 0 ;;
+esac
+case "$VLAN_ID" in
+ [1-9]*) NAME2=VID_NO_PAD;;
+ 0???) NAME2=VID;;
+ 0*) NAME2=VID_NO_PAD;; # Failsafe fallback in case of backward compatability
+esac
+if [ -n "$IF_VLAN_RAW_DEVICE" ]; then
+ RAW_DEVICE="$IF_VLAN_RAW_DEVICE"
+fi
+
+# Strip leading 0s
+VLAN_ID="${VLAN_ID#0}"
+VLAN_ID="${VLAN_ID#0}"
+VLAN_ID="${VLAN_ID#0}"
+VLAN_ID="${VLAN_ID#0}"
+VLAN_ID="$(($VLAN_ID))"
+if [ -n "$IF_VLAN_ID" ]; then
+ VLAN_ID="$IF_VLAN_ID"
+fi
+
+if [ -z "$VLAN_ID" -o -z "$RAW_DEVICE" ]; then
+ exit 1
+fi
+
+if [ -n "$RAW_DEVICE" ] && [ -n "$VLAN_ID" ]; then
+ if ! ip link show dev "$RAW_DEVICE" > /dev/null; then
+ echo "$RAW_DEVICE does not exist, unable to create $IFACE"
+ exit 1
+ fi
+ ip link set up dev "$RAW_DEVICE"
+ do_vlan_config "$RAW_DEVICE" "$VLAN_ID" "$IFACE" "${NAME1}_PLUS_${NAME2}"
+ if ! ip link show dev "$IFACE" > /dev/null; then
+ echo "Failed to create vlan device $IFACE on device $RAW_DEVICE with tag $VLAN_ID"
+ exit 1
+ fi
+fi
+
diff --git a/testing/vlc/APKBUILD b/testing/vlc/APKBUILD
deleted file mode 100644
index d306d2d18..000000000
--- a/testing/vlc/APKBUILD
+++ /dev/null
@@ -1,216 +0,0 @@
-# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-pkgname=vlc
-pkgver=2.0.0
-_pkgver=${pkgver/_/-}
-pkgrel=0
-pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
-pkgusers="vlc"
-pkggroups="vlc"
-url="http://www.videolan.org/vlc/"
-arch="all"
-license="GPL-2"
-triggers="$pkgname.trigger=/usr/lib/vlc/plugins"
-subpackages="$pkgname-dev $pkgname-doc $pkgname-xorg $pkgname-daemon"
-#depends="fluidsynth zvbi lirc-utils libdca
-# libproxy libcddb smbclient
-# libmpcdec libmodplug"
-depends="ttf-dejavu"
-makedepends="
- a52dec-dev
- alsa-lib-dev
- automake
- autoconf
- avahi-dev
- libtool
- dbus-dev
- faad2-dev
- ffmpeg-dev
- flac-dev
- freetype-dev
- fribidi-dev
- gtk+-dev
- libbluray-dev>=0.2.1 libbluray-dev<20100000
- libdc1394-dev>=2.1.0
- libdvbpsi-dev
- libdvdnav-dev
- libdvdread-dev
- libgcrypt-dev
- libice-dev
- libiconv-dev
- libmad-dev
- libmatroska-dev
- libmpeg2-dev
- libnotify-dev
- libogg-dev
- libraw1394-dev>=2.0.1
- libshout-dev
- libsm-dev
- libtheora-dev
- libvorbis-dev
- libx11-dev
- libxext-dev
- libxinerama-dev
- libxpm-dev
- libxv-dev
- live-media-dev>=2012.01.26
- lua-dev
- ncurses-dev
- mesa-dev
- pkgconfig
- qt-dev
- sdl-dev
- speex-dev
- sysfsutils-dev
- taglib-dev
- v4l-utils-dev
- x264-dev
- xcb-util-renderutil-dev
- xcb-util-keysyms-dev
- "
-source="http://download.videolan.org/pub/videolan/$pkgname/$_pkgver/$pkgname-$_pkgver.tar.xz
- uclibc-inhibit-spawn.patch
- uclibc-no-xscreensaver.patch
- uclibc3.patch
- vlc.trigger
- "
-# uclibc-libcompat.patch
-# vlc-1.1.7-disable-cache-gen.patch
-
-_builddir="$srcdir"/$pkgname-$_pkgver
-prepare() {
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch)
- msg "Applying $i"
- patch -p1 -i "$srcdir"/$i || return 1
- ;;
- esac;
- done
- sed -i -e "/^libxscreensaver_plugin_la_SOURCES/s/^/#/" modules/misc/Modules.am
- ./bootstrap
-}
-
-build ()
-{
- cd "$_builddir"
- sed -i -e 's:/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf:/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf:' modules/misc/freetype.c
-
- # -fpermissive is needed due to zlib 1.2.6 changing
- # void* to gzFile on gz*() functions
- export CFLAGS="$CFLAGS -D_GNU_SOURCE"
- export CXXFLAGS="$CXXFLAGS -fpermissive"
-
- ./configure --prefix=/usr \
- --disable-mmx \
- --disable-nls \
- --disable-optimizations \
- --disable-rpath \
- --enable-a52 \
- --enable-avcodec \
- --enable-avformat \
- --enable-bluray \
- --enable-dbus \
- --enable-dbus-control \
- --enable-dc1394 \
- --enable-dvbpsi \
- --enable-dvdread \
- --enable-dvdnav \
- --enable-faad \
- --enable-flac \
- --enable-httpd \
- --enable-live555 \
- --enable-matroska \
- --enable-merge-ffmpeg \
- --enable-ncurses \
- --enable-qt4 \
- --enable-realrtsp \
- --enable-sdl \
- --enable-shout \
- --enable-skins2 \
- --enable-speex \
- --enable-sout \
- --enable-taglib \
- --enable-theora \
- --enable-v4l2 \
- --enable-vlm \
- --enable-vorbis \
- --enable-wma-fixed \
- --enable-xvideo \
- || return 1
-
-# --enable-dvb \
-# --enable-snapshot \
-# --enable-hal \
-# --enable-lirc \
-# --enable-pvr \
-
- make || return 1
-}
-
-package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
-# for res in 16 32 48 128; do
-# install -D -m644 share/vlc${res}x${res}.png \
-# "$pkgdir"/usr/share/icons/hicolor/${res}x${res}/apps/vlc.png || return 1
-# done
- # delete cache as it's autocreated by trigger
- rm -rf "$pkgdir"/usr/lib/vlc/plugins/plugins.dat
- # delete unneeded mozilla and kde support files
- rm -rf "$pkgdir"/usr/lib/mozilla
- rm -rf "$pkgdir"/usr/share/kde4
- find "$pkgdir" -name '*.la' -delete
-}
-
-_mv() {
- local dir=${1%/*}
- mkdir -p "$subpkgdir"/$dir
- mv "$1" "$subpkgdir"/$dir/
-}
-
-xorg() {
- pkgdesc="Video LAN X.org support"
- depends="xdg-utils vlc>=2.0.0_rc1-r4"
-
- # scan for elf files that directly or indirectly depends on
- # libX* libraries
- cd "$pkgdir"
- for i in $(find -type f ); do
- if ldd $i 2>/dev/null | grep -E -q "libX|x11|libxcb"; then
- echo $i | grep libavcodec_plugin.so || _mv "$i" || return 1
- fi
- done
-
- mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/[qs]vlc \
- "$subpkgdir"/usr/bin
-
- mkdir -p "$subpkgdir"/usr/share/vlc
- mv "$pkgdir"/usr/share/applications \
- "$pkgdir"/usr/share/icons \
- "$subpkgdir"/usr/share/
-
- mv "$pkgdir"/usr/share/vlc/skins2 \
- "$subpkgdir"/usr/share/vlc
-}
-
-daemon() {
- pkgdesc="Support for running VLC as a daemon"
- install="vlc-daemon.pre-install"
- arch="noarch"
- depends="vlc>=2.0.0_rc1-r0"
-
- mkdir -p "$subpkgdir"
- cd "$pkgdir"
- install -D -m755 ../../vlc.initd $subpkgdir/etc/init.d/vlc
- install -D -m664 ../../vlc.confd $subpkgdir/etc/conf.d/vlc
- install -d -o vlc -g vlc "$subpkgdir"/var/log/vlc
-}
-
-md5sums="8806bff2ea9c76791123d444a92f708c vlc-2.0.0.tar.xz
-28349b8239fdd6987fbe0ca2c758517f uclibc-inhibit-spawn.patch
-b84c5a9121440b6a1dcf28792d783eb8 uclibc-no-xscreensaver.patch
-94f11ec8394775018222781a0c875444 uclibc3.patch
-350b30698eb784def7d19446eb1d6c81 vlc.trigger"
diff --git a/testing/vlc/uclibc-inhibit-spawn.patch b/testing/vlc/uclibc-inhibit-spawn.patch
deleted file mode 100644
index c34ebe0f7..000000000
--- a/testing/vlc/uclibc-inhibit-spawn.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-diff --git a/modules/misc/inhibit/xdg.c b/modules/misc/inhibit/xdg.c
-index 3f297c6..e16a21e 100644
---- a/modules/misc/inhibit/xdg.c
-+++ b/modules/misc/inhibit/xdg.c
-@@ -27,7 +27,11 @@
- #include <vlc_inhibit.h>
- #include <assert.h>
- #include <signal.h>
--#include <spawn.h>
-+#if !defined(_POSIX_SPAWN)
-+# define _POSIX_SPAWN -1
-+#else
-+# include <spawn.h>
-+#endif
- #include <sys/wait.h>
-
- static int Open (vlc_object_t *);
-@@ -47,7 +51,9 @@ struct vlc_inhibit_sys
- vlc_thread_t thread;
- vlc_cond_t update, inactive;
- vlc_mutex_t lock;
-+#if (_POSIX_SPAWN >= 0)
- posix_spawnattr_t attr;
-+#endif
- bool suspend, suspended;
- };
-
-@@ -67,17 +73,19 @@ static int Open (vlc_object_t *obj)
- vlc_mutex_init (&p_sys->lock);
- vlc_cond_init (&p_sys->update);
- vlc_cond_init (&p_sys->inactive);
-- posix_spawnattr_init (&p_sys->attr);
- /* Reset signal handlers to default and clear mask in the child process */
- {
- sigset_t set;
-
- sigemptyset (&set);
-- posix_spawnattr_setsigmask (&p_sys->attr, &set);
- sigaddset (&set, SIGPIPE);
-+#if (_POSIX_SPAWN >= 0)
-+ posix_spawnattr_init (&p_sys->attr);
-+ posix_spawnattr_setsigmask (&p_sys->attr, &set);
- posix_spawnattr_setsigdefault (&p_sys->attr, &set);
- posix_spawnattr_setflags (&p_sys->attr, POSIX_SPAWN_SETSIGDEF
- | POSIX_SPAWN_SETSIGMASK);
-+#endif
- }
- p_sys->suspend = false;
- p_sys->suspended = false;
-@@ -106,7 +114,9 @@ static void Close (vlc_object_t *obj)
-
- vlc_cancel (p_sys->thread);
- vlc_join (p_sys->thread, NULL);
-+#if (_POSIX_SPAWN >= 0)
- posix_spawnattr_destroy (&p_sys->attr);
-+#endif
- vlc_cond_destroy (&p_sys->inactive);
- vlc_cond_destroy (&p_sys->update);
- vlc_mutex_destroy (&p_sys->lock);
-@@ -153,8 +163,16 @@ static void *Thread (void *data)
- pid_t pid;
-
- vlc_mutex_unlock (&p_sys->lock);
-+#if (_POSIX_SPAWN >= 0)
- if (!posix_spawnp (&pid, "xdg-screensaver", NULL, &p_sys->attr,
- argv, environ))
-+#else
-+ pid = fork();
-+ if (pid == 0) {
-+ execvp("xdg-screensaver", argv);
-+ exit(1);
-+ } else if (pid > 0)
-+#endif
- {
- int status;
-
diff --git a/testing/vlc/uclibc-no-xscreensaver.patch b/testing/vlc/uclibc-no-xscreensaver.patch
deleted file mode 100644
index b4e1acef6..000000000
--- a/testing/vlc/uclibc-no-xscreensaver.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- vlc-2.0.0-rc1.orig/modules/misc/Modules.am
-+++ vlc-2.0.0-rc1/modules/misc/Modules.am
-@@ -26,14 +26,9 @@
- libxdg_screensaver_plugin_la_CFLAGS = $(AM_CFLAGS)
- libxdg_screensaver_plugin_la_LIBADD = $(AM_LIBADD)
- libxdg_screensaver_plugin_la_DEPENDENCIES =
--libxscreensaver_plugin_la_SOURCES = inhibit/xscreensaver.c
--libxscreensaver_plugin_la_CFLAGS = $(AM_CFLAGS)
--libxscreensaver_plugin_la_LIBADD = $(AM_LIBADD)
--libxscreensaver_plugin_la_DEPENDENCIES =
- if HAVE_XCB
- libvlc_LTLIBRARIES += \
-- libxdg_screensaver_plugin.la \
-- libxscreensaver_plugin.la
-+ libxdg_screensaver_plugin.la
- endif
-
- libmce_plugin_la_SOURCES = inhibit/mce.c
diff --git a/testing/vlc/uclibc3.patch b/testing/vlc/uclibc3.patch
deleted file mode 100644
index e57d6dd5f..000000000
--- a/testing/vlc/uclibc3.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- vlc-2.0.0-rc1.orig/src/posix/linux_specific.c
-+++ vlc-2.0.0-rc1/src/posix/linux_specific.c
-@@ -83,14 +83,14 @@
- unsigned refs;
- } once = { VLC_STATIC_MUTEX, 0 };
-
--#ifdef __GLIBC__
-+#if defined(__GLIBC__) && !defined(__UCLIBC__)
- # include <gnu/libc-version.h>
- # include <stdlib.h>
- #endif
-
- void system_Init (void)
- {
--#ifdef __GLIBC__
-+#if defined(__GLIBC__) && !defined(__UCLIBC__)
- const char *glcv = gnu_get_libc_version ();
-
- /* gettext in glibc 2.5-2.7 is not thread-safe. LibVLC keeps crashing,
---- vlc-2.0.0-rc1.orig/src/posix/thread.c
-+++ vlc-2.0.0-rc1/src/posix/thread.c
-@@ -1165,6 +1165,16 @@
- return vlc_atomic_swap (&timer->overruns, 0);
- }
-
-+#if defined(HAVE_SCHED_GETAFFINITY) && !defined(CPU_COUNT)
-+static unsigned CPU_COUNT(cpu_set_t *cpu)
-+{
-+ unsigned i, count = 0;
-+ for (i = 0; i < CPU_SETSIZE; i++)
-+ if (CPU_ISSET(i, cpu))
-+ count++;
-+ return count;
-+}
-+#endif
-
- /**
- * Count CPUs.
diff --git a/testing/vlc/vlc-1.1.7-disable-cache-gen.patch b/testing/vlc/vlc-1.1.7-disable-cache-gen.patch
deleted file mode 100644
index b8a3dd955..000000000
--- a/testing/vlc/vlc-1.1.7-disable-cache-gen.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/modules/Makefile.am
-+++ b/modules/Makefile.am
-@@ -63,7 +63,8 @@
-
- stamp-cache:
- $(AM_V_GEN)if test "$(build)" = "$(host)"; then \
-- ../bin/vlc-cache-gen$(EXEEXT) . ; \
-+ # ../bin/vlc-cache-gen$(EXEEXT) . ; \
-+ echo "FIXME: vlc-cache-gen" ; \
- else \
- echo "Cross-compilation: cache generation skipped!" ; \
- fi
diff --git a/testing/vlc/vlc-daemon.pre-install b/testing/vlc/vlc-daemon.pre-install
deleted file mode 100644
index 72ee1b7ff..000000000
--- a/testing/vlc/vlc-daemon.pre-install
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-groups="vlc audio video"
-for group in $groups; do
- addgroup -S $group 2>/dev/null
-done
-adduser -S -h /home/vlc -s /bin/sh -G vlc -D vlc 2>/dev/null
-
-# make sure vlc are in all groups
-for group in $groups; do
- addgroup vlc $group 2>/dev/null
-done
-exit 0
diff --git a/testing/vlc/vlc.confd b/testing/vlc/vlc.confd
deleted file mode 100644
index c42344b60..000000000
--- a/testing/vlc/vlc.confd
+++ /dev/null
@@ -1,11 +0,0 @@
-# Sample vlc params suitable for running as a daemon
-
-## --daemon detach from prompt
-## --file-logging enable file logging
-## --logfile logfile name/path
-## -vvv verbose logging
-## -I dummy disable X11 interface
-## --sout PARAMS encoding parameters
-## Do NOT quote 'PARAMS' otherwise shell expansions will broke vlc
-
-VLC_OPTS="-vvv -I dummy alsa://hw:0,0 --daemon --file-logging --logfile /var/log/vlc/vlc.log --sout #transcode{acodec=mp3,ab=48,channels=1,samplerate=22050}:std{access=http,mux=ogg,dst=:8080}"
diff --git a/testing/vlc/vlc.initd b/testing/vlc/vlc.initd
deleted file mode 100755
index 11567dcd8..000000000
--- a/testing/vlc/vlc.initd
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/sbin/runscript
-
-depend() {
- need net
-}
-
-start() {
- ebegin "Starting VLC"
- start-stop-daemon --start \
- --user vlc \
- --exec /usr/bin/vlc -- ${VLC_OPTS}
- eend $?
-}
-
-stop () {
- ebegin "Stopping VLC"
- start-stop-daemon --stop \
- --signal KILL \
- --exec /usr/bin/vlc
- eend $?
-}
-
diff --git a/testing/vlc/vlc.trigger b/testing/vlc/vlc.trigger
deleted file mode 100644
index d7322fcb1..000000000
--- a/testing/vlc/vlc.trigger
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-exec /usr/lib/vlc/vlc-cache-gen "$@"
-
diff --git a/testing/xf86-video-openchrome/APKBUILD b/testing/xf86-video-openchrome/APKBUILD
index b8419ec33..569a89e28 100644
--- a/testing/xf86-video-openchrome/APKBUILD
+++ b/testing/xf86-video-openchrome/APKBUILD
@@ -1,6 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xf86-video-openchrome
-pkgver=0.3.0_pre20120227
+pkgver=0.3.0_pre20120306
+_ver=${pkgver/_/-}
pkgrel=0
pkgdesc="X.Org driver for VIA/S3G cards"
url="http://xorg.freedesktop.org/"
@@ -13,11 +14,20 @@ makedepends="pkgconfig xorg-server-dev libxi-dev libxvmc-dev fontsproto glproto
autoconf automake libtool
"
-source="http://www.infradead.org/~jsimmons/release_0_3_0-Feb27.tar.bz2
+source="http://www.infradead.org/~jsimmons/xf86-video-openchrome-$_ver.tbz
openchrome.xinf
"
-_builddir="$srcdir"/xf86-video-openchrome-kms_branch
+_builddir="$srcdir"/xf86-video-openchrome-$_ver
+unpack() {
+ cd "$srcdir"
+ for i in $source; do
+ case $i in
+ *.tbz) tar -jxf "$srcdir"/${i##*/} || return 1;;
+ esac
+ done
+}
+
prepare() {
cd "$_builddir"
for i in $source; do
@@ -44,5 +54,5 @@ package() {
"$pkgdir"/usr/share/hwdata/videoaliases/openchrome.xinf
}
-md5sums="b8ca0911d178775fa55c4dd351052f3a release_0_3_0-Feb27.tar.bz2
+md5sums="9b085ca54974f14b454bdeaf8dc1c089 xf86-video-openchrome-0.3.0-pre20120306.tbz
d6906087f0e93ea2d98e553f4dfbcc97 openchrome.xinf"