1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/distributions/debian/build.sh Thu Jan 02 19:38:26 2014 +0100
1.3 @@ -0,0 +1,91 @@
1.4 +#!/bin/bash
1.5 +
1.6 +# SQL-DK
1.7 +# Copyright © 2013 František Kučera (frantovo.cz)
1.8 +#
1.9 +# This program is free software: you can redistribute it and/or modify
1.10 +# it under the terms of the GNU General Public License as published by
1.11 +# the Free Software Foundation, either version 3 of the License, or
1.12 +# (at your option) any later version.
1.13 +#
1.14 +# This program is distributed in the hope that it will be useful,
1.15 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1.16 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.17 +# GNU General Public License for more details.
1.18 +#
1.19 +# You should have received a copy of the GNU General Public License
1.20 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
1.21 +
1.22 +
1.23 +# TODO: build .deb package properly; without equivs
1.24 +
1.25 +mkdir -p TMP/usr/bin/ &&
1.26 +mkdir -p TMP/usr/share/sql-dk/ &&
1.27 +mkdir -p TMP/etc/bash_completion.d/ &&
1.28 +
1.29 +pushd TMP &&
1.30 +
1.31 +cp ../../../scripts/sql-dk.sh sql-dk &&
1.32 +cp ../../../java/sql-dk/dist/sql-dk.jar sql-dk.jar &&
1.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)
1.34 +
1.35 +chmod 755 sql-dk &&
1.36 +chmod 755 SQL-DK &&
1.37 +
1.38 +EMAIL=`echo c3FsLWRrLmRlYmlhbkBwdWIuZnJhbnRvdm8uY3oK | base64 -d` &&
1.39 +NAME="Ing. František Kučera <$EMAIL>" &&
1.40 +CONTROL_FILE="equivs-control" &&
1.41 +COPYRIGHT_FILE="copyright" &&
1.42 +URL="https://sql-dk.globalcode.info/" &&
1.43 +VERSION="0.8" &&
1.44 +
1.45 +echo "Section: database
1.46 +Priority: optional
1.47 +Homepage: $URL
1.48 +Standards-Version: 3.9.2
1.49 +
1.50 +Package: sql-dk
1.51 +Version: $VERSION
1.52 +Maintainer: $NAME
1.53 +Depends: java7-runtime-headless | java7-runtime
1.54 +Suggests: libpostgresql-jdbc-java,libmysql-java
1.55 +Copyright: $COPYRIGHT_FILE
1.56 +# TODO: Extra-Files: config.xsd, config.rnc
1.57 +Files: sql-dk /usr/bin/
1.58 + sql-dk.jar /usr/share/sql-dk/
1.59 + SQL-DK /etc/bash_completion.d/
1.60 +Description: SQL batch client
1.61 + SQL-DK is and command-line client for relational databases." > $CONTROL_FILE &&
1.62 +
1.63 +echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
1.64 +Upstream-Name: SQL-DK
1.65 +Source: https://hg.frantovo.cz/sql-dk/
1.66 +
1.67 +Files: *
1.68 +Copyright: Copyright 2014 $NAME
1.69 +License: GPL-3+
1.70 + This program is free software: you can redistribute it and/or modify
1.71 + it under the terms of the GNU General Public License as published by
1.72 + the Free Software Foundation, either version 3 of the License, or
1.73 + (at your option) any later version.
1.74 + .
1.75 + This program is distributed in the hope that it will be useful,
1.76 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1.77 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.78 + GNU General Public License for more details.
1.79 + .
1.80 + You should have received a copy of the GNU General Public License
1.81 + along with this program. If not, see <http://www.gnu.org/licenses/>.
1.82 + .
1.83 + On Debian systems, the full text of the GNU General Public
1.84 + License version 3 can be found in the file
1.85 + \`/usr/share/common-licenses/GPL-3'." > $COPYRIGHT_FILE &&
1.86 +
1.87 +equivs-build $CONTROL_FILE &&
1.88 +
1.89 +lintian sql-dk_*.deb &&
1.90 +
1.91 +popd &&
1.92 +
1.93 +mv TMP/sql-dk_*.deb . &&
1.94 +rm -rf TMP/