Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 3f8c19a59393827eead7c3a7986ff30e > files > 2

guarddog-2.4.0-2mdk.src.rpm

%define name guarddog
%define version 2.4.0
%define release 2mdk

Summary: 	Firewall Utility
Name: 		%{name}
Version: 	%{version}
Release: 	%{release}
#Packager: 	Laurent Culioli <laurent@mandrakesoft.com>
Source: 	%{name}-%{version}.tar.bz2
License: 	GPL
Group: 		System/Configuration/Networking
URL: 		http://www.simonzone.com/software/guarddog/
BuildRequires:	kdelibs-devel jpeg-devel XFree86-devel
BuildRequires:	libpng-devel arts-devel
Requires: 	userspace-ipfilter usermode /usr/bin/kdesu
Buildroot: 	%_tmppath/%name-buildroot

%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.

Development version.

%prep
rm -rf $RPM_BUILD_ROOT

%setup -q

%build

./configure --prefix=%_prefix --mandir=%_mandir --libdir=%_libdir \
	--disable-rpath --enable-final
# fix ifconfig parsing with LC_ALL instead LANG
perl -pi -e 's/LANG/LC_ALL/g' guarddog/guarddogdoc.cpp

%make

%install
#makeinstall 
%makeinstall_std bindir=%{_bindir}

install -d %buildroot/%_menudir/
cat > $RPM_BUILD_ROOT/%{_menudir}/%{name} <<EOF
?package(%{name}):\
needs="x11"\
section="System/Configuration/Networking"\
title="Guarddog"\
icon="%{name}.png"\
command="kdesu guarddog"\
longtitle="Firewall utility"
EOF

### pam entry
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
cat > $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/%{name} <<EOF
auth       sufficient   pam_rootok.so
auth       required     pam_stack.so service=system-auth
session    optional     pam_xauth.so
account    required     pam_permit.so
EOF

#fix menu warning
echo >> %buildroot/%_menudir/%{name}

#icons for rpmlint
mkdir -p %buildroot/{%_liconsdir,%_miconsdir,%_iconsdir}
ln -s %_datadir/icons/hicolor/48x48/apps/%{name}.png %buildroot/%_liconsdir/
ln -s %_datadir/icons/hicolor/32x32/apps/%{name}.png %buildroot/%_iconsdir/
ln -s %_datadir/icons/locolor/16x16/apps/%{name}.png %buildroot/%_miconsdir/

%find_lang %name

