summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/snips/snips-1.2-r3.ebuild')
-rw-r--r--net-analyzer/snips/snips-1.2-r3.ebuild81
1 files changed, 81 insertions, 0 deletions
diff --git a/net-analyzer/snips/snips-1.2-r3.ebuild b/net-analyzer/snips/snips-1.2-r3.ebuild
new file mode 100644
index 000000000000..9d369c9fc41d
--- /dev/null
+++ b/net-analyzer/snips/snips-1.2-r3.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base toolchain-funcs user
+
+DESCRIPTION="System & Network Integrated Polling Software"
+HOMEPAGE="http://www.netplex-tech.com/snips/"
+SRC_URI="http://www.netplex-tech.com/software/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="SNIPS BSD HPND GPL-1+ RSA free-noncomm"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ virtual/mailx
+ net-analyzer/rrdtool
+ >=net-misc/iputils-20071127-r2
+ sys-libs/gdbm
+ sys-libs/ncurses"
+
+PATCHES=(
+ "${FILESDIR}/${P}-ldflags-respect.patch"
+ "${FILESDIR}/${P}-parallel-make.patch"
+ "${FILESDIR}/${P}-non-interactive.patch"
+ "${FILESDIR}/${P}-install-missing.patch"
+ "${FILESDIR}/${P}-implicit-declarations.patch"
+ "${FILESDIR}/${P}-conflicting-types.patch"
+ "${FILESDIR}/${P}-code-ordering.patch"
+ "${FILESDIR}/${P}-destdir-awareness.patch"
+ "${FILESDIR}/${P}-trapmon-link-order.patch"
+ "${FILESDIR}/${P}-nsmon-libresolv.patch"
+ "${FILESDIR}/${P}-etherload-makefile-ordering.patch"
+ "${FILESDIR}/${P}-linux3.patch"
+)
+
+src_prepare() {
+ # Gentoo-specific non-interactive configure override
+ cp "${FILESDIR}/${P}-r2-precache-config" "${S}/Config.cache" \
+ || die "Unable to precache configure script answers"
+ echo "CFLAGS=\"${CFLAGS} -fPIC\"" >> "${S}/Config.cache"
+ echo "CC=\"$(tc-getCC)\"" >> "${S}/Config.cache"
+ echo "SRCDIR=\"${S}\"" >> "${S}/Config.cache"
+ base_src_prepare
+}
+
+src_compile() {
+ # Looks horrid due to missing linebreaks, suppress output
+ ebegin "Running configure script (with precached settings)"
+ ./Configure &> /dev/null || die "Unable to configure"
+ eend $?
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
+
+pkg_preinst() {
+ enewgroup snips
+ enewuser snips -1 -1 /usr/snips snips
+}
+
+pkg_postinst() {
+ ebegin "Fixing permissions"
+ chown -R snips:snips "${ROOT}"usr/snips
+ for x in data logs msgs rrddata run web device-help etc; do
+ chmod -R g+w "${ROOT}usr/snips/${x}" \
+ || die "Unable to chmod ${x}"
+ done
+ chown root:snips "${ROOT}usr/snips/bin/multiping" || die "chown root failed"
+ chown root:snips "${ROOT}usr/snips/bin/etherload" || die "chown root failed"
+ chown root:snips "${ROOT}usr/snips/bin/trapmon" || die "chown root failed"
+ chmod u+s "${ROOT}usr/snips/bin/multiping" || die "SetUID root failed"
+ chmod u+s "${ROOT}usr/snips/bin/etherload" || die "SetUID root failed"
+ chmod u+s "${ROOT}usr/snips/bin/trapmon" || die "SetUID root failed"
+ eend $?
+}