Magellan Linux

Annotation of /branches/R11-unstable/core/ebtables/ebtables-2.0.10.4-r5.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32249 - (hide annotations) (download)
Mon Apr 29 12:00:46 2019 UTC (5 years ago) by niro
File size: 1908 byte(s)
-release branches/R11-unstable
1 niro 29380 # $Id$
2    
3     PNAME="ebtables"
4     PVER="2.0.10.4"
5     PBUILD="r5"
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=">= net-misc/iptables-1.6"
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     # provided by iptables
73     mdelete /etc/ethertypes || die
74    
75     # docs
76     minstalldocs COMMIT_NOTES COPYING INCOMPATIBILITIES || die
77     }