Implement Makefile
Stefan Bund [Sat, 7 Nov 2009 15:42:13 +0000 (16:42 +0100)]
.gitignore
Makefile [new file with mode: 0644]
debian/.gitignore
debian/changelog
debian/gbp.conf [deleted file]
debian/rules
updateversion.sh [deleted file]

index ad34549..a59d165 100644 (file)
@@ -1 +1,2 @@
 /*-stamp
+/mapsectorsh
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..a66e17c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,61 @@
+
+lib/00_version.sh:
+       echo "version='`git describe --tag`'" >"`dirname "$0"`"/lib/00_version.sh
+.PHONY: lib/00_version.sh
+
+mapsectorsh: mapsector lib/[0-9][0-9]_*.sh
+       @echo "generating $@"
+       @(                                                      \
+       sed -n -e '1p' $<;                                      \
+       echo "#";                                               \
+       echo "# $@ automatically generated from";               \
+       for script in $^; do                                    \
+               echo "#         $$script";                      \
+       done;                                                   \
+       sed -n -e '2,/^load$$/p' $<;                            \
+       for script in `ls lib/[0-9][0-9]_*.sh | sort`; do       \
+               echo "#### $$script";                           \
+               echo;                                           \
+               cat $$script;                                   \
+               echo;                                           \
+       done;                                                   \
+       sed -n -e '/^load$$/,$$p' $<;                           \
+       ) >$@
+       @sed -i -e 's/^load$$/###########################################################################/' $@
+       @chmod ugo+rx $@
+
+debian/changelog:
+       @echo "generating debian/changelog"
+       @(                                                                                        \
+       lasttag="HEAD";                                                                           \
+       (git tag -l 'v*'; echo) | while read tag; do                                              \
+               case "$$lasttag" in                                                               \
+               HEAD) version="`git describe --tag --match='v*' | sed -e 's/-/~/' -e 's/-/./g'`"; \
+                     release="UNRELEASED" ;;                                                     \
+               v*)   version="$${lasttag#v}";                                                    \
+                     release="unstable" ;;                                                       \
+               esac;                                                                             \
+               echo "mapsector ($$version) $$release; urgency=low";                              \
+               echo;                                                                             \
+               git log --pretty=oneline --abbrev-commit $$tag$${tag:+..}$$lasttag                \
+                       | while read commit description; do                                       \
+                       echo "  * [$$commit] $$description";                                      \
+               done;                                                                             \
+               echo;                                                                             \
+               date="`git log --format='%cD' $$lasttag'^!'`";                                    \
+               author="`git log --format='%an <%ae>' $$lasttag'^!'`";                            \
+               echo " -- $$author  $$date";                                                      \
+               echo;                                                                             \
+               lasttag="$$tag" ;                                                                 \
+       done;                                                                                     \
+       ) >debian/changelog
+.PHONY: debian/changelog
+
+prepare: lib/00_version.sh debian/changelog
+.PHONY: prepare
+
+clean:
+       rm -f mapsectorsh
+       rm -f debian/changelog
+       rm -f lib/00_version.sh
+.PHONY: clean
index 06e32d0..e52a317 100644 (file)
@@ -1,3 +1,4 @@
-/mapsector.debhelper.log
-/mapsector/
+/*.log
+/*/
 /files
+/changelog
index 3c4fc18..a1662db 100644 (file)
@@ -1,17 +1,17 @@
-mapsector (0.0.1~1.gbpc67543) UNRELEASED; urgency=low
+mapsector (v0.0.0~6.ga289841) UNRELEASED; urgency=low
 
-  ** SNAPSHOT build @c6754307a8e5e3a0666641ce0916d639b95053f4 **
+  * [a289841] Fix/finish modularization
+  * [cd564bd] debianize
+  * [c675430] add updateversion.sh script
+  * [9b845b7] Add --version/-V command line option
+  * [63c6e66] Add version variable
+  * [1f26a61] modularize
 
-  * [1f26a61a] modularize
-  * [63c6e663] Add version variable
-  * [9b845b7a] Add --version/-V command line option
-  * [c6754307] add updateversion.sh script
-  * [cd564bd2] debianize
-
- -- Stefan Bund <stefan@j32.de>  Fri, 06 Nov 2009 15:04:36 +0100
+ -- Stefan Bund <stefan@j32.de>  Sat, 7 Nov 2009 10:05:22 +0100
 
 mapsector (0.0.0) unstable; urgency=low
 
-  * Initial Release.
+  * [0680954] initial commit
+
+ -- Stefan Bund <stefan@j32.de>  Fri, 6 Nov 2009 12:15:06 +0100
 
- -- Stefan Bund <stefan@j32.de>  Fri, 06 Nov 2009 14:13:42 +0100
diff --git a/debian/gbp.conf b/debian/gbp.conf
deleted file mode 100644 (file)
index a9e622c..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-# Configuration file for git-buildpackage and friends
-
-[DEFAULT]
-# the default build command:
-#builder = debuild -i\.git/ -I.git
-# the default clean command:
-#cleaner = debuild clean
-# the default branch for upstream sources:
-#upstream-branch = upstream
-# the default branch for the debian patch:
-#debian-branch = master
-# the default tag formats used:
-#upstream-tag = v%(version)s
-debian-tag = v%(version)s
-# use pristine-tar:
-#pristine-tar = True
-
-# Options only affecting git-buildpackage
-[git-buildpackage]
-#upstream-branch = dfsgclean
-# uncomment this to automatically GPG sign tags
-sign-tags = False
-# keyid to GPG sign tags with
-#keyid = 0xdeadbeef
-# push to a remote repository after a successful tag: 
-#posttag = git-push git.example.com
-# use this for more svn-buildpackage like behaviour:
-#export-dir = ../build-area/
-#tarball-dir = ../tarballs/
-#ignore-new = True
-
-# Options only affecting git-import-orig
-[git-import-orig]
-#upstream-branch = newupstream
-#debian-branch = dfsgclean
-#filter = .svn
-
-# Options only affecting git-import-dsc
-[git-import-dsc]
-#upstream-branch = svn-upstream
-#filter = [ 'CVS', '.cvsignore' ]
-
-# Options only affecting git-dch
-[git-dch]
-#git-log = --no-merges
-#snapshot-number = snapshot + 1
-# include 0 digits of the commit id in the changelog enty
-id-length = 8
-# don't include information from meta tags
-#meta = False
-# what tags to look for to generate bug-closing changelog entries
-#meta-closes = Closes|LP
-
index ca366b2..aef0e08 100755 (executable)
@@ -27,7 +27,7 @@ build-stamp: configure-stamp
        dh_testdir
 
 #      # Add here commands to compile the package.
-       ./updateversion.sh
+
        touch $@
 
 clean: 
diff --git a/updateversion.sh b/updateversion.sh
deleted file mode 100755 (executable)
index 2391596..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-echo "version='`git describe --tag`'" >"`dirname "$0"`"/lib/00_version.sh