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 112de0bcc3859cf
parent 111 259c0c64321b
child 113 575a8c6b91ad
Debian package: interim build script for .deb packages
.hgignore
distributions/debian/build.sh
     1.1 --- a/.hgignore	Thu Jan 02 19:27:09 2014 +0100
     1.2 +++ b/.hgignore	Thu Jan 02 19:38:26 2014 +0100
     1.3 @@ -8,3 +8,5 @@
     1.4  
     1.5  java/sql-dk/data/info/globalcode/sql/dk/version.txt
     1.6  java/sql-dk/data/info/globalcode/sql/dk/help.txt
     1.7 +
     1.8 +distributions/debian/*.deb
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/distributions/debian/build.sh	Thu Jan 02 19:38:26 2014 +0100
     2.3 @@ -0,0 +1,91 @@
     2.4 +#!/bin/bash
     2.5 +
     2.6 +# SQL-DK
     2.7 +# Copyright © 2013 František Kučera (frantovo.cz)
     2.8 +# 
     2.9 +# This program is free software: you can redistribute it and/or modify
    2.10 +# it under the terms of the GNU General Public License as published by
    2.11 +# the Free Software Foundation, either version 3 of the License, or
    2.12 +# (at your option) any later version.
    2.13 +# 
    2.14 +# This program is distributed in the hope that it will be useful,
    2.15 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.16 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    2.17 +# GNU General Public License for more details.
    2.18 +# 
    2.19 +# You should have received a copy of the GNU General Public License
    2.20 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
    2.21 +
    2.22 +
    2.23 +# TODO: build .deb package properly; without equivs
    2.24 +
    2.25 +mkdir -p TMP/usr/bin/ &&
    2.26 +mkdir -p TMP/usr/share/sql-dk/ &&
    2.27 +mkdir -p TMP/etc/bash_completion.d/ &&
    2.28 +
    2.29 +pushd TMP &&
    2.30 +
    2.31 +cp ../../../scripts/sql-dk.sh                     sql-dk &&
    2.32 +cp ../../../java/sql-dk/dist/sql-dk.jar           sql-dk.jar &&
    2.33 +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)
    2.34 +
    2.35 +chmod 755 sql-dk &&
    2.36 +chmod 755 SQL-DK &&
    2.37 +
    2.38 +EMAIL=`echo c3FsLWRrLmRlYmlhbkBwdWIuZnJhbnRvdm8uY3oK | base64 -d` &&
    2.39 +NAME="Ing. František Kučera <$EMAIL>" &&
    2.40 +CONTROL_FILE="equivs-control" &&
    2.41 +COPYRIGHT_FILE="copyright" &&
    2.42 +URL="https://sql-dk.globalcode.info/" &&
    2.43 +VERSION="0.8" &&
    2.44 +
    2.45 +echo "Section: database
    2.46 +Priority: optional
    2.47 +Homepage: $URL
    2.48 +Standards-Version: 3.9.2
    2.49 +
    2.50 +Package: sql-dk
    2.51 +Version: $VERSION
    2.52 +Maintainer: $NAME
    2.53 +Depends: java7-runtime-headless | java7-runtime
    2.54 +Suggests: libpostgresql-jdbc-java,libmysql-java
    2.55 +Copyright: $COPYRIGHT_FILE
    2.56 +# TODO: Extra-Files: config.xsd, config.rnc
    2.57 +Files: sql-dk /usr/bin/
    2.58 + sql-dk.jar /usr/share/sql-dk/
    2.59 + SQL-DK /etc/bash_completion.d/
    2.60 +Description: SQL batch client
    2.61 + SQL-DK is and command-line client for relational databases." > $CONTROL_FILE &&
    2.62 +
    2.63 +echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
    2.64 +Upstream-Name: SQL-DK
    2.65 +Source: https://hg.frantovo.cz/sql-dk/
    2.66 +
    2.67 +Files: *
    2.68 +Copyright: Copyright 2014 $NAME
    2.69 +License: GPL-3+
    2.70 + This program is free software: you can redistribute it and/or modify
    2.71 + it under the terms of the GNU General Public License as published by
    2.72 + the Free Software Foundation, either version 3 of the License, or
    2.73 + (at your option) any later version.
    2.74 + .
    2.75 + This program is distributed in the hope that it will be useful,
    2.76 + but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.77 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    2.78 + GNU General Public License for more details.
    2.79 + .
    2.80 + You should have received a copy of the GNU General Public License
    2.81 + along with this program. If not, see <http://www.gnu.org/licenses/>.
    2.82 + .
    2.83 + On Debian systems, the full text of the GNU General Public
    2.84 + License version 3 can be found in the file
    2.85 + \`/usr/share/common-licenses/GPL-3'." > $COPYRIGHT_FILE &&
    2.86 +
    2.87 +equivs-build $CONTROL_FILE &&
    2.88 +
    2.89 +lintian sql-dk_*.deb &&
    2.90 +
    2.91 +popd &&
    2.92 +
    2.93 +mv TMP/sql-dk_*.deb . &&
    2.94 +rm -rf TMP/