summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Thorwirth (Moonstruxx) <Moonstruxx@gmx.de>2007-04-26 19:16:29 +0000
committerB. Thorwirth (Moonstruxx) <Moonstruxx@gmx.de>2007-04-26 19:16:29 +0000
commitec1f619bf51d785837ac75bde3003f10dbba1d1c (patch)
tree2cc335a49d44e3b756700a136b9c1e92042c94b6 /net-firewall/tuxguardian
parentnet-im/pyicq-t: Remove inherit eutils (diff)
downloadsunrise-ec1f619bf51d785837ac75bde3003f10dbba1d1c.tar.gz
sunrise-ec1f619bf51d785837ac75bde3003f10dbba1d1c.tar.bz2
sunrise-ec1f619bf51d785837ac75bde3003f10dbba1d1c.zip
net-firewall/tuxguardian: New Ebuild for bug 105990
svn path=/sunrise/; revision=3546
Diffstat (limited to 'net-firewall/tuxguardian')
-rw-r--r--net-firewall/tuxguardian/ChangeLog9
-rw-r--r--net-firewall/tuxguardian/Manifest7
-rw-r--r--net-firewall/tuxguardian/files/Makefile-gentoo-0.5.patch155
-rw-r--r--net-firewall/tuxguardian/files/digest-tuxguardian-0.53
-rwxr-xr-xnet-firewall/tuxguardian/files/tuxguardian.init28
-rw-r--r--net-firewall/tuxguardian/metadata.xml5
-rwxr-xr-xnet-firewall/tuxguardian/tuxguardian-0.5.ebuild62
7 files changed, 269 insertions, 0 deletions
diff --git a/net-firewall/tuxguardian/ChangeLog b/net-firewall/tuxguardian/ChangeLog
new file mode 100644
index 000000000..a6a9154cf
--- /dev/null
+++ b/net-firewall/tuxguardian/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for net-firewall/tuxguardian
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 26 Apr 2007; Bjoern Thorwirth (Moonstruxx) <moonstruxx at gmx.de>)
+ +tuxguardian-0.5.ebuild, +files/Makefile-gentoo-0.5.patch,
+ +files/tuxguardian.init, +metadata.xml:
+ New Ebuild for bug 105990
+
diff --git a/net-firewall/tuxguardian/Manifest b/net-firewall/tuxguardian/Manifest
new file mode 100644
index 000000000..6ff8498db
--- /dev/null
+++ b/net-firewall/tuxguardian/Manifest
@@ -0,0 +1,7 @@
+AUX Makefile-gentoo-0.5.patch 5132 RMD160 8c393e8e7bbad6326afcca21ef949c2628dbc71c SHA1 5a787ff190a7628e306a0f300229bd059e0cbad7 SHA256 cbf99738039025d199d3b43c7eeee0bb243a9afdc62a0f137e3e34ebe779e512
+AUX tuxguardian.init 489 RMD160 3d375b570e9d02b8431fe4e0e1c3c43522695982 SHA1 f334783f921ca8947e12c9a6898819c594a4e3b1 SHA256 0dec459c199753cff4979a15860ffb1347445baaccb49619b0bffed8809b2ef9
+AUX tuxguardian.init~ 489 RMD160 1293f7e7e7a29f4a216a68157bf3ed367c8ba583 SHA1 21a1b783054e50e6d38f962c53fdcde01e6f4b04 SHA256 4dc6bfce3fc7aefe5d66c1aa3967cd93eb657be30879181d2153844bdaf32c15
+DIST tuxguardian-0.5.tar.gz 65987 RMD160 cc521df3dc05dbf776e8b61687c45bede37a6d25 SHA1 5713f6e7d237cb8ee4a38e51d16912e29f2b9ff9 SHA256 3e711cad85af8ddbf6492ee08e8d63dce8028cd075d4aac9924884c0325b7e4d
+EBUILD tuxguardian-0.5.ebuild 1906 RMD160 af2f0b2219bed975e9fcabab85376225a7a98c46 SHA1 90691346f655fa32841fcce71ba0d701a5bdbc41 SHA256 51a5ea87cdca327a00f283af738412db6fd8ee53dd90e075b8aa2942a98242ac
+MISC ChangeLog 326 RMD160 986440964246c0521b4ce780335e4fbbb007ea92 SHA1 5534d41fe7b4499f517391be3e692f0bf5419f42 SHA256 019a69c4ecdbbb653632128d768438bb735aa84b3a92b1459b120c5acd973736
+MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/net-firewall/tuxguardian/files/Makefile-gentoo-0.5.patch b/net-firewall/tuxguardian/files/Makefile-gentoo-0.5.patch
new file mode 100644
index 000000000..799fe7367
--- /dev/null
+++ b/net-firewall/tuxguardian/files/Makefile-gentoo-0.5.patch
@@ -0,0 +1,155 @@
+diff -udNr tuxguardian-0.5/daemon/Makefile tuxguardian-0.5-gentoo/daemon/Makefile
+--- tuxguardian-0.5/daemon/Makefile 2006-04-09 01:28:18.000000000 +0200
++++ tuxguardian-0.5-gentoo/daemon/Makefile 2007-04-26 20:33:32.000000000 +0200
+@@ -1,4 +1,4 @@
+-bindir=/usr/local/bin
++bindir=/usr/sbin
+
+
+ all: daemon
+@@ -7,8 +7,10 @@
+ gcc -pthread daemon.c pblhash.c pbl.c md5.c -o tg-daemon
+
+ install:
+- @install -m 0700 -o root -g root tg-daemon $(bindir) && \
+- touch /etc/daemon.conf && \
++ /bin/mkdir -p ${DESTDIR}$(bindir)
++ @install -m 0700 -o root -g root tg-daemon ${DESTDIR}$(bindir) && \
++ /bin/mkdir ${DESTDIR}/etc
++ touch ${DESTDIR}/etc/daemon.conf && \
+ echo Done.;
+
+ uninstall:
+diff -udNr tuxguardian-0.5/frontend/tg-frontend.pro tuxguardian-0.5-gentoo/frontend/tg-frontend.pro
+--- tuxguardian-0.5/frontend/tg-frontend.pro 2006-04-09 00:14:12.000000000 +0200
++++ tuxguardian-0.5-gentoo/frontend/tg-frontend.pro 2007-04-26 20:40:41.000000000 +0200
+@@ -13,5 +13,5 @@
+ TEMPLATE =app
+ CONFIG += qt warn_on release
+ LANGUAGE = C++
+-DESTDIR = /usr/local/bin
++DESTDIR =./
+ QMAKE_CXXFLAGS_WARN_ON = -Wno-non-virtual-dtor
+diff -udNr tuxguardian-0.5/Makefile tuxguardian-0.5-gentoo/Makefile
+--- tuxguardian-0.5/Makefile 2006-04-09 01:37:31.000000000 +0200
++++ tuxguardian-0.5-gentoo/Makefile 2007-04-26 20:47:16.000000000 +0200
+@@ -5,31 +5,15 @@
+ ifeq ($(IS_ROOT), yes)
+ all:
+ @echo -e "\n\nCompiling and installing the frontend\n------------------------------------------------"; \
+- cd frontend; qmake tg-frontend.pro; make; cd ..;
++ cd frontend; /usr/qt/3/bin/qmake tg-frontend.pro; make;cd ..;
+
+ @echo -e "\n\nCompiling the daemon\n------------------------------------------------"; \
+ cd daemon; make;
+- @echo -e "\n\nInstalling the daemon\n------------------------------------------------"; \
+- cd daemon; make install;
+-
+- @echo -e "\n\nCompiling the module\n------------------------------------------------"; \
+- cd module; make;
+- @echo -e "\n\nInstalling the module\n------------------------------------------------"; \
+- cd module; make install;
+-
+- @echo -e "\n\n\n\nSuccess! To start TuxGuardian:"
+- @echo -e "---------------------------------"
+- @echo -e " (for more information, please visit tuxguardian.sf.net)\n"
+- @echo -e "\t$$ su"
+- @echo -e "\t <enter root password>"
+- @echo -e "\t$$ tg-daemon &"
+- @echo -e "\t$$ modprobe tuxg"
+- @echo -e "\t$$ tg-frontend &\n"
+-
++# @echo -e "\n\nCompiling the module\n------------------------------------------------"; \
++# cd module; make;
+ clean:
+- @for i in $(PARTS); do \
+ echo -e "\n\nCleaning the "$$i"\n------------------------------------------------"; \
+- cd $$i; make clean; cd ..; \
++ cd daemon; make clean; cd ..; \
+ done
+ uninstall:
+ @echo -e "\n\nUninstalling the frontend\n------------------------------------------------"; \
+@@ -39,9 +23,12 @@
+ cd daemon; make uninstall; cd ..;
+
+ @echo -e "\n\nUninstalling the module\n------------------------------------------------"; \
+- cd module; make uninstall;
++# cd module; make uninstall;
+ install:
+- @echo -e "No need to 'make install'. Just type 'make'"
++# cd module; make install DESTDIR="${DESTDIR}"; cd ..;
++ cd daemon; make install DESTDIR="${DESTDIR}"; cd ..;
++ cd frontend; cp tg-frontend ${DESTDIR}usr/sbin/; cd ..;
++
+ else
+ all:
+ @echo "You must be root to compile and install!"
+@@ -49,8 +36,6 @@
+ clean:
+ @echo "You must be root to clear!"
+ @exit 1
+-install:
+- @echo -e "No need to 'make install'. Just type 'make'"
+ uninstall:
+ @echo "You must be root to uninstall!"
+ @exit 1
+diff -udNr tuxguardian-0.5/module/Makefile tuxguardian-0.5-gentoo/module/Makefile
+--- tuxguardian-0.5/module/Makefile 2006-04-09 00:12:59.000000000 +0200
++++ tuxguardian-0.5-gentoo/module/Makefile 2007-04-26 20:33:32.000000000 +0200
+@@ -1,40 +1,31 @@
+-KERNELDIR := /lib/modules/$(shell uname -r)/build
+-KERNEL_SOURCES := $(KERNDIR)
++MODULES_DIR := /lib/modules/$(shell uname -r)
++KERNEL_DIR := ${MODULES_DIR}/build
++KERNEL_SOURCES := $(KERNEL_DIR)
++
+ KERNEL_HEADERS := -I$(KERNEL_SOURCES)/include
+
+-obj-m := tuxg.o
++
++obj-m += tuxg.o
+ tuxg-objs := tg-defs.o tg.o
+ EXTRA_CFLAGS += -Os
++.PHONY: all modules modules_install install clean
+
+ MODULE_NAME := tuxg
+
+
+-# checks if the user is running kernel 2.6.12 or above
+-MINOR=$(shell uname -r | cut -c3)
+-VERSION=$(shell uname -r | sed -n 's/[[:digit:]]\.[[:digit:]]\.\([[:digit:]]*\).*/\1/p')
+-CORRECT_VERSION=$(shell if [ $(VERSION) -ge 12 -a $(MINOR) -ge 6 ]; then echo yes; else echo no; fi)
+-ifeq ($(CORRECT_VERSION),yes)
+-all:
+- make -C /lib/modules/$(shell uname -r)/build/ SUBDIRS=$(shell pwd) modules
+-else
+-all:
+- @echo "You need kernel 2.6.12 or above!"
+- @exit 1
+-endif
+-
+-
+
++all: module
++
+
+-install:
+- @install -m 0700 -o root -g root tuxg.ko /lib/modules/$(shell uname -r)
+- @/sbin/depmod -ae
+- @echo "Done."
++module:
++ make ${KERNEL_HEADERS} -C ${KERNEL_DIR} M=$$PWD modules;
+
+-uninstall:
+- @rm -f /lib/modules/$(shell uname -r)/tuxg.ko
+- @depmod -ae
+- @echo "Done."
++install: module_install
++
++modules_install:
++ make -C ${KERNEL_DIR} M=$$PWD modules_install;
+
+ clean:
+ @rm -rf *.o *.ko *.mod.? .t* *~
+ @echo "Done."
++
diff --git a/net-firewall/tuxguardian/files/digest-tuxguardian-0.5 b/net-firewall/tuxguardian/files/digest-tuxguardian-0.5
new file mode 100644
index 000000000..65576ca32
--- /dev/null
+++ b/net-firewall/tuxguardian/files/digest-tuxguardian-0.5
@@ -0,0 +1,3 @@
+MD5 1d3ffb4fc7760668a72a1c5ae1ddc4f8 tuxguardian-0.5.tar.gz 65987
+RMD160 cc521df3dc05dbf776e8b61687c45bede37a6d25 tuxguardian-0.5.tar.gz 65987
+SHA256 3e711cad85af8ddbf6492ee08e8d63dce8028cd075d4aac9924884c0325b7e4d tuxguardian-0.5.tar.gz 65987
diff --git a/net-firewall/tuxguardian/files/tuxguardian.init b/net-firewall/tuxguardian/files/tuxguardian.init
new file mode 100755
index 000000000..c6fefca86
--- /dev/null
+++ b/net-firewall/tuxguardian/files/tuxguardian.init
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+
+PID=/var/run/tuxguardian.pid
+
+depend() {
+ after net
+}
+
+
+
+start() {
+ ebegin "Starting tuxguardian"
+ start-stop-daemon --start --quiet --background --pidfile ${PID} \
+ --exec /usr/sbin/tg-daemon
+ /sbin/modprobe tuxg
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping fancontrol"
+ start-stop-daemon --stop --pidfile ${PID}
+ /sbin/modprobe -rf tuxg
+ eend ${?}
+}
diff --git a/net-firewall/tuxguardian/metadata.xml b/net-firewall/tuxguardian/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/net-firewall/tuxguardian/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>
diff --git a/net-firewall/tuxguardian/tuxguardian-0.5.ebuild b/net-firewall/tuxguardian/tuxguardian-0.5.ebuild
new file mode 100755
index 000000000..925f28cf2
--- /dev/null
+++ b/net-firewall/tuxguardian/tuxguardian-0.5.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils linux-mod qt3
+DESCRIPTION="Tuxguardian is an appliction based firewall for Linux"
+HOMEPAGE="http://tuxguardian.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+KEYWORDS="~x86"
+IUSE=""
+SLOT="0"
+DEPEND="$(qt_min_version 3.1)"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ if kernel_is lt 2 6 12; then
+ die "${P} needs a kernel >=2.6.12!"
+ fi
+ if ! linux_chkconfig_present SECURITY; then
+ eerror "${P} needs \"different security models\" in kernel enabled (SECURITY=Y)"
+ eerror "AND Default Linux Capabilities build as module (SECURITY_CAPABILITIES=M)"
+ die "Kernel config not suitable"
+ fi
+ if ! linux_chkconfig_module SECURITY_CAPABILITIES; then
+ eerror "${P} needs \"Default Linux Capabilities\" build as module"
+ die "Kernel config not suitable"
+ fi
+ MODULE_NAMES="tuxg(extra:${S}/module)"
+}
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/Makefile-gentoo-0.5.patch
+}
+src_compile() {
+ linux-mod_src_compile
+ emake DESTDIR="${D}" || die "emake failed"
+}
+
+src_install() {
+ linux-mod_src_install
+ emake DESTDIR="${D}" install
+ newinitd "${FILESDIR}"/tuxguardian.init tuxguardian
+ linux-mod_pkg_preinst
+ dodoc README COPYING AUTHORS
+
+}
+
+pkg_postinst() {
+ elog "Inint script installed. use:"
+ elog "rc-update add tuxguardian {runlevel} (runlevel e.g. boot)"
+ elog "Toubleshooting:"
+ elog "Sometimes it occures, that the module freezes.. Use:"
+ elog "\"etc/init.d/tuxguardian restart\" to solve this"
+ elog "tg-frontend is the frontend to tuxguardian. Unfortunatly it needs superuser rights to run,"
+ elog "so you should use visudo to add a rule to your sudoers file. "
+ elog "Notice: if you decide not to use the tg-frontend please refer to the documentation, how to"
+ elog "edit \"/etc/daemon.conf\""
+}
+