From 446d7e34d4ef7dc1493b8c614aae839f259197ff Mon Sep 17 00:00:00 2001 From: Marco Pfatschbacher Date: Tue, 29 Sep 2015 23:30:30 +0200 Subject: [PATCH] Add debian source packaging stuff Build command: $ debuild -us -uc -b --- Makefile.debian | 32 ++++++++++++++++++++++++++++++++ debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 17 +++++++++++++++++ debian/copyright | 21 +++++++++++++++++++++ debian/docs | 1 + debian/rules | 11 +++++++++++ 7 files changed, 88 insertions(+) create mode 100644 Makefile.debian create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100755 debian/rules diff --git a/Makefile.debian b/Makefile.debian new file mode 100644 index 0000000..2830956 --- /dev/null +++ b/Makefile.debian @@ -0,0 +1,32 @@ + +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + +LD=$(CC) + +CFLAGS+= -Wall +CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes +CFLAGS+= -Wmissing-declarations +CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual +CFLAGS+= -Wsign-compare +LDADD= -lutil +PREFIX?= $(DESTDIR)/usr +BINDIR?= $(PREFIX)/bin +MANDIR?= $(DESTDIR)/usr/share/man/man1 + +CPPFLAGS+=-DHAVE_PTY_H -DHAVE_UTMP_H + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c $< -o $@ + +sshdrill: sshdrill.o strlcpy.o + $(LD) -o $@ sshdrill.o strlcpy.o $(LDFLAGS) $(LDADD) + +install: sshdrill + install -d $(BINDIR) + install -d $(MANDIR) + install sshdrill $(BINDIR) + install sshdrill.1 $(MANDIR) + +clean: + rm -f *.o sshdrill diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..a90aa29 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +sshdrill (0.9-1) stable; urgency=low + + * Initial release + + -- Marco Pfatschbacher Fri, 25 Sep 2015 15:06:03 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..807a901 --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: sshdrill +Section: net +Priority: extra +Maintainer: Marco Pfatschbacher +Build-Depends: debhelper (>= 8.0.0) +Standards-Version: 3.9.3 + +Package: sshdrill +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: a ssh wrapper to automate tunnel creation over multiple jump hosts. + Imagine you are logged into a customer's server. To get there, you had + to ssh through one or more jump hosts, and now you need to set up a + port forwarding to debug a service. + Configuring the intermediate tunnels to get a port forwarded through + all the jump hosts can be tedious. sshdrill automates this task for + you. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..f965433 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Marco Pfatschbacher + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..ad1245d --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +Readme.md diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..83305b5 --- /dev/null +++ b/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ + +override_dh_auto_configure: + cp -f Makefile.debian Makefile