tag 397958 +patch thanks Attached to this email you will find a patch for scapy-1.0.4-1 to comply with current python policy. It uses distutils and python-support.
Regards, F. Moya
diff -Nru scapy-1.0.4.orig/debian/postrm scapy-1.0.4/debian/postrm --- scapy-1.0.4.orig/debian/postrm 2006-11-10 18:36:07.000000000 +0100 +++ scapy-1.0.4/debian/postrm 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -#!/bin/sh - -[ -f /usr/bin/scapy.pyc ] && rm -f /usr/bin/scapy.pyc - -#DEBHELPER# - -exit 0 - diff -Nru scapy-1.0.4.orig/debian/rules scapy-1.0.4/debian/rules --- scapy-1.0.4.orig/debian/rules 2006-11-10 18:36:07.000000000 +0100 +++ scapy-1.0.4/debian/rules 2006-11-10 19:00:30.000000000 +0100 @@ -2,6 +2,8 @@ # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. +PYVERS=$(shell pyversions -vr) + # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 @@ -15,37 +17,42 @@ touch configure-stamp build: configure-stamp build-stamp -build-stamp: +build-stamp: $(PYVERS:%=build-python%) dh_testdir # Add here commands to compile the package. touch build-stamp +build-python%: + python$* setup.py build + touch $@ clean: dh_testdir dh_testroot - rm -f build-stamp configure-stamp + rm -f build-stamp configure-stamp build-python* dh_clean + $(RM) scapy.1 + $(RM) -r build + +install: pre-install $(PYVERS:%=install-python%) -install: build +pre-install: build dh_testdir dh_testroot dh_clean -k dh_installdirs + echo -e "#!/bin/sh\nexec /usr/bin/python /usr/share/python-support/python-scapy/scapy.py" > $(CURDIR)/debian/python-scapy/usr/bin/scapy + gzip -dc scapy.1.gz > scapy.1 - # Add here commands to install the package into debian/ipcheck. - #$(MAKE) install DESTDIR=$(CURDIR)/debian/ipcheck - - install scapy.py $(CURDIR)/debian/scapy/usr/bin/scapy.py +install-python%: + python$* setup.py install --root $(CURDIR)/debian/python-scapy # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot + dh_pysupport dh_installdocs dh_installman scapy.1.gz - dh_link /usr/bin/scapy.py /usr/bin/scapy - dh_link /usr/share/man/man1/scapy.1.gz /usr/share/man/man1/scapy.py.1.gz - dh_link /usr/bin/scapy.py /usr/lib/site-python/scapy.py dh_installchangelogs dh_compress dh_fixperms @@ -53,6 +60,7 @@ dh_gencontrol dh_md5sums dh_builddeb + binary-arch: build install # Nothing to do.. diff -Nru scapy-1.0.4.orig/setup.py scapy-1.0.4/setup.py --- scapy-1.0.4.orig/setup.py 1970-01-01 01:00:00.000000000 +0100 +++ scapy-1.0.4/setup.py 2006-11-10 19:03:40.000000000 +0100 @@ -0,0 +1,14 @@ +from distutils.core import setup + +DESC = """Packet generator/sniffer and network scanner.""" + +setup(name = 'scapy', + version = '1.0.4', + description = DESC, + author = 'Philippe Biondi', + author_email = '<[EMAIL PROTECTED]>', + url = 'http://www.secdev.org/projects/scapy/', + license = 'GPL v2 or later', + data_files = [('share/man/man1',['scapy.1'])], + py_modules = ['scapy'] + )
signature.asc
Description: This is a digitally signed message part