
#-----------------------------------------------------------------------
# Copyright (C) 2000-2001, Jean-Sebastien Morisset <jsmoriss@mvlan.net>
#-----------------------------------------------------------------------
# $Id: .spec,v 1.15 2001/10/04 12:18:03 edwin Exp $
#-----------------------------------------------------------------------
#  $RCSfile: .spec,v $
#   $Author: edwin $
# $Revision: 1.15 $
#     $Date: 2001/10/04 12:18:03 $
#   $Locker:  $ 
#     $Name:  $
#-----------------------------------------------------------------------
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by 
# the Free Software Foundation <http://www.gnu.org/copyleft/gpl.txt>.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License (LICENSE file in archive) for more details.
#
#-----------------------------------------------------------------------

Summary: A very secure, fast, and complete ipchains firewall for linux.
Name: rcf
Version: 5.2.1s1
Release: 1
Copyright: GPL
Group: System Environment/Base
Source: http://rcf.mvlan.net/dist/dev/rcf-5.2.1s1.tar.gz
Packager: Jean-Sebastien Morisset <jsmoriss@mvlan.net>
Autoreq: 0
Requires: fileutils, findutils, grep, initscripts, ipchains, kernel >= 2.2, modutils, net-tools, sed, sh-utils, textutils, chkconfig
Provides: firewall
BuildRoot: /var/tmp/rcf-buildroot
BuildArch: noarch

%description
rcf (aka rc.firewall) is an ipchains-based firewall with support for
over 50 network service modules (including vtun, dhcp, nfs, smb,
napster, proxies, online games, etc.), masquerading, port forwarding,
and ip accounting. All services are self-contained modules which can be
prioritized in the ipchains stack. Protections include spoofing, stuffed
routing/masqerading, DoS, smurf attacks, outgoing port scans, and many
more. rcf also supports unlimited public, private (masqu'ed), dmz, and
mz (non-masqu'ed) interface and their subnets. Access rules are defined
per interface and dmz/mz server "clusters". rcf is compatible with Red
Hat, Slackware, Debian, Linux Router Project (LRP), and many other
distros. rcf is distributed under the General Public License (GPL)
terms.

%prep
%setup

%build
	make all PREFIX="$RPM_BUILD_ROOT"

%pre

%install
	make install_pre    PREFIX="$RPM_BUILD_ROOT"
	make install_rpm_rc PREFIX="$RPM_BUILD_ROOT"
	make install_tar    PREFIX="$RPM_BUILD_ROOT"
	make clean          PREFIX="$RPM_BUILD_ROOT"

%clean
	rm -rf $RPM_BUILD_ROOT

%post
	echo ""
	echo "--------------------------------------------------------------------------------"
	echo "Updating configuration file..."
	echo "--------------------------------------------------------------------------------"

	$RPM_BUILD_ROOT/sbin/rcf --prefix $RPM_BUILD_ROOT/etc/firewall \
		--config $RPM_BUILD_ROOT/etc/firewall.conf --update-config

	echo ""
	echo "--------------------------------------------------------------------------------"
	echo "Please review the options in $RPM_BUILD_ROOT/etc/firewall.conf and execute"
	echo "$RPM_BUILD_ROOT/sbin/rcf again to implement the firewall rules."
	echo "--------------------------------------------------------------------------------"
	echo ""

%files
	%defattr(-,root,root)
	/etc/firewall
	%config(missingok) /etc/rc.d/rc0.d/K90firewall
	%config(missingok) /etc/rc.d/rc1.d/K90firewall
	%config(missingok) /etc/rc.d/rc2.d/S12firewall
	%config(missingok) /etc/rc.d/rc3.d/S12firewall
	%config(missingok) /etc/rc.d/rc4.d/S12firewall
	%config(missingok) /etc/rc.d/rc5.d/S12firewall
	%config(missingok) /etc/rc.d/rc6.d/K90firewall

	%defattr(0600,root,root)
	%config(missingok) /etc/firewall.conf

	%defattr(0700,root,root)
	/etc/rc.d/init.d/firewall
	/sbin/rcf

	%defattr(0644,root,root)
	%doc ChangeLog FAQ.html INSTALL LICENSE TODO
	/usr/man/man8/rcf.8.gz
	/usr/man/man5/rcf-groups.5.gz
	/usr/man/man5/rcf-modules.5.gz
	/usr/man/man5/firewall.conf.5.gz

