Contents of /trunk/core/ebtables/ebtables-2.0.10.4-r3.smage2
Parent Directory | Revision Log
Revision 14391 -
(show annotations)
(download)
Tue Dec 18 09:38:54 2012 UTC (11 years, 9 months ago) by niro
File size: 1821 byte(s)
Tue Dec 18 09:38:54 2012 UTC (11 years, 9 months ago) by niro
File size: 1821 byte(s)
-added patch to fix segfaults
1 | # $Id$ |
2 | |
3 | PNAME="ebtables" |
4 | PVER="2.0.10.4" |
5 | PBUILD="r3" |
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}/${PNAME}-2.0.10.4-segfaultfix.patch |
25 | mirror://${PNAME}/ebtables.sh |
26 | mirror://${PNAME}/ebtables.confd |
27 | ) |
28 | |
29 | UP2DATE="updatecmd_sourceforge ${PNAME} gz | sed 's:^v::;s:-:.:g'" |
30 | |
31 | src_prepare() |
32 | { |
33 | munpack ${SRCFILE} || die |
34 | cd ${SRCDIR} |
35 | |
36 | # ebtables should save table names as parameters |
37 | mpatch ${PNAME}-2.0.8.2-ebt-save.patch || die |
38 | |
39 | # fix a segfault |
40 | mpatch ${PNAME}-2.0.10.4-segfaultfix.patch || die |
41 | |
42 | # fix install locations |
43 | sed -i -e "s,^MANDIR:=.*,MANDIR:=/usr/share/man," \ |
44 | -e "s,^BINDIR:=.*,BINDIR:=/usr/bin," \ |
45 | -e "s,^INITDIR:=.*,INITDIR:=/usr/share/doc/${PNAME}-${PVER}," \ |
46 | -e "s,^SYSCONFIGDIR:=.*,SYSCONFIGDIR:=/usr/share/doc/${PNAME}-${PVER}," \ |
47 | -e "s,^LIBDIR:=.*,LIBDIR:=/usr/$(mlibdir)/\$(PROGNAME)," \ |
48 | Makefile || die |
49 | } |
50 | |
51 | src_compile() |
52 | { |
53 | cd ${SRCDIR} |
54 | mmake CFLAGS='-Wunused -Wall -Werror -Wno-error=unused-but-set-variable' || die |
55 | } |
56 | |
57 | src_install() |
58 | { |
59 | cd ${SRCDIR} |
60 | |
61 | # missing directory |
62 | minstalldir /usr/share/doc/${PNAME}-${PVER}/ebtables || die |
63 | |
64 | make DESTDIR=${BINDIR} install || die |
65 | mkeepdir /var/lib/ebtables || die |
66 | |
67 | minstallconf ebtables.confd ebtables || die |
68 | minstalldir /usr/lib/systemd || die |
69 | minstallexec -s ebtables.sh /usr/lib/systemd/magellan-ebtables || die |
70 | |
71 | # docs |
72 | minstalldocs COMMIT_NOTES COPYING INCOMPATIBILITIES || die |
73 | } |