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 $^
--- /dev/null
+mtetherd (0.1-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Gregor Riepl <onitake@gmail.com> Fri, 23 Jul 2010 21:28:22 +0200
+
--- /dev/null
+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
--- /dev/null
+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.
+
--- /dev/null
+usr/sbin
+etc/event.d
--- /dev/null
+.\" 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>.
--- /dev/null
+#!/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
+
+
--- /dev/null
+#!/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
+
+
--- /dev/null
+#!/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