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