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