# kdedesktop2mdkmenu.pl Guarddog "Configuration/Networking"  %buildroot/%_datadir/applnk/System/guarddog.desktop %buildroot/%_menudir/guarddog

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %name.lang
%defattr(-,root,root)
%doc README TODO AUTHORS COPYING ChangeLog
%{_bindir}/*
%{_menudir}/%{name}
%dir %{_datadir}/apps/guarddog/
%{_datadir}/apps/guarddog/*
%dir %{_datadir}/sgml/protocoldb/
%{_datadir}/sgml/protocoldb/*
%{_datadir}/applnk/System/*.desktop
%doc %{_docdir}/HTML/en/guarddog
%{_datadir}/icons/hicolor/32x32/apps/*
%{_datadir}/icons/hicolor/48x48/apps/*
%{_datadir}/icons/locolor/16x16/apps/*
%{_datadir}/icons/locolor/32x32/apps/*
%{_miconsdir}/%{name}.png
%{_iconsdir}/%{name}.png
%{_liconsdir}/%{name}.png
%config(noreplace) %{_sysconfdir}/pam.d/%{name}


%post
%update_menus


if [ ! -e /etc/rc.firewall ]; then
  echo "#!/bin/sh" > /etc/rc.firewall
  echo "# This is just a place holder rc.firewall file so that when the links" >> /etc/rc.firewall
  echo "# /sbin/ifup-local and /sbin/ifdown-local have something valid to  point to." >> /etc/rc.firewall
  echo "# It will be over written once the Guarddog configuration utility is used." >> /etc/rc.firewall
  echo "# --Guarddog, http://www.simonzone.com/software/guarddog/" >> /etc/rc.firewall
  chmod u+x /etc/rc.firewall
fi


# Cleanup stuff from previous Guarddog installs.
if [ -L /sbin/ifup-local ]; then
  if [ `/usr/bin/readlink /sbin/ifup-local` == /etc/rc.firewall ]; then
    /bin/rm /sbin/ifup-local
  fi
fi
if [ -L /sbin/ifdown-local ]; then
  if [ `/usr/bin/readlink /sbin/ifdown-local` == /etc/rc.firewall ]; then
    /bin/rm /sbin/ifdown-local
  fi
fi
if [ -e /etc/ppp/ip-up.local ]; then
  if [ 0 -ne `/bin/grep -c /etc/rc.firewall /etc/ppp/ip-up.local` ]; then
    /bin/rm /etc/ppp/ip-up.local
  fi
fi
if [ -e /etc/ppp/ip-down.local ]; then
  if [ 0 -ne `/bin/grep -c /etc/rc.firewall /etc/ppp/ip-down.local` ]; then
    /bin/rm /etc/ppp/ip-down.local
  fi
fi

%postun
%clean_menus


%changelog
* Sat Jan 08 2005 Couriousous <couriousous@mandrake.org> 2.4.0-2mdk
- Rebuild to fix menu
- fix pam entry
- Use kdesu instead of consolehelper

* Sun Dec 26 2004 Couriousous <couriousous@mandrake.org> 2.4.0-1mdk
- Fix some rpmlint warning
- From: Nicolas Lécureuil <neoclust@zarb.org>
   - New release

* Tue Jun 15 2004 Laurent Culioli <laurent@mandrake.org> 2.2.0-2mdk
- rebuild with new gcc
- change menu section

* Wed Dec 17 2003 Marcel Pol <mpol@mandrake.org> 2.2.0-1mdk
- From Svetoslav Slavtchev:
    - update to 2.2.0
      (includes kernel 2.6 fixes)
    - tweak icon dirs
    - depend on userspace-ipfilter
      (provided by both ipables packages)
    - add initial usermode support
      (not sure about pam permissions.
      anyone initerested to fix them if needed)

* Sun May 11 2003 Laurent Culioli <laurent@pschit.net> 2.0.0-5mdk
- buildrequires

* Sat Feb 01 2003 Laurent Culioli <laurent@pschit.net> 2.0.0-4mdk
- fix bug #760

* Tue Jan 16 2003 Laurent Culioli <laurent@pschit.net> 2.0.0-3mdk
- rebuild

* Mon Aug 19 2002 Laurent Culioli <laurent@pschit.net> 2.0.0-2mdk
- Rebuild with gcc3.2

* Tue Jul 09 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.0.0-1mdk
- 2.0.0
- add locales

* Sat Jun 22 2002 Laurent MONTEL <lmontel@mandrakesoft.com> 1.9.16-1mdk
- 1.9.16

* Wed Jun 12 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.9.15-2mdk
- fixing menu and icons

* Sat Jun 01 2002 Laurent MONTEL <lmontel@mandrakesoft.com> 1.9.15-1mdk
- 1.9.15

* Wed Apr 03 2002 Laurent MONTEL <lmontel@mandrakesoft.com> 1.9.14-1mdk
- 1.9.14

* Fri Mar 08 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.9.12-1mdk
- 1.9.12

* Thu Feb 28 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.9.11-1mdk
- 1.9.11

* Fri Jan 25 2002 Laurent Culioli <laurent@mandrakesoft.com> 1.9.10-2mdk
- Rebuild

* Mon Jan 21 2002 Laurent Culioli <laurent@mandrakesoft.com> 1.9.10-1mdk
- 1.9.10

* Thu Dec 20 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.9.9-1mdk
- 1.9.9

* Fri Nov 30 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.9.8-1mdk
- 1.9.8

* Thu Oct 18 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.9.6-1mdk
- 1.9.6

* Tue Sep  4 2001 Laurent Culioli <laurent@mandrakesoft.com> 1.9.5-1mdk
- updated to version 1.9.5

* Sun Aug 26 2001 Laurent Culioli <laurent@mandrakesoft.com> 1.9.4-1mdk
- updated to version 1.9.4

* Tue Jul 10 2001 Laurent Culioli <laurent@mandrakesoft.com> 1.9.3-1mdk
- updated to version 1.9.3
- merged with  Simon Edward specfile

* Thu Mar 15 2001 David BAUDENS <baudens@mandrakesoft.com> 1.0.0-2mdk
- Rebuild against Qt 2.3.0

* Fri Jan 19 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.0.0-1mdk
- updated to 1.0.0

* Thu Jan 11 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.9.5-2mdk
- new url

* Fri Dec 22 2000 Lenny Cartier <lenny@mandrakesoft.com> 0.9.5-1mdk
- updated to 0.9.5

* Wed Nov 22 2000 Lenny Cartier <lenny@mandraksoft.com> 0.9.3-1mdk
- new in contribs
- updated to 0.9.3

* Mon Sep 2 2000 Simon Edwards <simon@simonzone.com> 0.9.2-1mdk
- RealPlayer support added.
- Small changes to the GUI to fix a few layout problems. Still
  not perfect, but much better.
- Manual is much more complete now. Now has a tutorial and FAQ section.

* Sun Jul 16 2000 Simon Edwards <simon@simonzone.com> 0.9.1-2mdk
- Fixed a small bug in the menu entry to Guarddog.

* Tue Jul 11 2000 Simon Edwards <simon@simonzone.com> 0.9.1-1mdk
- 0.9.1 release.
- Packaged with RPM for Mandrake 7.1 (should also work with Redhat).
- Some display glitch fixes, still more remain, grrr.
- Should now be able to find the protocol database file ok. Sorry to those people
  who tried to get it to run from source and failed.
- Uses sane defaults for checkboxes in new firewalls.