Commit 2fe312d4 authored by Iain Learmonth's avatar Iain Learmonth
Browse files

Use pybuild for Python 2 and 3 packages

parent 1e21dd41
Loading
Loading
Loading
Loading
+39 −2
Original line number Diff line number Diff line
@@ -5,7 +5,9 @@ Section: python
Priority: optional
Build-Depends: debhelper (>= 11),
               dh-python,
               python
               python,
               python3-all,
               python3-distutils
Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/ineteng-team/scapy
Vcs-Git: https://salsa.debian.org/ineteng-team/scapy.git
@@ -35,7 +37,7 @@ Suggests: tcpdump,
Provides: scapy
Breaks: scapy (<< 1.0.5-1)
Replaces: scapy (<< 1.0.5-1)
Description: Packet generator/sniffer and network scanner/discovery
Description: Packet generator/sniffer and network scanner/discovery (Python 2)
 Scapy is a powerful interactive packet manipulation tool, packet
 generator, network scanner, network discovery, packet sniffer, etc. It
 can for the moment replace hping, 85% of nmap, arpspoof, arp-sk, arping,
@@ -46,3 +48,38 @@ Description: Packet generator/sniffer and network scanner/discovery
 (request, answer) and a list of unmatched packets. This has the big advantage
 over tools like nmap or hping that an answer is not reduced to
 (open/closed/filtered), but is the whole packet.
 .
 This package contains the Python 2 version of the library and scapy executable.

Package: python3-scapy
Architecture: all
Depends: ${python3:Depends},
         ${misc:Depends}
Recommends: tcpdump,
            ipython3,
            python3-matplotlib,
            python3-pyx,
            graphviz
Suggests: tcpreplay,
          wireshark,
          imagemagick,
          python3-crypto,
          ebtables,
          sox,
          gv,
          hexer,
          librsvg2-bin,
          python3-geoip
Description: Packet generator/sniffer and network scanner/discovery (Python 3)
 Scapy is a powerful interactive packet manipulation tool, packet
 generator, network scanner, network discovery, packet sniffer, etc. It
 can for the moment replace hping, 85% of nmap, arpspoof, arp-sk, arping,
 tcpdump, tethereal, p0f, ....
 .
 In scapy you define a set of packets, then it sends them, receives
 answers, matches requests with answers and returns a list of packet couples
 (request, answer) and a list of unmatched packets. This has the big advantage
 over tools like nmap or hping that an answer is not reduced to
 (open/closed/filtered), but is the whole packet.
 .
 This package contains the Python 3 version of the library and scapy executable.
+12 −1
Original line number Diff line number Diff line
@@ -3,9 +3,10 @@
#export DH_VERBOSE=1

include /usr/share/dpkg/pkg-info.mk
export PYBUILD_NAME=scapy

%:
	dh $@ --with=python2
	dh $@ --with=python2,python3 --buildsystem=pybuild

override_dh_auto_configure:
	echo -n $(DEB_VERSION_UPSTREAM) > scapy/VERSION
@@ -14,5 +15,15 @@ override_dh_auto_clean:
	dh_auto_clean
	-rm scapy/VERSION

override_dh_auto_install:
	dh_auto_install
	mv debian/python3-scapy/usr/bin/scapy \
	   debian/python3-scapy/usr/bin/scapy3
	mv debian/python3-scapy/usr/share/man/man1/scapy.1.gz \
	   debian/python3-scapy/usr/share/man/man1/scapy3.1.gz

override_dh_auto_test:
	echo "Tests disabled, dependencies not installed during build"

get-orig:
	uscan --download-current-version --destdir ../tarballs