# Copyright 2003 Eduardo Garcia Cebollero # Distributed under the terms of the GNU General Public License v2 # $id$ S="${WORKDIR}/${P}" DESCRIPTION="Firewall-Jay a Firewall Creation Assistant" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" HOMEPAGE="http://firewall-jay.sourceforge.net" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" DEPEND="" RDEPEND="net-firewall/iptables dev-lang/perl" #src_compile() { #} src_install() { DESTDIR="${D}/" ETC="${DESTDIR}/etc" INIT="${DESTDIR}/etc/init.d" LIB="${DESTDIR}/var/lib" BIN="${DESTDIR}/usr/sbin" DOC="${DESTDIR}/usr/share/doc" #Create needed directories install -d ${ETC}/firewall-jay ${DOC}/firewall-jay/ ${LIB}/firewall-jay dosbin ${S}/files/firewall-config.pl fperms 700 /usr/sbin/firewall-config.pl fowners root:root /usr/sbin/firewall-config.pl dodoc ${S}/INSTALL ${S}/README ${S}/README.Spywares ${S}/README.Peers ${S}/CHANGELOG ${S}/COPYING dosbin ${S}/files/firewall-spy-update.pl fperms 700 /usr/sbin/firewall-spy-update.pl fowners root:root /usr/sbin/firewall-spy-update.pl #Default configs install -m 700 -o root -g root ${S}/files/firewall.rules ${LIB}/firewall-jay/ install -m 700 -o root -g root ${S}/files/firewall.rules ${LIB}/firewall-jay/ if [ ! -e ${ETC}/firewall-jay/firewall-spy-update.config ];then \ install -m 600 -o root -g root ${S}/files/firewall-spy-update.config ${ETC}/firewall-jay/; \ fi if [ ! -e ${LIB}/firewall-jay/block-mac-in.user ]; then \ install -m 644 -o root -g root ${S}/files/block-mac-in.user ${LIB}/firewall-jay/; \ fi if [ ! -e ${LIB}/firewall-jay/block-ip-in.user ]; then \ install -m 644 -o root -g root ${S}/files/block-ip-in.user ${LIB}/firewall-jay/; \ fi if [ ! -e ${LIB}/firewall-jay/block-ip-out.user ]; then \ install -m 644 -o root -g root ${S}/files/block-ip-out.user ${LIB}/firewall-jay/; \ fi if [ ! -e ${LIB}/firewall-jay/firewall-custom.rules ]; then \ install -m 700 -o root -g root ${S}/files/firewall-custom.rules ${LIB}/firewall-jay/; \ else \ chmod 700 ${LIB}/firewall-jay/firewall-custom.rules; \ fi #/Default configs #INSTALL the trick for easyer init script #TODO: Port the entire init script to gentoo stile (maybe less portable to future versions?) install -m 700 -o root -g root ${S}/files/fw-jay ${LIB}/firewall-jay/ exeinto /etc/init.d doexe ${FILESDIR}/firewall-jay } pkg_postinst(){ einfo "###############################################################################" einfo "# CONGRATULATIONS #" einfo "# #" einfo "# Jay's Iptables Firewall has heen successfully installed #" einfo "# #" einfo "# Now run 'firewall-config.pl --new' for create a new configuration file. #" einfo "# #" einfo "# UPGRADE from >= 0.9.1a : run 'firewall-config.pl --update', for update the #" einfo "# configuration's file (or simply run the script). #" einfo "# #" einfo "# UPGRADE from < 0.9.1a : run 'firewall-config.pl --new' for create a #" einfo "# new configuration's file. #" einfo "# #" einfo "# See 'firewall-config.pl --help' #" einfo "###############################################################################" }