%define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %define python_sitelib64 %(python_64 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") Name: scapy Version: 2.0.0.11 Release: 1 Summary: Interactive packet manipulation tool and network scanner Group: Applications/Internet License: GPLv2 URL: http://www.secdev.org/projects/scapy/ Source0: http://www.secdev.org/projects/scapy/files/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python >= 2.6.2 BuildRequires: python-devel >= 2.6.2 Requires: python >= 2.6.2 %define _libdir64 %{_prefix}/lib64 %description Scapy is a powerful interactive packet manipulation program built on top of the Python interpreter. It can be used to forge or decode packets of a wide number of protocols, send them over the wire, capture them, match requests and replies, and much more. %prep %setup -q %patch0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build cd 64bit python_64 setup.py build cd ../32bit python setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit python_64 setup.py install --skip-build --root ${RPM_BUILD_ROOT} mv ${RPM_BUILD_ROOT}%{_libdir} ${RPM_BUILD_ROOT}%{_libdir64} cd ../32bit python setup.py install --skip-build --root ${RPM_BUILD_ROOT} %{__rm} -f ${RPM_BUILD_ROOT}%{python_sitelib}/*egg-info/requires.txt %{__rm} -f ${RPM_BUILD_ROOT}%{python_sitelib64}/*egg-info/requires.txt cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -s ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %{_bindir}/scapy %{_bindir}/UTscapy %{_mandir}/man1/scapy.1* %{python_sitelib}/scapy/* %{python_sitelib64}/scapy/* %{python_sitelib}/scapy-*.egg-info %{python_sitelib64}/scapy-*.egg-info /usr/bin/* %changelog * Tue Nov 12 2013 Michael Perzl - 2.0.0.11-1 - updated to version 2.0.0.11 * Thu Jul 07 2011 Michael Perzl - 2.0.0.10-1 - first version for AIX V5.1 and higher