%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: switzerland Version: 0.0.7 Release: 1%{?dist} Summary: A client/server software to detect intereference with Internet traffic Group: Applications/Internet License: GPLv3 and Python URL: http://www.eff.org/testyourisp/switzerland Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildRequires: libpcap-devel %description Switzerland is client/server software to detect when ISPs, networks or firewalls interfere with Internet traffic. Switzerland clients summarize incoming and outgoing packets to a trusted server, which verifies that pairs of clients receive what each other sent. If a third party injects, alters or drops packets en route between clients, the Switzerland server alerts the clients and records data about the event for further analysis. %prep %setup -q %build # Remove CFLAGS=... for noarch packages (unneeded) CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT # fix perms on collector chmod 755 $RPM_BUILD_ROOT/%{_bindir}/FastCollector # Fix scripts to use python2.6 sed -ie 's/python2.5/python2.6/' $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/common/PcapLogger.py sed -ie 's/python2.5/python2.6/' $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/common/Protocol.py sed -ie 's/python2.5/python2.6/' $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/common/Messages.py sed -ie 's/python2.5/python2.6/' $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/server/Switzerland.py sed -ie 's/python2.5/python2.6/' $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/server/Reconciliator.py sed -ie 's/python2.5/python2.6/' $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/client/TimeManager.py sed -ie 's/python2.5/python2.6/' $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/client/PacketListener.py # fix permissions chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/common/PcapLogger.py chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/common/Protocol.py chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/common/Messages.py chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/server/Switzerland.py chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/server/Reconciliator.py chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/client/TimeManager.py chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/switzerland/client/PacketListener.py %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYING CREDITS BUGS.txt README.txt INSTALL.txt %{_bindir}/FastCollector %{_bindir}/switzerland-client %{_bindir}/switzerland-server %{python_sitearch}/* %changelog * Wed Jan 14 2009 Kevin Fenzi - 0.0.7-1 - Initial version for Fedora