summaryrefslogtreecommitdiff
path: root/net-analyzer/ipguard
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/ipguard')
-rw-r--r--net-analyzer/ipguard/Manifest6
-rw-r--r--net-analyzer/ipguard/files/ipguard-1.04-fno-common.patch98
-rw-r--r--net-analyzer/ipguard/files/ipguard-1.04-gentoo.patch50
-rw-r--r--net-analyzer/ipguard/files/ipguard-1.04-init.d.patch36
-rw-r--r--net-analyzer/ipguard/files/ipguard-1.04-runpath.patch11
-rw-r--r--net-analyzer/ipguard/ipguard-1.04-r1.ebuild27
6 files changed, 206 insertions, 22 deletions
diff --git a/net-analyzer/ipguard/Manifest b/net-analyzer/ipguard/Manifest
index c7ce69bbefd1..7d75b07717a6 100644
--- a/net-analyzer/ipguard/Manifest
+++ b/net-analyzer/ipguard/Manifest
@@ -1,4 +1,8 @@
+AUX ipguard-1.04-fno-common.patch 2149 BLAKE2B d87d6c8f8d92ffdcc0db658b6275f32b6904fcb8b3e772c8e25fd07de2d19309a327d3e7d21d0228956b7a69740e4ffb92b562dee7e64ab400347124ee089a68 SHA512 de897dd7be90aa218a4c36341afa582bf478963bb4e91b8d51d2de81546634b6c0400086cd89de54becfe94b79a9920651beed147391c72ca0dffd218ce05cde
+AUX ipguard-1.04-gentoo.patch 1208 BLAKE2B ee4ee3284822422c6993bce0c282c608f5f9bc58f6007f4364a50eb2e0279c82bcfcf65bff4cb0e08a71653095a1a2c4ee6fd29d450369ef2d5a46ddcc31eb54 SHA512 762ca395c95eb2f2a01117d4a6856b2949c8bd2bebe06c1c857310044e0358bb0bc33ac36c1beedf8998b71bee508e381024ed9aa229094bc2567d86aa1465bf
+AUX ipguard-1.04-init.d.patch 931 BLAKE2B e18d1a5d9058f34a47262c0033e9a93118ee9c8b811a2938de9e6dc41352e7fe02e6be3893c56c6891202cc9449fd3b506d526cb32d8fc348f2c3f0ac1f6cc94 SHA512 1715711f7ef90f4e7c4c92a7b9f411ce3af633b6599bdcd393fa9cf0f0272170b1b9b190a177f447068e1d17bf29de1783148ce51e21e254e63859e77efb5fc8
+AUX ipguard-1.04-runpath.patch 288 BLAKE2B 45658be6e0478b1d4e29f27f9b6e39999368202b985b2ebc9ff4fd20c71388974250f555b9c9790b985095190d12df13625b83200636cbb31c1f6de2d0acb353 SHA512 49b07785bbf188ed1fd522591f3ee1af7a4001bf9baffabe63de6a27738a365f79ffc268d039ae9567622c26898cc68ffee61cb8ecf31bddd207f69897ed5a7c
AUX ipguard.confd 186 BLAKE2B cd3e58efb088134c2ff340360be06ab0f9159b14c766b159dcb546d0136ccd65807b7c33bb89d45565179ead01d43f8da29bfdb19dfe59ba5e0008dc81dc2e82 SHA512 efb47689d944ce77863b7cd1722bba974fbf573af2e1051c08166a535dd8284f2cc820a624531d1c60e099e6da06d59f3659ab52b4b3557f3e1f4bf5c572f58d
DIST ipguard-1.04.tar.gz 24566 BLAKE2B c9d543e6f7886c3b6377fbfe95e91e2d786da6a92fe445c9500c8b7ea6fb859bf8550daf9c83de425494376d0ed7197158e5ff9499a97417793b439e82004326 SHA512 c29c3f594e09ad1c06ca7297f794ddfada48da7ec2b98786694cd6af7508cbff232889e0c90718d96519297870b93132b7b0f9f310a0e4d7a7c2d54a30ca893c
-EBUILD ipguard-1.04-r1.ebuild 1236 BLAKE2B 534eb12f57b29e922d67c27cb1c470f03c9a5cd9eab2eb4e0788fbb0327e700e7fe3cf77f2d5eccdf55474e2acddb0f866b2c0666a6cfb3b60e4adaa2d12b416 SHA512 e860a8c4ee4893cc380ba3e1d12d760661f4bf50229fb43a4f0ffff1dc93f88ecdb7aa858c9f15133019b69797235a089bec713cb0b74e514d625b0ea88a6c11
+EBUILD ipguard-1.04-r1.ebuild 956 BLAKE2B 5a0e60ae2a7ffe1e483c9c946a52ad77034f894e658ed2e93f4f6196ec9170b352d9cbfdcf96e1dab97e857aa3de2e62277f52484ddea2d88329b3869ddfc45a SHA512 bdc54abe0e7304b68171f41de9a3dc401f4679873b867fdfba866c4d0cbfd149366eb98d96379ec23d706daf0eb48275ac8a418a5e58c1240b28b1975b6403c0
MISC metadata.xml 276 BLAKE2B e21811549278e73aa9a14acfe242fd022106a39ac1300caa00615772d7f54d08a433052659a271f9ac0d453c7776fc2b9e8d86e6d3f637817c214174dde52cb2 SHA512 f0e6c6bc89659e01e157d9bf30d0a2f3fd2d71bc26c8d12489c4a44fc5237159946e25b46e7295ab4676aea63559194977a0b1e76aced31d81cf6387dd0f4250
diff --git a/net-analyzer/ipguard/files/ipguard-1.04-fno-common.patch b/net-analyzer/ipguard/files/ipguard-1.04-fno-common.patch
new file mode 100644
index 000000000000..414a91ec09a0
--- /dev/null
+++ b/net-analyzer/ipguard/files/ipguard-1.04-fno-common.patch
@@ -0,0 +1,98 @@
+--- a/ipguard.c
++++ b/ipguard.c
+@@ -29,6 +29,34 @@
+
+ #include "ipguard.h"
+
++char iface[IFNAMSIZ];
++char ethers_name[PATH_MAX];
++char log_name[PATH_MAX];
++char pid_name[PATH_MAX];
++char fmac[18];
++char pcapf[PCAPFSIZ];
++char suser[MAXLOGNAME];
++int ethers_update;
++int fake_regen;
++int fake_num;
++int fake_time;
++int buffer_num;
++int addr_nosubst;
++int nofirst;
++int grant;
++int read_only;
++int duplex;
++int fixbc;
++int hidden;
++int promisc;
++int debug;
++int verbose;
++
++unsigned int all, good, grat, wgrat, zmac, zip, bad, bmac, bsip, btip,
++ bnew, bgrat, mymac, fake, pfake, nzh, nbe, mis;
++char pfmac[18];
++char s[128+1];
++
+ void usage(char *name) {
+ fprintf(stdout, "%s v%s (c) %s <%s>\n\n", NAME, VERSION, AUTHOR, MAIL);
+ fprintf(stdout, "usage: %s [-h] [-ajgrxziovd]\n", name);
+--- a/ipguard.h
++++ b/ipguard.h
+@@ -68,33 +68,33 @@
+ #define NOTICE 3
+ #define INFO 4
+
+-char iface[IFNAMSIZ];
+-char ethers_name[PATH_MAX];
+-char log_name[PATH_MAX];
+-char pid_name[PATH_MAX];
+-char fmac[18];
+-char pcapf[PCAPFSIZ];
+-char suser[MAXLOGNAME];
+-int ethers_update;
+-int fake_regen;
+-int fake_num;
+-int fake_time;
+-int buffer_num;
+-int addr_nosubst;
+-int nofirst;
+-int grant;
+-int read_only;
+-int duplex;
+-int fixbc;
+-int hidden;
+-int promisc;
+-int debug;
+-int verbose;
++extern char iface[IFNAMSIZ];
++extern char ethers_name[PATH_MAX];
++extern char log_name[PATH_MAX];
++extern char pid_name[PATH_MAX];
++extern char fmac[18];
++extern char pcapf[PCAPFSIZ];
++extern char suser[MAXLOGNAME];
++extern int ethers_update;
++extern int fake_regen;
++extern int fake_num;
++extern int fake_time;
++extern int buffer_num;
++extern int addr_nosubst;
++extern int nofirst;
++extern int grant;
++extern int read_only;
++extern int duplex;
++extern int fixbc;
++extern int hidden;
++extern int promisc;
++extern int debug;
++extern int verbose;
+
+-unsigned int all, good, grat, wgrat, zmac, zip, bad, bmac, bsip, btip,
++extern unsigned int all, good, grat, wgrat, zmac, zip, bad, bmac, bsip, btip,
+ bnew, bgrat, mymac, fake, pfake, nzh, nbe, mis;
+-char pfmac[18];
+-char s[128+1];
++extern char pfmac[18];
++extern char s[128+1];
+
+ /* ethers.c
+ */
diff --git a/net-analyzer/ipguard/files/ipguard-1.04-gentoo.patch b/net-analyzer/ipguard/files/ipguard-1.04-gentoo.patch
new file mode 100644
index 000000000000..7d66038581b2
--- /dev/null
+++ b/net-analyzer/ipguard/files/ipguard-1.04-gentoo.patch
@@ -0,0 +1,50 @@
+--- a/Makefile
++++ b/Makefile
+@@ -28,13 +28,13 @@
+ STATIC=
+ CC=gcc
+
+-CFLAGS+=-g -Wall -DETHERS='"$(ETHERS)"'
++CFLAGS+=-Wall -DETHERS='"$(ETHERS)"'
+
+ OBJS=ethers.o ipguard.o packet.o system.o
+
+ .c.o:
+ @echo Compiling $*.c
+- @$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $<
++ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $<
+
+ all: start $(NAME)
+
+@@ -47,7 +47,7 @@
+
+ $(NAME): $(OBJS)
+ @echo Linking $@
+- @$(CC) -o $@ $(OBJS) $(LIBS) $(STATIC)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(STATIC)
+
+ clean:
+ @echo Cleaning OBJS
+@@ -58,16 +58,16 @@
+ @rm -f $(NAME)
+
+ install: all
+- mkdir -p -m 755 $(PREFIX)/sbin
+- install -s -m 755 $(NAME) $(PREFIX)/sbin/$(NAME)
+- mkdir -p -m 755 $(PREFIX)/man/man8
+- install -m 644 doc/$(NAME).8 $(PREFIX)/man/man8/$(NAME).8
++ mkdir -p -m 755 ${D}$(PREFIX)/sbin
++ install -m 755 $(NAME) ${D}$(PREFIX)/sbin/$(NAME)
++ mkdir -p -m 755 ${D}$(PREFIX)/share/man/man8
++ install -m 644 doc/$(NAME).8 ${D}$(PREFIX)/share/man/man8/$(NAME).8
+
+ uninstall: deinstall
+
+ deinstall:
+- rm -f $(PREFIX)/man/man8/$(NAME).8
+- rm -f $(PREFIX)/sbin/$(NAME)
++ rm -f ${D}$(PREFIX)/share/man/man8/$(NAME).8
++ rm -f ${D}$(PREFIX)/sbin/$(NAME)
+
+ ethers.o: ipguard.h
+ ipguard.o: ipguard.h
diff --git a/net-analyzer/ipguard/files/ipguard-1.04-init.d.patch b/net-analyzer/ipguard/files/ipguard-1.04-init.d.patch
new file mode 100644
index 000000000000..447d818bf965
--- /dev/null
+++ b/net-analyzer/ipguard/files/ipguard-1.04-init.d.patch
@@ -0,0 +1,36 @@
+--- a/doc/ipguard.gentoo
++++ b/doc/ipguard.gentoo
+@@ -1,7 +1,7 @@
+ #! /sbin/runscript
+ ## $Id: ipguard.gentoo,v 1.5 2010/07/12 03:46:52 sead Exp $
+
+-opts="reload"
++extra_commands="reload"
+
+ depend() {
+ use net
+@@ -9,20 +9,20 @@
+
+ start() {
+ ebegin "Starting ipguard"
+- start-stop-daemon --start --quiet --pidfile /var/run/ipguard.pid \
+- --exec /usr/sbin/ipguard -- -u 300 -xz
++ start-stop-daemon --start --quiet --pidfile /run/ipguard.pid \
++ --exec /usr/sbin/ipguard -- ${OPTS} ${IFACE}
+ eend $?
+ }
+
+ stop() {
+ ebegin "Stopping ipguard"
+- start-stop-daemon --stop --quiet --pidfile /var/run/ipguard.pid
++ start-stop-daemon --stop --quiet --pidfile /run/ipguard.pid
+ eend $?
+ }
+
+ reload() {
+ ebegin "Reloading ipguard"
+- start-stop-daemon --stop --quiet --pidfile /var/run/ipguard.pid \
++ start-stop-daemon --stop --quiet --pidfile /run/ipguard.pid \
+ --signal HUP
+ eend $?
+ }
diff --git a/net-analyzer/ipguard/files/ipguard-1.04-runpath.patch b/net-analyzer/ipguard/files/ipguard-1.04-runpath.patch
new file mode 100644
index 000000000000..930f2cc84fde
--- /dev/null
+++ b/net-analyzer/ipguard/files/ipguard-1.04-runpath.patch
@@ -0,0 +1,11 @@
+--- a/ipguard.h
++++ b/ipguard.h
+@@ -53,7 +53,7 @@
+
+ #define ETHERSFILE ETHERS
+ #define LOGNAME "/var/log/ipguard"
+-#define PIDNAME "/var/run/ipguard"
++#define PIDNAME "/run/ipguard"
+ #define FAKEMAC "de:ad:xx:xx:xx:xx"
+ #define PCAPFSIZ 128
+
diff --git a/net-analyzer/ipguard/ipguard-1.04-r1.ebuild b/net-analyzer/ipguard/ipguard-1.04-r1.ebuild
index a30baf79b5e9..73efd0b68720 100644
--- a/net-analyzer/ipguard/ipguard-1.04-r1.ebuild
+++ b/net-analyzer/ipguard/ipguard-1.04-r1.ebuild
@@ -19,27 +19,12 @@ DEPEND="
RDEPEND="
${DEPEND}
"
-
-src_prepare() {
- default
-
- sed -i \
- -e 's|-g ||g' \
- -e 's| @$(CC)| $(CC)|g' \
- -e 's| -s | |g' \
- -e 's| -o | $(CFLAGS) $(LDFLAGS)&|g' \
- -e 's|$(PREFIX)|${D}&|g' \
- -e 's|/man/|/share&|g' \
- Makefile || die
- sed -i \
- -e 's|opts=|extra_commands=|g' \
- -e 's|/var/run/|/run/|g' \
- -e 's|-u 300 -xz|${OPTS} ${IFACE}|g' \
- doc/${PN}.gentoo || die
- sed -i \
- -e 's|/var/run/|/run/|g' \
- doc/${PN}.8 ${PN}.h || die
-}
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/${P}-init.d.patch
+ "${FILESDIR}"/${P}-runpath.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+)
src_compile() {
emake \