# Contributor: Andrew Manison # Maintainer: Natanael Copa pkgname=ebtables pkgver=2.0.10.4 _realver=v${pkgver%.[0-9]}-${pkgver##*.} pkgrel=0 pkgdesc="Ethernet bridge tables - Linux Ethernet filter for the Linux bridge." url="http://ebtables.sourceforge.net/" arch="all" license="GPL" depends= makedepends= install= subpackages="$pkgname-doc" source="http://downloads.sourceforge.net/$pkgname/$pkgname-$_realver.tar.gz ebtables.initd ebtables.confd" prepare() { cd "$srcdir"/$pkgname-$_realver # patches for i in $source; do case "$i" in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done sed -i -e "s,^MANDIR:=.*,MANDIR:=/usr/share/man," \ -e "s,^BINDIR:=.*,BINDIR:=/sbin," \ -e "s,^INITDIR:=.*,INITDIR:=/usr/share/doc/ebtables," \ -e "s,^SYSCONFIGDIR:=.*,SYSCONFIGDIR:=/usr/share/doc/ebtables,"\ -e "s,^LIBDIR:=.*,LIBDIR:=/usr/lib/\$(PROGNAME)," \ -e "s/^CFLAGS:=/CFLAGS?=/" \ -e "s,^CC:=,CC?=," Makefile } build() { cd "$srcdir"/$pkgname-$_realver # This package uses _init functions to initialise extensions. With # --as-needed this will not work. export LDFLAGS="$LDFLAGS -Wl,--no-as-needed" make CFLAGS="$CFLAGS" || return 1 } package() { cd "$srcdir"/$pkgname-$_realver make DESTDIR="$pkgdir" install install -D -m755 ../ebtables.initd "$pkgdir"/etc/init.d/ebtables install -D -m644 ../ebtables.confd "$pkgdir"/etc/conf.d/ebtables } md5sums="506742a3d44b9925955425a659c1a8d0 ebtables-v2.0.10-4.tar.gz 5d6694ed0eeed9f49d223c2b2b99b627 ebtables.initd 285089ba2d846e72e321a12e3da3cc96 ebtables.confd"