Contents of /branches/R11-unstable/core/ebtables/ebtables-2.0.10.4-r4.smage2
Parent Directory | Revision Log
Revision 24951 -
(show annotations)
(download)
Tue Nov 25 02:42:39 2014 UTC (9 years, 10 months ago) by niro
File size: 1843 byte(s)
Tue Nov 25 02:42:39 2014 UTC (9 years, 10 months ago) by niro
File size: 1843 byte(s)
-release branches/R11-unstable
1 | # $Id$ |
2 | |
3 | PNAME="ebtables" |
4 | PVER="2.0.10.4" |
5 | PBUILD="r4" |
6 | |
7 | PCAT="net-misc" |
8 | |
9 | DESCRIPTION="Utility that enables basic Ethernet frame filtering on a Linux bridge, MAC NAT and routing." |
10 | HOMEPAGE="http://ebtables.sourceforge.net/" |
11 | |
12 | DEPEND=">= virtual/glibc" |
13 | SDEPEND=">= virtual/kernel-headers" |
14 | |
15 | SRCFILE="${PNAME}-v${PVER%.*}-${PVER##*.}.tar.gz" |
16 | SRCDIR="${BUILDDIR}/${PNAME}-v${PVER%.*}-${PVER##*.}" |
17 | |
18 | sminclude mtools |
19 | |
20 | SRC_URI=( |
21 | sourceforge://${PNAME}/${SRCFILE} |
22 | mirror://${PNAME}/${SRCFILE} |
23 | mirror://${PNAME}/${PNAME}-2.0.8.2-ebt-save.patch |
24 | mirror://${PNAME}/ebtables.sh |
25 | mirror://${PNAME}/ebtables.confd |
26 | ) |
27 | |
28 | UP2DATE="updatecmd_sourceforge ${PNAME} gz | sed 's:^v::;s:-:.:g'" |
29 | |
30 | src_prepare() |
31 | { |
32 | munpack ${SRCFILE} || die |
33 | cd ${SRCDIR} |
34 | |
35 | # ebtables should save table names as parameters |
36 | mpatch ${PNAME}-2.0.8.2-ebt-save.patch || die |
37 | |
38 | # fix install locations |
39 | sed -i -e "s,^MANDIR:=.*,MANDIR:=/usr/share/man," \ |
40 | -e "s,^BINDIR:=.*,BINDIR:=/usr/sbin," \ |
41 | -e "s,^INITDIR:=.*,INITDIR:=/usr/share/doc/${PNAME}-${PVER}," \ |
42 | -e "s,^SYSCONFIGDIR:=.*,SYSCONFIGDIR:=/usr/share/doc/${PNAME}-${PVER}," \ |
43 | -e "s,^LIBDIR:=.*,LIBDIR:=/usr/$(mlibdir)/\$(PROGNAME)," \ |
44 | Makefile || die |
45 | } |
46 | |
47 | src_compile() |
48 | { |
49 | cd ${SRCDIR} |
50 | |
51 | # no as-needed supported -> segfaults |
52 | local _myldflags="${LDFLAGS//-Wl,--as-needed}" |
53 | local _mycflags="-Wunused -Wall -Werror -Wno-error=unused-but-set-variable" |
54 | |
55 | mmake CFLAGS="${_mycflags}" LDFLAGS="${_myldflags}" || die |
56 | } |
57 | |
58 | src_install() |
59 | { |
60 | cd ${SRCDIR} |
61 | |
62 | # missing directory |
63 | minstalldir /usr/share/doc/${PNAME}-${PVER}/ebtables || die |
64 | |
65 | make DESTDIR=${BINDIR} install || die |
66 | mkeepdir /var/lib/ebtables || die |
67 | |
68 | minstallconf ebtables.confd ebtables || die |
69 | minstalldir /usr/lib/systemd || die |
70 | minstallexec -s ebtables.sh /usr/lib/systemd/magellan-ebtables || die |
71 | |
72 | # docs |
73 | minstalldocs COMMIT_NOTES COPYING INCOMPATIBILITIES || die |
74 | } |