Added dpkg packaging info
authorGregor Riepl <onitake@gmail.com>
Tue, 27 Jul 2010 20:33:17 +0000 (22:33 +0200)
committerGregor Riepl <onitake@gmail.com>
Tue, 27 Jul 2010 20:33:17 +0000 (22:33 +0200)
Added DESTDIR capability to makefile

Makefile
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/manpage.8.ex [new file with mode: 0644]
debian/postinst.ex [new file with mode: 0644]
debian/prerm.ex [new file with mode: 0644]
debian/rules [new file with mode: 0755]

index 5cc417f..fa9330f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,14 +14,14 @@ clean:
        rm -f *.o mtetherd
 
 install: mtetherd
-       install -m 755 -D mtetherd $(PREFIX)/sbin/mtetherd
-       install -m 644 -D event.d-mtetherd /etc/event.d/mtetherd
-       install -m 644 -D README $(PREFIX)/share/doc/mtetherd/README
+       install -m 755 -D mtetherd $(DESTDIR)/$(PREFIX)/sbin/mtetherd
+       install -m 644 -D event.d-mtetherd $(DESTDIR)/etc/event.d/mtetherd
+       install -m 644 -D README $(DESTDIR)/$(PREFIX)/share/doc/mtetherd/README
 
 uninstall:
-       rm -f $(PREFIX)/sbin/mtetherd
-       rm -f /etc/event.d/mtetherd
-       rm -rf $(PREFIX)/share/doc/mtetherd
+       rm -f $(DESTDIR)/$(PREFIX)/sbin/mtetherd
+       rm -f $(DESTDIR)/etc/event.d/mtetherd
+       rm -rf $(DESTDIR)/$(PREFIX)/share/doc/mtetherd
 
 %.o: %.c
        $(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $^
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..bc8abe1
--- /dev/null
@@ -0,0 +1,6 @@
+mtetherd (0.1-1) unstable; urgency=low
+
+  * Initial release
+
+ -- Gregor Riepl <onitake@gmail.com>  Fri, 23 Jul 2010 21:28:22 +0200
+
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..a4a7b08
--- /dev/null
@@ -0,0 +1,24 @@
+Source: mtetherd
+Section: user/system
+Priority: optional
+Maintainer: Gregor Riepl <onitake@gmail.com>
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.7.2
+
+Package: mtetherd
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends} iptables (>= 1.4.6), bluetooth-dun (>= 1.1), dnsmasq (>= 2.45)
+Description: Enable tethering via USB networking and Bluetooth PAN
+ mtetherd allows you to use your N900 as an Internet router.
+ Once a USB network or Bluetooth PAN connection is opened to the device,
+ it will automatically configure networking and start a dnsmasq instance
+ that serves DHCP requests and forwards DNS queries.
+ You can also use it to automatically configure network interfaces
+ for development.
+ .
+ To use tethering via USB, you also need mad-developer installed to
+ activate g_ether, or you can do it manually via the console.
+ .
+ You can connect to your N900 through the following IPs:
+ USB: 192.168.253.254
+ Bluetooth: 192.168.254.254
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..bec33fe
--- /dev/null
@@ -0,0 +1,26 @@
+This package was debianized by Gregor Riepl <onitake@gmail.com> on
+Fri, 23 Jul 2010 21:28:22 +0200.
+
+Copyright: (c) 2010 Gregor Riepl <onitake@gmail.com>
+
+License:
+
+    This program 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 3 of the License, or
+    (at your option) any later version.
+
+    This program 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 <http://www.gnu.org/licenses/>.
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-3'.
+
+The Debian packaging is (c) 2010, Gregor Riepl <onitake@gmail.com> and
+is licensed under the GPLv3, see above.
+
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..dc34a69
--- /dev/null
@@ -0,0 +1,2 @@
+usr/sbin
+etc/event.d
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..e845566
--- /dev/null
@@ -0,0 +1 @@
+README
diff --git a/debian/manpage.8.ex b/debian/manpage.8.ex
new file mode 100644 (file)
index 0000000..cc5cfef
--- /dev/null
@@ -0,0 +1,42 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH MTETHERD 8 "July 23, 2010"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+mtetherd \- Maemo tethering daemon
+.SH SYNOPSIS
+.B start mtetherd
+.br
+.B stop mtetherd
+.SH DESCRIPTION
+.B mtetherd
+allows you to use your N900 as an Internet router.
+Once a USB network or Bluetooth PAN connection is opened to the device,
+it will automatically configure networking and start a dnsmasq instance
+that serves DHCP requests and forwards DNS queries.
+You can also use it to automatically configure network interfaces
+for development.
+.SH IP ADDRESSES
+.SS USB
+N900: 192.168.253.254
+.br
+Host: 192.168.253.1 - 192.168.253.253
+.SS Bluetooth
+N900: 192.168.254.254
+.br
+Host: 192.168.254.1 - 192.168.254.253
+.SH AUTHOR
+mtetherd was written by Gregor Riepl <onitake@gmail.com>.
diff --git a/debian/postinst.ex b/debian/postinst.ex
new file mode 100644 (file)
index 0000000..47c10de
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+# postinst script for mtetherd
+#
+# 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 http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+        start mtetherd
+    ;;
+
+    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
+
+
diff --git a/debian/prerm.ex b/debian/prerm.ex
new file mode 100644 (file)
index 0000000..7c63929
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh
+# prerm script for mtetherd
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+        stop mtetherd
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm 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
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..03df8f4
--- /dev/null
@@ -0,0 +1,98 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+
+       touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+       dh_testdir
+
+       # Add here commands to compile the package.
+       $(MAKE)
+       #docbook-to-man debian/mtetherd.sgml > mtetherd.1
+
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       -$(MAKE) clean
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into debian/mtetherd.
+       $(MAKE) DESTDIR=$(CURDIR)/debian/mtetherd install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+       dh_installdocs
+       dh_installexamples
+#      dh_install
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_perl
+#      dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure