%define qtver %(echo `rpm -q --queryformat '%{VERSION}-%{RELEASE}' libqt`) %define kdever %(echo `rpm -q --queryformat '%{VERSION}-%{RELEASE}' kdelibs`) %define kdedir %(echo `kde-config --prefix`) Name: guarddog Version: 2.6.0 Release: 7mamba Summary: Firewall generation and management utility for KDE Group: Graphical Desktop/Applications/Administration Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.simonzone.com/software/guarddog/ Source0: http://www.simonzone.com/software/guarddog/guarddog-%{version}.tar.gz Source1: %{name}-rc-lan Source2: %{name}-rc-lan-dmz Source3: %{name}-firsttime.sh Source4: %{name}-desktop Patch0: %{name}-2.6.0-protocoldb.patch Patch1: %{name}-2.4.0-system_rc_firewall.patch Patch2: %{name}-2.6.0-edonkey.patch Patch3: %{name}-2.6.0-fix_locale.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: iptables BuildRequires: kdelibs3-devel BuildRequires: libart_lgpl-devel BuildRequires: libexpat-devel BuildRequires: libfontconfig-devel BuildRequires: libfreetype-devel BuildRequires: libgcc BuildRequires: libGL-devel BuildRequires: libICE-devel BuildRequires: libidn-devel BuildRequires: libjpeg-devel BuildRequires: liblcms-devel BuildRequires: libmng-devel BuildRequires: libpng-devel BuildRequires: libqt-devel BuildRequires: libSM-devel BuildRequires: libstdc++6-devel BuildRequires: libX11-devel BuildRequires: libXau-devel BuildRequires: libxcb-devel BuildRequires: libXcursor-devel BuildRequires: libXdmcp-devel BuildRequires: libXext-devel BuildRequires: libXfixes-devel BuildRequires: libXft-devel BuildRequires: libXinerama-devel BuildRequires: libXmu-devel BuildRequires: libXrandr-devel BuildRequires: libXrender-devel BuildRequires: libXt-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END BuildRequires: libarts-devel BuildRequires: gettext-devel BuildRequires: libxml2-utils Requires: iptables >= 1.3.7 BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Guarddog is user friendly firewall generation and management utility for KDE on Linux. It allows you to simply specify which protocols should be allowed between which groups of computers and requires no knowledge of port numbers or packets. Built on top of ipchains and/or iptables. %prep %setup -q %patch0 -p1 -b .protocoldb %patch1 -p1 -b .system_rc_firewall %patch2 -p1 %patch3 -p1 %build export KDEDIR=%{kdedir} %configure_kde \ --sysconfdir=%{_sysconfdir}/%{name} %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall install -D -m 644 %{S:1} \ %{buildroot}%{_sysconfdir}/%{name}/%{name}-rc-lan.sample install -D -m 644 %{S:2} \ %{buildroot}%{_sysconfdir}/%{name}/%{name}-rc-lan-dmz.sample install -D -m 755 %{S:3} \ %{buildroot}%{_sbindir}/%{name}-firsttime install -D -m 644 %{S:4} \ %{buildroot}%{_kdedatadir}/applications/kde/%{name}.desktop # remove unpackaged files rm -f %{buildroot}%{_kdedatadir}/applnk/System/%{name}.desktop %find_lang %{name} %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post if [ $1 -eq 1 ]; then [ -f %{_sysconfdir}/%{name}/rc.firewall ] && mv %{_sysconfdir}/%{name}/rc.firewall \ %{_sysconfdir}/%{name}/rc.firewall.old service iptables condrestart fi [ -e %{_sysconfdir}/%{name}/rc.firewall ] && { sed -i "s|LANG=US|LANG=C|" /etc/%{name}/rc.firewall sed -i "s|LC_ALL=US|LC_ALL=C|" /etc/%{name}/rc.firewall } exit 0 %preun if [ $1 -eq 0 ]; then [ -f %{_sysconfdir}/%{name}/rc.firewall ] && mv %{_sysconfdir}/%{name}/rc.firewall \ %{_sysconfdir}/%{name}/rc.firewall.old service iptables condrestart fi exit 0 %postun if [ $1 -eq 1 ]; then service iptables condrestart fi exit 0 %files -f %{name}.lang %defattr(-,root,root) %{_sbindir}/%{name}-firsttime %{_kdebindir}/guarddog %{_kdedatadir}/applications/kde/%{name}.desktop %dir %{_kdedatadir}/apps/%{name} %{_kdedatadir}/apps/%{name}/networkprotocoldb.xml %{_kdedatadir}/apps/%{name}/pics/* %{_kdedatadir}/doc/HTML/en/* %{_kdedatadir}/doc/HTML/es/* %{_kdedatadir}/icons/hicolor/* %{_kdedatadir}/icons/locolor/* %{_kdedatadir}/sgml/protocoldb/* %dir %{_sysconfdir}/%{name} %{_sysconfdir}/%{name}/guarddog-rc-lan-dmz.sample %{_sysconfdir}/%{name}/guarddog-rc-lan.sample %changelog * Sat Jul 23 2011 Silvan Calarco 2.6.0-7mamba - fix guarddog-firsttime script to use new style network interface configuration files and set LAN default rules by default * Sat Mar 12 2011 Davide Madrisan 2.6.0-6mamba - %{name}-firsttime.sh: move code of get_interfaces_by_zone() from network-functions - update build requirements * Thu Nov 11 2010 Silvan Calarco 2.6.0-5mamba - added patch to fix locale warnings on startup and fix current configuration file on upgrade * Mon May 18 2009 Automatic Build System 2.6.0-4mamba - automatic rebuild by autodist * Wed Oct 22 2008 Silvan Calarco 2.6.0-3mamba - networkprotocol.db: added patch for edonkey2000 protocol * Tue Sep 23 2008 Silvan Calarco 2.6.0-2mamba - updated default rule to allow access to all internet servicess accessed locally * Thu Sep 06 2007 Silvan Calarco 2.6.0-1mamba - update to 2.6.0 - protocoldb patch: added "allopen" rule to allow all TCP and UDP traffic - protocoldb patch: (re)added some rules for missing protocols - changed default rules to enable "allopen" by default for protocol served from internet and private lan to local * Fri Apr 20 2007 Davide Madrisan 2.5.1-3mamba - updated guarddog-firsttime - fixed static requirement for kdelibs * Tue Apr 17 2007 Davide Madrisan 2.5.1-2mamba - guarddog-firsttime moved to ${_sbindir} - modified the desktop file to match freedesktop standard * Tue Mar 06 2007 Silvan Calarco 2.5.1-1qilnx - update to version 2.5.1 by autospec * Mon Jul 10 2006 Davide Madrisan 2.4.0-5qilnx - updated %{name}-firsttime * Wed Jun 21 2006 Stefano Cotta Ramusino 2.4.0-4qilnx - fixed permissions of configuration files - use service tool for iptables * Tue Jun 13 2006 Davide Madrisan 2.4.0-3qilnx - do not link to libfam - specfile updated - use %%find_lang to collect locales * Wed Aug 17 2005 Silvan Calarco 2.4.0-2qilnx - added KDE menu link generic name * Mon Apr 18 2005 Silvan Calarco 2.4.0-1qilnx - new version build * Mon Apr 18 2005 Silvan Calarco 2.3.2-2qilnx - added guarddog-firsttime script * Mon Aug 02 2004 Silvan Calarco 2.3.2-1qilnx - new version build (this should fix the disable firewall bug) * Fri May 28 2004 Silvan Calarco 2.3.1-3qilnx - added a patch to netprotocoldb.xml that adds some protocols - default firewall config modified for LAN SMB protocol access * Fri May 21 2004 Silvan Calarco 2.3.1-2qilnx - fixed %%post script to support multiple local and dmz interfaces * Thu Mar 11 2004 Silvan Calarco 2.3.1-1qilnx - new version build * Sat Feb 28 2004 Davide Madrisan 2.2.0-2qilnx - specfile updated, `iptables restart' replaced by `iptables condrestart' - rebuild against KDE 3.2.0 (also fixes the -R linker paths security bug) * Fri Sep 19 2003 Silvan Calarco 2.2.0-1qilnx - new version rebuild * Wed Aug 05 2003 Silvan Calarco 2.1.6-1qilnx - updated to version 2.1.6 * Tue Jul 15 2003 Silvan Calarco 2.1.5-1qilnx - updated to version 2.1.5 - changed configuration for single interface firewall (DNS opened..) * Mon Jun 23 2003 Silvan Calarco 2.1.4-2qilnx - made automatic firewall configuration * Wed Jun 04 2003 Alessandro Ramazzina 2.1.4-1qilnx - creation of guarddog package