RPM: simple script/spec for building .rpm for Fedora v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 29 Sep 2014 00:13:14 +0200
branchv_0
changeset 18074a6d55da11c
parent 179 236332caeb29
child 181 80333d0ae763
RPM: simple script/spec for building .rpm for Fedora
distributions/fedora/build.sh
distributions/fedora/sql-dk.spec
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/distributions/fedora/build.sh	Mon Sep 29 00:13:14 2014 +0200
     1.3 @@ -0,0 +1,15 @@
     1.4 +#!/bin/bash
     1.5 +
     1.6 +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
     1.7 +TOPDIR="$DIR/TMP";
     1.8 +DBPATH="$DIR/TMP/RPMDB";
     1.9 +
    1.10 +rm -rf "$TOPDIR";
    1.11 +
    1.12 +rpmbuild \
    1.13 +	--define "_dbpath $DBPATH" \
    1.14 +	--define "_topdir $TOPDIR" \
    1.15 +	-bb \
    1.16 +	"$DIR/sql-dk.spec";
    1.17 +	
    1.18 +cp "$TOPDIR"/RPMS/*/sql-dk-*.rpm .
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/distributions/fedora/sql-dk.spec	Mon Sep 29 00:13:14 2014 +0200
     2.3 @@ -0,0 +1,32 @@
     2.4 +Name: sql-dk
     2.5 +Summary: SQL batch client
     2.6 +Version: 0.10
     2.7 +Release: 1
     2.8 +License: GNU GPLv3+
     2.9 +# TODO: Java 7 or Java 8+
    2.10 +#Requires: java >= 1:1.7.0
    2.11 +
    2.12 +%description
    2.13 +SQL-DK is a command-line client for relational databases.
    2.14 +
    2.15 +%prep
    2.16 +mkdir -p ${RPM_BUILD_ROOT}/usr/bin/
    2.17 +mkdir -p ${RPM_BUILD_ROOT}/usr/share/sql-dk/
    2.18 +mkdir -p ${RPM_BUILD_ROOT}/usr/share/doc/sql-dk/
    2.19 +mkdir -p ${RPM_BUILD_ROOT}/etc/bash_completion.d/
    2.20 +
    2.21 +cp ../../../../scripts/sql-dk.sh                                                   ${RPM_BUILD_ROOT}/usr/bin/sql-dk
    2.22 +cp ../../../../xml/config.xsd                                                      ${RPM_BUILD_ROOT}/usr/share/doc/sql-dk/
    2.23 +cp ../../../../xml/config.rnc                                                      ${RPM_BUILD_ROOT}/usr/share/doc/sql-dk/
    2.24 +cp ../../../../xml/config.xsl                                                      ${RPM_BUILD_ROOT}/usr/share/doc/sql-dk/
    2.25 +cp ../../../../java/sql-dk/dist/sql-dk.jar                                         ${RPM_BUILD_ROOT}/usr/share/sql-dk/
    2.26 +cp ../../../../java/jdbc-loopback-driver/dist/jdbc-loopback-driver.jar             ${RPM_BUILD_ROOT}/usr/share/sql-dk/
    2.27 +cp ../../../../java/sql-dk/dist/bash-completion.sh                                 ${RPM_BUILD_ROOT}/etc/bash_completion.d/sql-dk
    2.28 +
    2.29 +%files
    2.30 +%defattr(-,root,root)
    2.31 +/usr/bin/*
    2.32 +/usr/share/sql-dk/*
    2.33 +/usr/share/doc/sql-dk/*
    2.34 +/etc/bash_completion.d/*
    2.35 +