%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: GNS3 Version: 0.6.1 Release: 1%{?dist} License: GPLv2+ Group: Applications/Emulators Summary: A graphical frontend for dynamips Cisco 7200 Simulator Source0: http://downloads.sourceforge.net/gns-3/%{name}-%{version}-src.tar.bz2 Source1: http://downloads.sourceforge.net/gns-3/%{name}-0.5-tutorial.pdf Source2: %{name}.desktop Source3: %{name}.png Source4: gns3.ini URL: http://www.gns3.net/ Requires: dynamips >= 0.2.8 Requires: PyQt4 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n) BuildRequires: desktop-file-utils BuildRequires: python-devel %description GNS-3 is a graphical network simulator that allows you to design complex network topologies. You may run simulations or configure devices ranging from simple workstations to powerful Cisco routers. It is based on NS-3, a discrete-event network simulator for Internet systems, and Dynamips, an IOS emulator which allows users to run IOS binary images from Cisco Systems. %prep %setup -q -n %{name}-%{version}-src install -p -m 644 %{SOURCE1} . install -p -m 644 %{SOURCE4} . install -p -m 644 pemu/pemubin.py src/GNS3 install -p -m 644 pemu/pemuwrapper.py src/GNS3 %build CFLAGS="%{optflags}" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT --prefix %{_prefix} --optimize=2 chmod -x CHANGELOG README TODO LICENSE AUTHORS install -D -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png install -D -m 644 docs/man/gns3.1 $RPM_BUILD_ROOT%{_mandir}/man1/gns3.1 desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE2} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root,-) %doc CHANGELOG README TODO LICENSE AUTHORS GNS3-0.5-tutorial.pdf gns3.ini %{_bindir}/gns3 %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.png %{_mandir}/man1/gns3.1.gz %{python_sitearch}/%{name}/ %{python_sitearch}/%{name}*.egg-info %changelog * Sun May 17 2009 nucleo - 0.6.1-1 - Initial RPM release