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