Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates-src > by-pkgid > 944cfe666fdb58f5fa2ccc47b6fbc711 > files > 3

scapy-2.4.0-3.1.mga7.src.rpm

Summary:    An interactive packet manipulation tool and network scanner
Name:       scapy
Version:    2.4.0
%define     subrel  1
Release:    %mkrel 3
Group:      Networking/Other
License:    GPL
URL:        http://www.secdev.org/projects/scapy
Source:     http://www.secdev.org/projects/scapy/files/%name-%version.tar.gz
Patch0:	    0d7ae2b039f650a40e511d09eb961c782da025d9.patch
BuildArch:  noarch
BuildRequires:  pkgconfig(python)
BuildRequires:  pkgconfig(python3)

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

%package -n python2-%{name}
Summary:        Interactive packet manipulation tool and network scanner
Provides:       %{name}
Obsoletes:      %{name}

%description -n python2-%{name}
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.

%package -n python3-%{name}
Summary:        Interactive packet manipulation tool and network scanner
Provides:       %{name}

%description -n python3-%{name}
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
%autopatch -p1

%build
%py2_build
%py3_build

%install
install -Dp -m0644 doc/scapy.1.gz %{buildroot}%{_mandir}/man1/scapy.1.gz
%py2_install
rm -f %{buildroot}%{python2_sitelib}/*egg-info/requires.txt

# Remove shebang
for FILE in %{buildroot}%{python2_sitelib}/scapy/contrib/*.py \
            %{buildroot}%{python2_sitelib}/scapy/pipetool.py \
            %{buildroot}%{python2_sitelib}/scapy/layers/inet6.py \
            %{buildroot}%{python2_sitelib}/scapy/tools/check_asdis.py; do
    sed -i.orig -e 1d "${FILE}"
    touch -r "${FILE}.orig" "${FILE}"
    rm "${FILE}.orig"
done

# Rename the executables
mv -f %{buildroot}%{_bindir}/scapy   %{buildroot}%{_bindir}/scapy2
mv -f %{buildroot}%{_bindir}/UTscapy %{buildroot}%{_bindir}/UTscapy2

%py3_install
rm -f %{buildroot}%{python3_sitelib}/*egg-info/requires.txt

# Remove shebang
for FILE in %{buildroot}%{python3_sitelib}/scapy/contrib/*.py \
            %{buildroot}%{python3_sitelib}/scapy/pipetool.py \
            %{buildroot}%{python3_sitelib}/scapy/layers/inet6.py \
            %{buildroot}%{python3_sitelib}/scapy/tools/check_asdis.py; do
    sed -i.orig -e 1d "${FILE}"
    touch -r "${FILE}.orig" "${FILE}"
    rm "${FILE}.orig"
done

# Rename the executables
mv -f %{buildroot}%{_bindir}/scapy   %{buildroot}%{_bindir}/scapy3
mv -f %{buildroot}%{_bindir}/UTscapy %{buildroot}%{_bindir}/UTscapy3

# Link the default to the python3 version of executables
ln -s %{_bindir}/scapy3   %{buildroot}%{_bindir}/scapy
ln -s %{_bindir}/UTscapy3 %{buildroot}%{_bindir}/UTscapy

%files -n python2-%{name}
%doc %{_mandir}/man1/scapy.1*
%{_bindir}/scapy2
%{_bindir}/UTscapy2
%{python2_sitelib}/scapy/*
%{python2_sitelib}/scapy-*.egg-info

%files -n python3-%{name}
%doc %{_mandir}/man1/scapy.1*
%{_bindir}/scapy
%{_bindir}/UTscapy
%{_bindir}/scapy3
%{_bindir}/UTscapy3
%{python3_sitelib}/scapy/*
%{python3_sitelib}/scapy-*.egg-info


%changelog
* Thu May 28 2020 neoclust <neoclust> 2.4.0-3.1.mga7
+ Revision: 1588698
- Add P0 to fix  CVE-2019-1010142 and CVE-2019-1010262 (mga#25954)

* Thu Jan 10 2019 shlomif <shlomif> 2.4.0-3.mga7
+ Revision: 1354286
- Rebuild for python3 3.7

* Fri Sep 21 2018 umeabot <umeabot> 2.4.0-2.mga7
+ Revision: 1291470
- Mageia 7 Mass Rebuild

* Sat May 12 2018 guillomovitch <guillomovitch> 2.4.0-1.mga7
+ Revision: 1228522
- new version 2.4.0
  provides python 2 and python 3 versions

* Tue Dec 13 2016 guillomovitch <guillomovitch> 2.3.3-1.mga6
+ Revision: 1074772
- new version 2.3.3

* Thu Sep 15 2016 guillomovitch <guillomovitch> 2.3.2-1.mga6
+ Revision: 1053188
- new version 2.3.2

* Thu Feb 18 2016 umeabot <umeabot> 2.3.1-2.mga6
+ Revision: 966579
- Mageia 6 Mass Rebuild

* Sat Jun 27 2015 guillomovitch <guillomovitch> 2.3.1-1.mga6
+ Revision: 846037
- new version 2.3.1

* Wed Oct 15 2014 umeabot <umeabot> 2.2.0-8.mga5
+ Revision: 742944
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 2.2.0-7.mga5
+ Revision: 730115
- rebuild for missing pythoneggs deps

* Tue Sep 16 2014 umeabot <umeabot> 2.2.0-6.mga5
+ Revision: 689049
- Mageia 5 Mass Rebuild
+ pterjan <pterjan>
- Rebuild for new Python

* Tue Oct 22 2013 umeabot <umeabot> 2.2.0-4.mga4
+ Revision: 544439
- Mageia 4 Mass Rebuild

* Tue Oct 15 2013 pterjan <pterjan> 2.2.0-3.mga4
+ Revision: 499847
- Rebuild to add different pythonegg provides for python 2 and 3

* Mon Jan 14 2013 umeabot <umeabot> 2.2.0-2.mga3
+ Revision: 381790
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Thu Jul 21 2011 guillomovitch <guillomovitch> 2.2.0-1.mga2
+ Revision: 127684
- new version
+ saispo <saispo>
- imported package scapy


* Mon Apr 19 2010 Sandro Cazzaniga <kharec@mandriva.org> 2.1.1-1mdv2010.1
+ Revision: 536859
- new release 2.1.1

* Thu Feb 04 2010 Michael Scherer <misc@mandriva.org> 2.1.0-1mdv2010.1
+ Revision: 500613
- update to 2.1.0

* Tue Sep 15 2009 Thierry Vignaud <tv@mandriva.org> 2.0.0.10-2mdv2010.0
+ Revision: 442817
- rebuild

* Fri Jan 23 2009 Jérôme Soyer <saispo@mandriva.org> 2.0.0.10-1mdv2009.1
+ Revision: 332892
- Add BR
- New upstream release

* Wed Jul 23 2008 Thierry Vignaud <tv@mandriva.org> 1.1.1-3mdv2009.0
+ Revision: 242646
- rebuild
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Fri Jul 27 2007 Pascal Terjan <pterjan@mandriva.org> 1.1.1-1mdv2008.0
+ Revision: 56244
- 1.1.1
- 1.1.1
- Import scapy



* Mon Mar 20 2006 Lenny Cartier <lenny@mandriva.com> 1.0.4-1mdk
- 1.0.4

* Wed Mar 01 2006 Nicolas Lécureuil <neoclust@mandriva.org> 1.0.3-1mdk
- New release 1.0.3

* Thu Oct 27 2005 Michael Scherer <misc@mandriva.org> 1.0.1-1mdk
- New release 1.0.1
- mkrel, new url

* Tue Jan 11 2005 Michael Scherer <misc@mandrake.org> 0.9.17-2mdk 
- fix import of module when binary us used directly ( thanks blino for bugreport )

* Sat Aug 28 2004 Michael Scherer <misc@mandrake.org> 0.9.17-1mdk
- New release 0.9.17
- rpmbuildupdate aware

* Thu Mar 18 2004 Michael Scherer <misc@mandrake.org> 0.9.16-1mdk
- 0.9.16
 
* Tue Aug 05 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.9.14-2mdk
- nmap as a dependency

* Fri Aug 01 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.9.14-1mdk
- mandrakized original package from Dag Wieers <dag@wieers.com>

* Sat May 17 2003 Dag Wieers <dag@wieers.com> - 0.9.13-0.beta
- Initial package. (using DAR)