summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2010-01-16 12:46:12 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2010-01-16 12:46:12 +0000
commit6bae1628cc66b3745d03893b8d99df190cfde8d2 (patch)
tree7618e8adb33e25825cd823c845094db12a3317e8 /net-analyzer/netwatch
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-6bae1628cc66b3745d03893b8d99df190cfde8d2.tar.gz
gentoo-2-6bae1628cc66b3745d03893b8d99df190cfde8d2.tar.bz2
gentoo-2-6bae1628cc66b3745d03893b8d99df190cfde8d2.zip
Initial commit of netwatch. Fixes bug #246071
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/netwatch')
-rw-r--r--net-analyzer/netwatch/ChangeLog11
-rw-r--r--net-analyzer/netwatch/files/append_ldflags.patch17
-rw-r--r--net-analyzer/netwatch/files/netwatch.c.patch11
-rw-r--r--net-analyzer/netwatch/metadata.xml12
-rw-r--r--net-analyzer/netwatch/netwatch-1.3.0.1.ebuild40
5 files changed, 91 insertions, 0 deletions
diff --git a/net-analyzer/netwatch/ChangeLog b/net-analyzer/netwatch/ChangeLog
new file mode 100644
index 000000000000..e741cb44a447
--- /dev/null
+++ b/net-analyzer/netwatch/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for net-analyzer/netwatch
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netwatch/ChangeLog,v 1.10 2010/01/16 12:46:11 hwoarang Exp $
+
+*netwatch-1.3.0.1 (16 Jan 2010)
+
+ 16 Jan 2010; <hwoarang@gentoo.org> +netwatch-1.3.0.1.ebuild,
+ +files/append_ldflags.patch, +files/netwatch.c.patch, +metadata.xml:
+ Initial commit of netwatch. Fixes bug #246071. Many thanks to Christian
+ Ruppert <idl0r@gentoo.org>
+
diff --git a/net-analyzer/netwatch/files/append_ldflags.patch b/net-analyzer/netwatch/files/append_ldflags.patch
new file mode 100644
index 000000000000..b2049f2b6c31
--- /dev/null
+++ b/net-analyzer/netwatch/files/append_ldflags.patch
@@ -0,0 +1,17 @@
+Index: netwatch-1.3.0/Makefile.in
+===================================================================
+--- netwatch-1.3.0.orig/Makefile.in
++++ netwatch-1.3.0/Makefile.in
+@@ -16,10 +16,10 @@ INSTALLDIR=$(bindir)
+ all: $(EXEC)
+
+ netresolv: netresolv.o netresolv.h
+- $(CC) -o netresolv $(XCFLAGS) netresolv.o
++ $(CC) -o netresolv $(XCFLAGS) $(XLDFLAGS) netresolv.o
+
+ netwatch: $(OBJECTS) $(DEFS)
+- $(CC) -DVERSION='$(CVERSION)' -DRELEASE='$(CRELEASE)' -o netwatch $(XCFLAGS) $(OBJECTS) $(XLIBS)
++ $(CC) -DVERSION='$(CVERSION)' -DRELEASE='$(CRELEASE)' -o netwatch $(XCFLAGS) $(XLDFLAGS) $(OBJECTS) $(XLIBS)
+
+ install: $(EXEC)
+ install --owner=root --group=root --mode=0755 -d $(INSTALLDIR)
diff --git a/net-analyzer/netwatch/files/netwatch.c.patch b/net-analyzer/netwatch/files/netwatch.c.patch
new file mode 100644
index 000000000000..cef591f7429a
--- /dev/null
+++ b/net-analyzer/netwatch/files/netwatch.c.patch
@@ -0,0 +1,11 @@
+--- netwatch-1.3.0/netwatch.c.old 2009-01-03 04:08:50.000000000 +0100
++++ netwatch-1.3.0/netwatch.c 2009-03-19 19:44:12.268281240 +0100
+@@ -2758,7 +2758,7 @@ updatecurrent (HOSTINFO * work, struct i
+ work->plog = open (nam, O_APPEND | O_WRONLY);
+ if (work->plog < 0)
+ {
+- work->plog = open (nam, O_APPEND | O_CREAT | O_WRONLY);
++ work->plog = open (nam, O_APPEND | O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
+ st = write (work->plog, &starttime, sizeof (starttime));
+ st = write (work->plog, &simmagic, sizeof (simmagic));
+ }
diff --git a/net-analyzer/netwatch/metadata.xml b/net-analyzer/netwatch/metadata.xml
new file mode 100644
index 000000000000..5c4a3fccbd98
--- /dev/null
+++ b/net-analyzer/netwatch/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<maintainer>
+<email>hwoarang@gentoo.org</email>
+<name>Markos Chandras</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-analyzer/netwatch/netwatch-1.3.0.1.ebuild b/net-analyzer/netwatch/netwatch-1.3.0.1.ebuild
new file mode 100644
index 000000000000..40aee36f67c5
--- /dev/null
+++ b/net-analyzer/netwatch/netwatch-1.3.0.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netwatch/netwatch-1.3.0.1.ebuild,v 1.1 2010/01/16 12:46:11 hwoarang Exp $
+
+EAPI="2"
+
+inherit versionator eutils
+
+MY_PV=$(replace_version_separator 3 '-')
+
+DESCRIPTION="Ethernet/PPP IP Packet Monitor"
+HOMEPAGE="http://www.slctech.org/~mackay/netwatch.html"
+SRC_URI="http://www.slctech.org/~mackay/NETWATCH/${PN}-${MY_PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc"
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+src_prepare() {
+ epatch "${FILESDIR}"/append_ldflags.patch
+ epatch "${FILESDIR}/${PN}.c.patch"
+}
+
+src_install() {
+ dosbin netresolv netwatch || die "dosbin failed"
+
+ doman netwatch.1 || die "doman failed"
+ dodoc BUGS CHANGES README* TODO || die "dodoc failed"
+
+ if use doc; then
+ dohtml NetwatchKeyCommands.html || die "dohtml failed"
+ fi
+}