adjusted debian packaging for magicsmoke 2
authorKonrad Rosenbaum <konrad@silmor.de>
Sun, 15 Apr 2012 19:15:27 +0000 (21:15 +0200)
committerKonrad Rosenbaum <konrad@silmor.de>
Sun, 15 Apr 2012 19:15:27 +0000 (21:15 +0200)
debian/control
debian/gencl
debian/magicsmoke2-client.postinst [deleted file]
debian/magicsmoke2-client.postrm [deleted file]
debian/magicsmoke2-client.prerm [deleted file]
debian/rules

index a7f025e..ce7fee3 100644 (file)
@@ -2,15 +2,16 @@ Source: magicsmoke2
 Section: main
 Priority: extra
 Maintainer: Konrad Rosenbaum <konrad@silmor.de>
-Build-Depends: debhelper (>= 7), libqt4-dev, qt4-dev-tools, subversion, subversion-tools
+Build-Depends: debhelper (>= 7), libqt4-dev | qt4-local-dev, qt4-dev-tools | qt4-local-dev, git, git2cl
 Standards-Version: 3.7.3
 Homepage: http://smoke.silmor.de
 
 Package: magicsmoke2-client
 Architecture: any
 Depends: ${shlibs:Depends}, ${local:libssl}
-Recommends: magicsmoke2-doc, libqtscript4-core, libqtscript4-gui, libqtscript4-network, libqtscript4-xml
-Suggests: magicsmoke2-server, libqtscript4-svg, libqtscript4-webkit, libqtscript4-xmlpatterns, libqtscript4-doc
+Recommends: magicsmoke2-doc,
+  libqtscript4-qtbindings | qtscript4-local
+Suggests: magicsmoke2-server,
 Description: MagicSmoke Ticket Sale System - Standalone Client
  This package contains the MagicSmoke Ticket Sales System Client version 2.
  .
index b150b9c..cad9722 100755 (executable)
@@ -2,21 +2,19 @@
 
 cl=debian/changelog
 
