distributions/debian/build.sh
author František Kučera <franta-hg@frantovo.cz>
Thu, 24 Oct 2019 21:43:08 +0200
branchv_0
changeset 250 aae5009bd0af
parent 238 4a1864c3e867
child 253 d8442b266ca8
permissions -rwxr-xr-x
fix license version: GNU GPLv3
franta-hg@112
     1
#!/bin/bash
franta-hg@112
     2
franta-hg@112
     3
# SQL-DK
franta-hg@112
     4
# Copyright © 2013 František Kučera (frantovo.cz)
franta-hg@112
     5
# 
franta-hg@112
     6
# This program is free software: you can redistribute it and/or modify
franta-hg@112
     7
# it under the terms of the GNU General Public License as published by
franta-hg@250
     8
# the Free Software Foundation, version 3 of the License.
franta-hg@112
     9
# 
franta-hg@112
    10
# This program is distributed in the hope that it will be useful,
franta-hg@112
    11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@112
    12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@112
    13
# GNU General Public License for more details.
franta-hg@112
    14
# 
franta-hg@112
    15
# You should have received a copy of the GNU General Public License
franta-hg@112
    16
# along with this program. If not, see <http://www.gnu.org/licenses/>.
franta-hg@112
    17
franta-hg@112
    18
franta-hg@112
    19
# TODO: build .deb package properly; without equivs
franta-hg@112
    20
franta-hg@112
    21
mkdir -p TMP/usr/bin/ &&
franta-hg@112
    22
mkdir -p TMP/usr/share/sql-dk/ &&
franta-hg@112
    23
mkdir -p TMP/etc/bash_completion.d/ &&
franta-hg@112
    24
franta-hg@112
    25
pushd TMP &&
franta-hg@112
    26
franta-hg@172
    27
cp ../../../scripts/sql-dk.sh                                                   sql-dk &&
franta-hg@172
    28
cp ../../../xml/config.xsd                                                      config.xsd &&
franta-hg@172
    29
cp ../../../xml/config.rnc                                                      config.rnc &&
franta-hg@172
    30
cp ../../../xml/config.xsl                                                      config.xsl &&
franta-hg@238
    31
cp ../../../java/sql-dk/target/sql-dk-*.jar                                     sql-dk.jar &&
franta-hg@237
    32
cp ../../../java/jdbc-loopback-driver/target/jdbc-loopback-driver-*.jar         jdbc-loopback-driver.jar &&
franta-hg@238
    33
cp ../../../java/sql-dk/target/bash-completion.sh                               SQL-DK && # TODO: should be sql-dk – name conflict with sql-dk in /usr/bin/ (equivs bug)
franta-hg@112
    34
franta-hg@112
    35
chmod 755 sql-dk &&
franta-hg@238
    36
chmod 644 SQL-DK &&
franta-hg@112
    37
franta-hg@112
    38
EMAIL=`echo c3FsLWRrLmRlYmlhbkBwdWIuZnJhbnRvdm8uY3oK | base64 -d` &&
franta-hg@112
    39
NAME="Ing. František Kučera <$EMAIL>" &&
franta-hg@112
    40
CONTROL_FILE="equivs-control" &&
franta-hg@112
    41
COPYRIGHT_FILE="copyright" &&
franta-hg@112
    42
URL="https://sql-dk.globalcode.info/" &&
franta-hg@179
    43
VERSION="0.10" &&
franta-hg@112
    44
franta-hg@112
    45
echo "Section: database
franta-hg@112
    46
Priority: optional
franta-hg@112
    47
Homepage: $URL
franta-hg@112
    48
Standards-Version: 3.9.2
franta-hg@112
    49
franta-hg@112
    50
Package: sql-dk
franta-hg@112
    51
Version: $VERSION
franta-hg@112
    52
Maintainer: $NAME
franta-hg@188
    53
Depends: java7-runtime-headless | java7-runtime | java8-runtime-headless | java8-runtime
franta-hg@112
    54
Suggests: libpostgresql-jdbc-java,libmysql-java
franta-hg@112
    55
Copyright: $COPYRIGHT_FILE
franta-hg@121
    56
Extra-Files: config.xsd, config.rnc, config.xsl
franta-hg@112
    57
Files: sql-dk /usr/bin/
franta-hg@112
    58
 sql-dk.jar /usr/share/sql-dk/
franta-hg@172
    59
 jdbc-loopback-driver.jar /usr/share/sql-dk/
franta-hg@112
    60
 SQL-DK /etc/bash_completion.d/
franta-hg@112
    61
Description: SQL batch client
franta-hg@157
    62
 SQL-DK is a command-line client for relational databases." > $CONTROL_FILE &&
franta-hg@112
    63
franta-hg@112
    64
echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
franta-hg@112
    65
Upstream-Name: SQL-DK
franta-hg@112
    66
Source: https://hg.frantovo.cz/sql-dk/
franta-hg@112
    67
franta-hg@112
    68
Files: *
franta-hg@112
    69
Copyright: Copyright 2014 $NAME
franta-hg@112
    70
License: GPL-3+
franta-hg@112
    71
 This program is free software: you can redistribute it and/or modify
franta-hg@112
    72
 it under the terms of the GNU General Public License as published by
franta-hg@250
    73
 the Free Software Foundation, version 3 of the License.
franta-hg@112
    74
 .
franta-hg@112
    75
 This program is distributed in the hope that it will be useful,
franta-hg@112
    76
 but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@112
    77
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@112
    78
 GNU General Public License for more details.
franta-hg@112
    79
 .
franta-hg@112
    80
 You should have received a copy of the GNU General Public License
franta-hg@112
    81
 along with this program. If not, see <http://www.gnu.org/licenses/>.
franta-hg@112
    82
 .
franta-hg@112
    83
 On Debian systems, the full text of the GNU General Public
franta-hg@112
    84
 License version 3 can be found in the file
franta-hg@112
    85
 \`/usr/share/common-licenses/GPL-3'." > $COPYRIGHT_FILE &&
franta-hg@112
    86
franta-hg@112
    87
equivs-build $CONTROL_FILE &&
franta-hg@112
    88
franta-hg@112
    89
lintian sql-dk_*.deb &&
franta-hg@112
    90
franta-hg@112
    91
popd &&
franta-hg@112
    92
franta-hg@112
    93
mv TMP/sql-dk_*.deb . &&
franta-hg@112
    94
rm -rf TMP/