/[gentoo-x86]/net-firewall/ebtables/ebtables-2.0.10.4.ebuild
Gentoo

Contents of /net-firewall/ebtables/ebtables-2.0.10.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Jun 14 15:53:50 2012 UTC (11 months, 1 week ago) by xmw
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
ppc stable (bug 404265)

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/ebtables-2.0.10.4.ebuild,v 1.3 2012/06/13 06:19:48 jdhore Exp $
4
5 EAPI="4"
6
7 inherit versionator eutils toolchain-funcs multilib flag-o-matic
8
9 MY_PV=$(replace_version_separator 3 '-' )
10 MY_P=${PN}-v${MY_PV}
11
12 DESCRIPTION="Utility that enables basic Ethernet frame filtering on a Linux bridge, MAC NAT and brouting."
13 HOMEPAGE="http://ebtables.sourceforge.net/"
14 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
15
16 KEYWORDS="amd64 ppc x86"
17 IUSE="static"
18 LICENSE="GPL-2"
19 SLOT="0"
20
21 S=${WORKDIR}/${MY_P}
22
23 pkg_setup() {
24 if use static; then
25 ewarn "You've chosen static build which is useful for embedded devices."
26 ewarn "It has no init script. Make sure that's really what you want."
27 fi
28 }
29
30 src_prepare() {
31 # Enhance ebtables-save to take table names as parameters bug #189315
32 epatch "${FILESDIR}/${PN}-2.0.8.1-ebt-save.diff"
33
34 sed -i -e "s,^MANDIR:=.*,MANDIR:=/usr/share/man," \
35 -e "s,^BINDIR:=.*,BINDIR:=/sbin," \
36 -e "s,^INITDIR:=.*,INITDIR:=/usr/share/doc/${PF}," \
37 -e "s,^SYSCONFIGDIR:=.*,SYSCONFIGDIR:=/usr/share/doc/${PF}," \
38 -e "s,^LIBDIR:=.*,LIBDIR:=/$(get_libdir)/\$(PROGNAME)," Makefile
39 }
40
41 src_compile() {
42 # This package uses _init functions to initialise extensions. With
43 # --as-needed this will not work.
44 append-ldflags $(no-as-needed)
45 # This package correctly aliases pointers, but gcc is unable to know that:
46 # unsigned char ip[4];
47 # if (*((uint32_t*)ip) == 0) {
48 #append-cflags -Wno-strict-aliasing
49 emake \
50 CC="$(tc-getCC)" \
51 CFLAGS="${CFLAGS}" \
52 $(use static && echo static)
53 }
54
55 src_install() {
56 if ! use static; then
57 make DESTDIR="${D}" install
58 keepdir /var/lib/ebtables/
59 newinitd "${FILESDIR}"/ebtables.initd-r1 ebtables
60 newconfd "${FILESDIR}"/ebtables.confd-r1 ebtables
61 else
62 into /
63 newsbin static ebtables
64 insinto /etc
65 doins ethertypes
66 fi
67 dodoc ChangeLog THANKS || die
68 }

  ViewVC Help
Powered by ViewVC 1.1.17