-test -x "`which svn`" || {
-       echo 'Warning: cannot find svn - do you have package subversion installed?' 2>&1
+test -x "`which git`" || {
+       echo 'Warning: cannot find git - do you have package git installed?' 2>&1
        test -f $cl && {
                echo cannot find svn, but $cl exists - accepting it
-               exit 0
        } || {
-               echo 'Error: cannot find svn and' $cl 'does not exist - cannot proceed.' 1>&2
+               echo 'Error: cannot find git and' $cl 'does not exist - cannot proceed.' 1>&2
                exit 1
        }
 }
-test -d .svn || {
-       echo 'Warning: this is not a SVN checkout, building in non-dev mode...' 2>&1
+test -d .git || {
+       echo 'Warning: this is not a GIT checkout, building in non-dev mode...' 2>&1
        test -f $cl && {
                echo 'Info:' $cl 'does exist, accepting it for now'
-               exit 0
        } || {
                echo 'Error:' $cl 'does not exist, cannot proceed.' 2>&1
                exit 1
@@ -25,10 +23,9 @@ test -d .svn || {
 
 echo Generating $cl ...
 
-REV="$(svn info|grep Revision:|cut -d " " -f 2)"
-REV="2$(echo -n $REV|wc -c|tr 0-9 c-l)$REV"
+REV=`git log -1 --date=short --pretty=format:%ad-%h`
 
-if test `svn stat -q|wc -l` -gt 0 ; then
+if test `git status --short -uno |wc -l` -gt 0 ; then
  REV="$REV-modified1"
 fi
 
@@ -36,14 +33,14 @@ echo "magicsmoke2 ($REV) unstable; urgency=low" >$cl
 echo >>$cl
 echo "  Package Generated by" `whoami`@`hostname -f` `date -R`>>$cl
 echo >>$cl
-test -x "`which svn2cl`" && {
-       svn2cl --stdout -i --group-by-day | sed 's/^/  /' | sed 's/\t/   /' >>$cl
+test -x "`which git2cl`" && {
+       git2cl | sed 's/^/  /' | sed 's/\t/   /' >>$cl
 } || {
        echo 'Warning: cannot find svn2cl - do you have subversion-tools installed?' 2>&1
        echo 'Warning:' $cl 'will have an empty body, this may not be what you wanted.' 2>&1
        echo ' ' `date +%Y-%m-%d` `whoami` >>$cl
-       echo '    * built package without subversion info available, sorry.' >>$cl
+       echo '    * built package without git log info available, sorry.' >>$cl
 }
 echo >>$cl
-echo -n ' -- konrad <konrad@silmor.de>  ' >>$cl
+echo -n ' -- Konrad Rosenbaum <konrad@silmor.de>  ' >>$cl
 date -R >>$cl
diff --git a/debian/magicsmoke2-client.postinst b/debian/magicsmoke2-client.postinst
deleted file mode 100644 (file)
index 9079a48..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-# postinst script for xpack
-#
-# 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)
-       for i in /usr/share/qt4/translations/qt_*.qm; do
-                #echo Linking $i
-                ln -sf $i /usr/lib/magicsmoke/`basename $$i`
-        done
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-       rm -f /usr/lib/magicsmoke/qt_*.qm || true
-    ;;
-
-    *)
-        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/magicsmoke2-client.postrm b/debian/magicsmoke2-client.postrm
deleted file mode 100644 (file)
index 7acb589..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-# postrm script for xpack
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <overwriter>
-#          <overwriter-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-    remove|upgrade|failed-upgrade|abort-install|abort-upgrade)
-    ;;
-
-    purge|disappear)
-       rm -f /usr/lib/magicsmoke || true
-    ;;
-
-    *)
-        echo "postrm 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/magicsmoke2-client.prerm b/debian/magicsmoke2-client.prerm
deleted file mode 100644 (file)
index 2686f0c..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-# prerm script for xpack
-#
-# 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)
-       rm -f /usr/lib/magicsmoke/qt_*.qm || true
-    ;;
-
-    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
-
-
index 06a2042..95b5332 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 # Debian packaging script for MagicSmoke
-# (c) Konrad Rosenbaum, 2009-2011
+# (c) Konrad Rosenbaum, 2009-2012
 
 #Original comment:
 # Sample debian/rules that uses debhelper.
@@ -32,7 +32,7 @@ build-stamp: configure-stamp
        @echo '********************'
        @echo Building...
        dh_testdir
-       #make -f Makefile.unix
+       make all
        touch $@
 
 clean: 
@@ -41,7 +41,7 @@ clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp
-       #$(MAKE) -f Makefile.unix distclean
+       make distclean
        dh_clean 
 
 install: install-base install-client install-doc install-server
@@ -61,7 +61,7 @@ install-client:
        make -C $(CURDIR) install-client PREFIX=$(CLIENT)/usr
        #debian docu
        mkdir -p $(CLIENT)/usr/share/doc/magicsmoke2-client
-       cp -L README COPYING* $(CLIENT)/usr/share/doc/magicsmoke2-client
+       cp -L README doc/copying-* doc/license.html $(CLIENT)/usr/share/doc/magicsmoke2-client
        gzip `ls $(CLIENT)/usr/share/doc/magicsmoke2-client/* |grep -v .gz`
        cp -L src/smoke*.qm $(CLIENT)/usr/lib/magicsmoke2
 
@@ -71,7 +71,7 @@ install-doc:
        @echo '********************'
        @echo Install Doc...
        mkdir -p $(DOCDIR)/$(DOCDOC)
-       cp -L README COPYING* $(DOCDIR)/$(DOCDOC)
+       cp -L README doc/copying-* doc/license.html $(DOCDIR)/$(DOCDOC)
        gzip `ls $(DOCDIR)/$(DOCDOC)/* |grep -v .gz`
        make -C $(CURDIR) install-doc PREFIX=$(DOCDIR)/usr
 
@@ -84,7 +84,7 @@ install-server:
        #copy and link scripts
        make -C $(CURDIR) install-server PREFIX=$(SERVER)/usr
        #copy in docu
-       cp -L README COPYING* $(SERVER)/usr/share/doc/magicsmoke2-server
+       cp -L README doc/copying-* doc/license.html $(SERVER)/usr/share/doc/magicsmoke2-server
        gzip `ls $(SERVER)/usr/share/doc/magicsmoke2-server/* |grep -v .gz`
        gzip <debian/README.server >$(SERVER)/usr/share/doc/magicsmoke2-server/README.Debian-Install.gz