From 2f0a12f9e01889207c0d42d0391f3dc3d294ece3 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Thu, 26 Feb 2009 11:18:07 +0000 Subject: [PATCH] making debian package generation more clear git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@91 014f5005-505e-4b48-8d0a-63407b615a7c --- Makefile | 37 ++++-------------------------------- debscript/gencontrol.sh | 13 +++++++++++++ debscript/prerm | 10 ---------- debscript/relational | 2 ++ debscript/relational.desktop | 9 +++++++++ 5 files changed, 28 insertions(+), 43 deletions(-) create mode 100755 debscript/gencontrol.sh delete mode 100644 debscript/prerm create mode 100644 debscript/relational create mode 100644 debscript/relational.desktop diff --git a/Makefile b/Makefile index 60894a4..fadb8d4 100644 --- a/Makefile +++ b/Makefile @@ -67,48 +67,19 @@ debian: #start script mkdir -p data/usr/bin - echo "#!/bin/bash" >> data/usr/bin/relational - echo "python /usr/share/python-support/relational/relational.py $@" >> data/usr/bin/relational + cp debscript/relational data/usr/bin/relational chmod a+x data/usr/bin/relational #desktop file mkdir -p data/usr/share/applications/ - echo "[Desktop Entry]" >> data/usr/share/applications/relational.desktop - echo "Name=Relational">> data/usr/share/applications/relational.desktop - echo "Comment=Relational Algebra">> data/usr/share/applications/relational.desktop - echo "Exec=relational">> data/usr/share/applications/relational.desktop - echo "Icon=kexi">> data/usr/share/applications/relational.desktop - echo "Terminal=0">> data/usr/share/applications/relational.desktop - echo "Type=Application">> data/usr/share/applications/relational.desktop - echo "Encoding=UTF-8">> data/usr/share/applications/relational.desktop - echo "Categories=Education;">> data/usr/share/applications/relational.desktop + cp debscript/relational.desktop data/usr/share/applications/ mkdir -p data/DEBIAN #package description - echo "Package: relational" >> data/DEBIAN/control - echo "Version: "`./relational.py -v | cut -d. -f1`":"`./relational.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."`>> data/DEBIAN/control - echo "Architecture: all" >> data/DEBIAN/control - echo "Maintainer: Salvo 'LtWorf' Tomaselli " >> data/DEBIAN/control - echo "Installed-Size: "`du -s --apparent-size data/ | cut -f1` >> data/DEBIAN/control - echo "Depends: python-qt4 (>= 4.0.1-5), python (>= 2.3), ttf-dejavu-core (>= 2.25-3)" >> data/DEBIAN/control - echo "Recommends: libqt4-webkit (>= 4.4.3-1)" >> data/DEBIAN/control - echo "Section: devel" >> data/DEBIAN/control - echo "Priority: optional" >> data/DEBIAN/control - echo "Homepage: http://galileo.dmi.unict.it/wiki/relational/" >> data/DEBIAN/control - echo "Description: Python implementation of Relational algebra.">> data/DEBIAN/control - echo " This program provides a GUI to execute relational algebra queries.">> data/DEBIAN/control - echo " It is meant to be used for educational purposes.">> data/DEBIAN/control - - #Postinst to generate optimized files - echo "#!/usr/bin/python" > data/DEBIAN/postinst - echo "import py_compile" >> data/DEBIAN/postinst - echo "import os" >> data/DEBIAN/postinst - printf "for i in os.listdir(\"/usr/share/python-support/relational/\"):\n" >> data/DEBIAN/postinst - printf " if i.endswith(\".py\"):\n" >> data/DEBIAN/postinst - printf " py_compile.compile(\"/usr/share/python-support/relational/\"+i)\n" >> data/DEBIAN/postinst + debscript/gencontrol.sh data/DEBIAN/control #Postrm file to remove optimized generated python files - cp debscript/prerm data/DEBIAN/prerm + #cp debscript/prerm data/DEBIAN/prerm chmod 0755 data/DEBIAN/prerm data/DEBIAN/postinst diff --git a/debscript/gencontrol.sh b/debscript/gencontrol.sh new file mode 100755 index 0000000..4746b58 --- /dev/null +++ b/debscript/gencontrol.sh @@ -0,0 +1,13 @@ +#!/bin/bash + echo "Version: "`../relational.py -v | cut -d. -f1`":"`../relational.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."` + echo "Architecture: all" + echo "Maintainer: Salvo 'LtWorf' Tomaselli " + echo "Installed-Size: "`du -s --apparent-size ../data/ | cut -f1` + echo "Depends: python-qt4 (>= 4.0.1-5), python (>= 2.3), debhelper (>= 5.0.38), python-central (>= 0.5.6), ttf-dejavu-core (>= 2.25-3)" + echo "Recommends: libqt4-webkit (>= 4.4.3-1)" + echo "Section: devel" + echo "Priority: optional" + echo "Homepage: http://galileo.dmi.unict.it/wiki/relational/" + echo "Description: Python implementation of Relational algebra." + echo " This program provides a GUI to execute relational algebra queries." + echo " It is meant to be used for educational purposes." diff --git a/debscript/prerm b/debscript/prerm deleted file mode 100644 index 8865c44..0000000 --- a/debscript/prerm +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e - -case $1 in - remove) - rm -rf /usr/share/python-support/relational/;; -esac - -exit 0 - diff --git a/debscript/relational b/debscript/relational new file mode 100644 index 0000000..bb2deab --- /dev/null +++ b/debscript/relational @@ -0,0 +1,2 @@ +#!/bin/bash +python /usr/share/python-support/relational/relational.py $@ diff --git a/debscript/relational.desktop b/debscript/relational.desktop new file mode 100644 index 0000000..c0c9dc2 --- /dev/null +++ b/debscript/relational.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Relational +Comment=Relational Algebra +Exec=relational +Icon=kexi +Terminal=0 +Type=Application +Encoding=UTF-8 +Categories=Education;