add install routine and debian files
authorKonrad Rosenbaum <konrad@silmor.de>
Mon, 23 Apr 2012 14:07:59 +0000 (16:07 +0200)
committerKonrad Rosenbaum <konrad@silmor.de>
Mon, 23 Apr 2012 14:07:59 +0000 (16:07 +0200)
Makefile
configure [new file with mode: 0755]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]

index c1caea3..dbb50b5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@
 CC=gcc
 CFLAGS=-Wall -g
 LDFLAGS=
+INSTALL=install
 
 CFILES=$(shell echo *.c)
 OFILES=$(CFILES:.c=.o)
@@ -23,12 +24,17 @@ clean:
        -rm -f *.o *~ *.bak help.h
 
 distclean: clean
-       -rm -f ip6calc
+       -rm -f ip6calc .config.make
 
 .PHONY: clean distclean
 
-config configure:
-       @echo Dummy configure.
+.config.make:
+       ./configure
+
+include .config.make
 
 install:
-       echo $(DISTROOT)
+       $(INSTALL) -t $(DESTDIR)$(BINDIR) -s ip6calc
+       $(INSTALL) -t $(DESTDIR)$(BINDIR) ip4toip6
+       $(INSTALL) -m 644 -t $(DESTDIR)$(DOCDIR) help.txt
+       $(INSTALL) -m 644 -t $(DESTDIR)$(DOCDIR) README
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..df0cb45
--- /dev/null
+++ b/configure
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+echo $*
+
+bindir=/bin
+mandir=/share/man
+prefix=/usr/local
+docdir=/share/doc/ip6calc
+
+TEMP=$(getopt -l prefix: -l mandir: -l bindir: -- "" "$@")
+
+eval set -- "$TEMP"
+while true ; do
+  case "$1" in
+    --prefix) prefix=$2 ; shift 2 ;;
+    --mandir) mandir=$2 ; shift 2 ;;
+    --bindir) bindir=$2 ; shift 2 ;;
+    --docdir) docdir=$2 ; shift 2 ;;
+    --) break ;;
+    *) shift ;;
+  esac
+done
+
+echo "Configuration for ip6calc:"
+echo " PREFIX: $prefix"
+echo " Binaries: $prefix$bindir"
+echo " Man Pages: $prefix$mandir"
+echo " Documentation: $prefix$docdir"
+
+CM=.config.make
+echo '#generated file' >$CM
+echo "PREFIX=$prefix" >>$CM
+echo "BINDIR=$prefix$bindir" >>$CM
+echo "MANDIR=$prefix$mandir" >>$CM
+echo "DOCDIR=$prefix$docdir" >>$CM
+
+exit 0
\ No newline at end of file
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..be2a1fb
--- /dev/null
@@ -0,0 +1,16 @@
+Source: ip6calc
+Section: unknown
+Priority: extra
+Maintainer: Konrad Rosenbaum <konrad@devant.devant.lan.local>
+Build-Depends: debhelper (>= 7.0.50~)
+Standards-Version: 3.8.4
+Homepage: http://silmor.de/ipv6.calc.php
+Vcs-Git: git://git.silmor.de/konrad/ip6calc.git
+#Vcs-Browser: http://git.debian.org/?p=collab-maint/ip6calc.git;a=summary
+
+Package: ip6calc
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: IPv6 address calculation tool
+ This package contains the ip6calc program that allows to reformat, merge,
+ mangle and recalculate IPv6 addresses.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..ffa4939
--- /dev/null
@@ -0,0 +1,26 @@
+This work was packaged for Debian by:
+
+    Konrad Rosenbaum <konrad@silmor.de> on Fri, 20 Apr 2012 11:40:29 +0200
+
+It was downloaded from:
+
+    git://git.silmor.de/konrad/ip6calc.git
+
+Upstream Author(s):
+
+    Konrad Rosenbaum <konrad@silmor.de>
+
+Copyright:
+
+    Copyright (C) 2009,2012 Konrad Rosenbaum
+
+License:
+
+    GPLv3
+
+The Debian packaging is:
+
+    Copyright (C) 2012 Konrad Rosenbaum <konrad@silmor.de>
+
+and is licensed under the GPL version 3,
+see "/usr/share/common-licenses/GPL-3".
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/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..b760bee
--- /dev/null
@@ -0,0 +1,13 @@
+#!/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
+
+%:
+       dh $@ 
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)