Просмотр исходного кода

Add debian/.

This seems to install the package and do the job.
Michele Orrù лет назад: 8
Родитель
Сommit
00c899bda7

+ 6 - 0
debian/README.Debian

@@ -0,0 +1,6 @@
+portspoof-ng for Debian
+----------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- Michele Orru` <maker@tumbolandia.net>  Sun, 18 Dec 2016 23:04:53 +0100

+ 10 - 0
debian/README.source

@@ -0,0 +1,10 @@
+portspoof-ng for Debian
+----------------------
+
+<this file describes information about the source package, see Debian policy
+manual section 4.14. You WILL either need to modify or delete this file>
+
+
+
+ -- Michele Orru` <maker@tumbolandia.net>  Sun, 18 Dec 2016 23:04:53 +0100
+

+ 5 - 0
debian/changelog

@@ -0,0 +1,5 @@
+portspoof-ng (0.1-1) unstable; urgency=medium
+
+  * Initial release.
+
+ -- Michele Orru` <maker@tumbolandia.net>  Sun, 18 Dec 2016 23:04:53 +0100

+ 1 - 0
debian/compat

@@ -0,0 +1 @@
+9

+ 16 - 0
debian/control

@@ -0,0 +1,16 @@
+Source: portspoof-ng
+Section: unknown
+Priority: optional
+Maintainer: Michele Orru` <maker@tumbolandia.net>
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.8
+Homepage: http://git.tumbolandia.net/maker/portspoof-ng
+#Vcs-Git: https://anonscm.debian.org/collab-maint/portspoof-ng.git
+#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/portspoof-ng.git
+
+Package: portspoof-ng
+Architecture: any
+Depends: rustc, cargo, iptables-persistent
+Description: Spoof open services on the local machine.
+ Portspoof-ng acts as a little firewall that instead of fighting port scan
+ embraces them. If your adversary discovers 2^16 open ports, what's there to do?

+ 39 - 0
debian/copyright

@@ -0,0 +1,39 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: portspoof-ng
+Source: <url://example.com>
+
+Files: *
+Copyright: 2016 Michele Orrù
+License: MIT-License
+ Licensed under the Apache License, Version 2.0 <LICENSE-APACHE
+ or http://www.apache.org/licenses/LICENSE-2.0> or the MIT
+ license <LICENSE-MIT or http://opensource.org/licenses/MIT>,
+ at your option. All files in the project carrying such
+ notice may not be copied, modified, or distributed except
+ according to those terms.
+
+# If you want to use GPL v2 or later for the /debian/* files use
+# the following clauses, or change it to suit. Delete these two lines
+Files: debian/*
+Copyright: 2016 Michele Orru` <maker@tumbolandia.net>
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
+# Please avoid picking licenses with terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.

+ 3 - 0
debian/files

@@ -0,0 +1,3 @@
+portspoof-ng-dbgsym_0.1-1_amd64.deb debug extra
+portspoof-ng_0.1-1_amd64.buildinfo unknown optional
+portspoof-ng_0.1-1_amd64.deb unknown optional

+ 2 - 0
debian/portspoof-ng-docs.docs

@@ -0,0 +1,2 @@
+README.source
+README.Debian

+ 1 - 0
debian/portspoof-ng.install

@@ -0,0 +1 @@
+target/release/portspoof /usr/bin/

+ 3 - 0
debian/portspoof-ng.substvars

@@ -0,0 +1,3 @@
+shlibs:Depends=libc6 (>= 2.18), libgcc1 (>= 1:4.2)
+misc:Depends=
+misc:Pre-Depends=

+ 45 - 0
debian/postinst

@@ -0,0 +1,45 @@
+#!/bin/sh
+# postinst script for portspoof-ng
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+IPTABLES='/sbin/iptables'
+COMMAND="${IPTABLES} -t nat -A PREROUTING -p tcp --destination ${IP} \
+-m multiport ! --dports ${PORTS} -j REDIRECT --to-ports ${LISTENPORT}"
+
+case "$1" in
+    configure)
+        printf "portspoof-ng needs iptables to be configured."
+        printf "I do something like: \n"
+        printf "$COMMAND\n"
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

+ 49 - 0
debian/rules

@@ -0,0 +1,49 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+
+build:
+	cargo build --release
+
+binary-arch: build
+binary-indep: build
+
+binary: binary-arch binary-indep
+	dh_testdir -a
+	dh_testroot -a
+	dh_install -a
+	dh_installdocs -a
+	dh_installchangelogs -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+# cargo install --root /usr --bin portspoof
+
+clean:
+	dh_testdir
+	dh_testroot
+	dh_clean
+	cargo clean
+
+# dh_make generated override targets
+# This is example for Cmake (See https://bugs.debian.org/641051 )
+#override_dh_auto_configure:
+#	dh_auto_configure -- #	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

+ 1 - 0
debian/source/format

@@ -0,0 +1 @@
+3.0 (quilt)