Debian package: interim build script for .deb packages v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Thu, 02 Jan 2014 19:38:26 +0100
branchv_0
changeset 112 de0bcc3859cf
parent 111 259c0c64321b
child 113 575a8c6b91ad
Debian package: interim build script for .deb packages
.hgignore
distributions/debian/build.sh
--- a/.hgignore	Thu Jan 02 19:27:09 2014 +0100
+++ b/.hgignore	Thu Jan 02 19:38:26 2014 +0100
@@ -8,3 +8,5 @@
 
 java/sql-dk/data/info/globalcode/sql/dk/version.txt
 java/sql-dk/data/info/globalcode/sql/dk/help.txt
+
+distributions/debian/*.deb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/distributions/debian/build.sh	Thu Jan 02 19:38:26 2014 +0100
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+# SQL-DK
+# Copyright © 2013 František Kučera (frantovo.cz)
+# 
+# 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/>.
+
+
+# TODO: build .deb package properly; without equivs
+
+mkdir -p TMP/usr/bin/ &&
+mkdir -p TMP/usr/share/sql-dk/ &&
+mkdir -p TMP/etc/bash_completion.d/ &&
+
+pushd TMP &&
+
+cp ../../../scripts/sql-dk.sh                     sql-dk &&
+cp ../../../java/sql-dk/dist/sql-dk.jar           sql-dk.jar &&
+cp ../../../java/sql-dk/dist/bash-completion.sh   SQL-DK && # TODO: should be sql-dk – name conflict with sql-dk in /usr/bin/ (equivs bug)
+
+chmod 755 sql-dk &&
+chmod 755 SQL-DK &&
+
+EMAIL=`echo c3FsLWRrLmRlYmlhbkBwdWIuZnJhbnRvdm8uY3oK | base64 -d` &&
+NAME="Ing. František Kučera <$EMAIL>" &&
+CONTROL_FILE="equivs-control" &&
+COPYRIGHT_FILE="copyright" &&
+URL="https://sql-dk.globalcode.info/" &&
+VERSION="0.8" &&
+
+echo "Section: database
+Priority: optional
+Homepage: $URL
+Standards-Version: 3.9.2
+
+Package: sql-dk
+Version: $VERSION
+Maintainer: $NAME
+Depends: java7-runtime-headless | java7-runtime
+Suggests: libpostgresql-jdbc-java,libmysql-java
+Copyright: $COPYRIGHT_FILE
+# TODO: Extra-Files: config.xsd, config.rnc
+Files: sql-dk /usr/bin/
+ sql-dk.jar /usr/share/sql-dk/
+ SQL-DK /etc/bash_completion.d/
+Description: SQL batch client
+ SQL-DK is and command-line client for relational databases." > $CONTROL_FILE &&
+
+echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: SQL-DK
+Source: https://hg.frantovo.cz/sql-dk/
+
+Files: *
+Copyright: Copyright 2014 $NAME
+License: GPL-3+
+ 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 full text of the GNU General Public
+ License version 3 can be found in the file
+ \`/usr/share/common-licenses/GPL-3'." > $COPYRIGHT_FILE &&
+
+equivs-build $CONTROL_FILE &&
+
+lintian sql-dk_*.deb &&
+
+popd &&
+
+mv TMP/sql-dk_*.deb . &&
+rm -rf TMP/