distributions/fedora/sql-dk.spec
author František Kučera <franta-hg@frantovo.cz>
Sun, 04 Feb 2024 16:10:37 +0100
branchv_0
changeset 255 099bb96f8d8d
parent 250 aae5009bd0af
permissions -rw-r--r--
tabular formatter: new option 'separateBy' to print horizontal separator on each change of given column
franta-hg@188
     1
# SQL-DK
franta-hg@188
     2
# Copyright © 2014 František Kučera (frantovo.cz)
franta-hg@188
     3
# 
franta-hg@188
     4
# This program is free software: you can redistribute it and/or modify
franta-hg@188
     5
# it under the terms of the GNU General Public License as published by
franta-hg@250
     6
# the Free Software Foundation, version 3 of the License.
franta-hg@188
     7
# 
franta-hg@188
     8
# This program is distributed in the hope that it will be useful,
franta-hg@188
     9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@188
    10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@188
    11
# GNU General Public License for more details.
franta-hg@188
    12
# 
franta-hg@188
    13
# You should have received a copy of the GNU General Public License
franta-hg@188
    14
# along with this program. If not, see <http://www.gnu.org/licenses/>.
franta-hg@188
    15
franta-hg@180
    16
Name: sql-dk
franta-hg@180
    17
Summary: SQL batch client
franta-hg@188
    18
Group: Applications/Databases
franta-hg@188
    19
BuildArch: noarch
franta-hg@180
    20
Version: 0.10
franta-hg@188
    21
Release: 3
franta-hg@180
    22
License: GNU GPLv3+
franta-hg@188
    23
URL: https://sql-dk.globalcode.info/
franta-hg@188
    24
#Requires: sql-dk-java = %{version}
franta-hg@188
    25
Requires: /usr/bin/java
franta-hg@188
    26
franta-hg@188
    27
franta-hg@188
    28
# --- Dependencies -----------------------------------------------------------
franta-hg@188
    29
# SQL-DK requires Java 7 or Java 8 (or maybe higher).
franta-hg@188
    30
# But simple 
franta-hg@188
    31
#     Requires: java >= 1:1.7.0
franta-hg@188
    32
# is not working in Fedora 20
franta-hg@188
    33
# because java-1.8.0-openjdk here provides „java8“ not „java“ in version 1.8
franta-hg@188
    34
# see https://www.abclinuxu.cz/poradna/linux/show/396144#1 (in Czech)
franta-hg@188
    35
franta-hg@188
    36
%package java7
franta-hg@188
    37
Summary: Java 7
franta-hg@188
    38
Group: Development/Languages
franta-hg@188
    39
Requires: java >= 1:1.7.0
franta-hg@188
    40
Provides: sql-dk-java = %{version}
franta-hg@188
    41
franta-hg@188
    42
%description java7
franta-hg@188
    43
virtual package for dependency on Java 7
franta-hg@188
    44
franta-hg@188
    45
%files java7
franta-hg@188
    46
franta-hg@188
    47
%package java8
franta-hg@188
    48
Summary: Java 8
franta-hg@188
    49
Group: Development/Languages
franta-hg@188
    50
Requires: java8 >= 1:1.8.0
franta-hg@188
    51
Provides: sql-dk-java = %{version}
franta-hg@188
    52
franta-hg@188
    53
%description java8
franta-hg@188
    54
virtual package for dependency on Java 8
franta-hg@188
    55
franta-hg@188
    56
%files java8
franta-hg@188
    57
# ----------------------------------------------------------------------------
franta-hg@188
    58
franta-hg@180
    59
franta-hg@180
    60
%description
franta-hg@180
    61
SQL-DK is a command-line client for relational databases.
franta-hg@180
    62
franta-hg@180
    63
%prep
franta-hg@180
    64
mkdir -p ${RPM_BUILD_ROOT}/usr/bin/
franta-hg@180
    65
mkdir -p ${RPM_BUILD_ROOT}/usr/share/sql-dk/
franta-hg@180
    66
mkdir -p ${RPM_BUILD_ROOT}/usr/share/doc/sql-dk/
franta-hg@180
    67
mkdir -p ${RPM_BUILD_ROOT}/etc/bash_completion.d/
franta-hg@180
    68
franta-hg@180
    69
cp ../../../../scripts/sql-dk.sh                                                   ${RPM_BUILD_ROOT}/usr/bin/sql-dk
franta-hg@180
    70
cp ../../../../xml/config.xsd                                                      ${RPM_BUILD_ROOT}/usr/share/doc/sql-dk/
franta-hg@180
    71
cp ../../../../xml/config.rnc                                                      ${RPM_BUILD_ROOT}/usr/share/doc/sql-dk/
franta-hg@180
    72
cp ../../../../xml/config.xsl                                                      ${RPM_BUILD_ROOT}/usr/share/doc/sql-dk/
franta-hg@238
    73
cp ../../../../java/sql-dk/target/sql-dk-*.jar                                     ${RPM_BUILD_ROOT}/usr/share/sql-dk/
franta-hg@238
    74
cp ../../../../java/jdbc-loopback-driver/target/jdbc-loopback-driver-*.jar         ${RPM_BUILD_ROOT}/usr/share/sql-dk/
franta-hg@238
    75
cp ../../../../java/sql-dk/target/bash-completion.sh                               ${RPM_BUILD_ROOT}/etc/bash_completion.d/sql-dk
franta-hg@180
    76
franta-hg@180
    77
%files
franta-hg@180
    78
%defattr(-,root,root)
franta-hg@180
    79
/usr/bin/*
franta-hg@180
    80
/usr/share/sql-dk/*
franta-hg@180
    81
/usr/share/doc/sql-dk/*
franta-hg@180
    82
/etc/bash_completion.d/*