aqmoney/aqmoney.spec

changeset 22
0d4f475bfc81
child 26
89094e16ef70
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/aqmoney/aqmoney.spec	Wed Jan 07 14:58:25 2009 +0100
     1.3 @@ -0,0 +1,158 @@
     1.4 +##
     1.5 +##  aqmoney.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.7 +##
     1.8 +##  Permission to use, copy, modify, and distribute this software for
     1.9 +##  any purpose with or without fee is hereby granted, provided that
    1.10 +##  the above copyright notice and this permission notice appear in all
    1.11 +##  copies.
    1.12 +##
    1.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.24 +##  SUCH DAMAGE.
    1.25 +##
    1.26 +
    1.27 +#   package version
    1.28 +%define       V_aqmoney     1.9.5
    1.29 +%define       V_ktoblzcheck 1.19
    1.30 +
    1.31 +#   package information
    1.32 +Name:         aqmoney
    1.33 +Summary:      Homebanking Command Line Interface
    1.34 +URL:          http://aqmoney.sourceforge.net/
    1.35 +Vendor:       Martin Preuß
    1.36 +Packager:     OpenPKG Foundation e.V.
    1.37 +Distribution: OpenPKG Community
    1.38 +Class:        EVAL
    1.39 +Group:        Finance
    1.40 +License:      GPL
    1.41 +Version:      %{V_aqmoney}
    1.42 +Release:      20080813
    1.43 +
    1.44 +#   list of sources
    1.45 +Source0:      http://switch.dl.sourceforge.net/aqmoney/aqmoney2-%{V_aqmoney}.tar.gz
    1.46 +Source1:      http://switch.dl.sourceforge.net/ktoblzcheck/ktoblzcheck-%{V_ktoblzcheck}.tar.gz
    1.47 +Patch0:       aqmoney.patch
    1.48 +
    1.49 +#   build information
    1.50 +Prefix:       %{l_prefix}
    1.51 +BuildRoot:    %{l_buildroot}
    1.52 +BuildPreReq:  OpenPKG, openpkg >= 20040130
    1.53 +PreReq:       OpenPKG, openpkg >= 20040130
    1.54 +BuildPreReq:  aqbanking
    1.55 +PreReq:       aqbanking
    1.56 +AutoReq:      no
    1.57 +AutoReqProv:  no
    1.58 +
    1.59 +%description
    1.60 +    AqMoney is a command line interface for the AqBanking/AqHBCI and
    1.61 +    OpenHBCI libraries in order to perform financial transactions
    1.62 +    through the German HomeBanking Computer Interface (HBCI).
    1.63 +
    1.64 +%track
    1.65 +    prog aqmoney = {
    1.66 +        version   = %{V_aqmoney}
    1.67 +        url       = http://prdownloads.sourceforge.net/aqmoney/
    1.68 +        regex     = aqmoney2-(__VER__)\.tar\.gz
    1.69 +    }
    1.70 +    prog aqmoney:ktoblzcheck = {
    1.71 +        version   = %{V_ktoblzcheck}
    1.72 +        url       = http://prdownloads.sourceforge.net/ktoblzcheck/
    1.73 +        regex     = ktoblzcheck-(__VER__)\.tar\.gz
    1.74 +    }
    1.75 +
    1.76 +%prep
    1.77 +    %setup -q -c
    1.78 +    %setup -q -D -T -a 1
    1.79 +    %patch -p0 -d aqmoney2-%{V_aqmoney}
    1.80 +
    1.81 +%build
    1.82 +    #   build KtoBlzCheck library
    1.83 +    ( cd ktoblzcheck-%{V_ktoblzcheck}
    1.84 +      CC="%{l_cc}" \
    1.85 +      CXX="%{l_cxx}" \
    1.86 +      CFLAGS="%{l_cflags -O}" \
    1.87 +      CXXFLAGS="%{l_cxxflags -O}" \
    1.88 +      CPPFLAGS="%{l_cppflags}" \
    1.89 +      LDFLAGS="%{l_ldflags}" \
    1.90 +      ./configure \
    1.91 +          --prefix=%{l_prefix} \
    1.92 +          --disable-shared
    1.93 +      %{l_make} %{l_mflags -O}
    1.94 +
    1.95 +      #   pre-install it and adjust for temporary usage by AqMoney build (below)
    1.96 +      %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
    1.97 +    ) || exit $?
    1.98 +
    1.99 +    #   configure and build program
   1.100 +    ( cd aqmoney2-%{version}
   1.101 +      %{l_shtool} subst \
   1.102 +          -e 's;ktoblzcheck_datafile="";;' \
   1.103 +          configure
   1.104 +      CC="%{l_cxx}" \
   1.105 +      CXX="%{l_cxx}" \
   1.106 +      CFLAGS="%{l_cflags -O}" \
   1.107 +      CXXFLAGS="%{l_cxxflags -O}" \
   1.108 +      CPPFLAGS="%{l_cppflags}" \
   1.109 +      LDFLAGS="%{l_ldflags}" \
   1.110 +      ./configure \
   1.111 +          --prefix=%{l_prefix} \
   1.112 +          --with-openhbci-prefix=%{l_prefix} \
   1.113 +          --with-ktoblzcheck-includes=$RPM_BUILD_ROOT%{l_prefix}/include \
   1.114 +          --with-ktoblzcheck-libs=$RPM_BUILD_ROOT%{l_prefix}/lib \
   1.115 +          --with-ktoblzcheck-datafile=%{l_prefix}/share/ktoblzcheck/bankdata.txt \
   1.116 +          --disable-shared \
   1.117 +          --disable-nls
   1.118 +      %{l_make} %{l_mflags -O}
   1.119 +    ) || exit $?
   1.120 +
   1.121 +%install
   1.122 +    rm -rf $RPM_BUILD_ROOT
   1.123 +
   1.124 +    #   install programs
   1.125 +    ( cd ktoblzcheck-%{V_ktoblzcheck}
   1.126 +      %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   1.127 +    ) || exit $?
   1.128 +    ( cd aqmoney2-%{version}
   1.129 +      %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   1.130 +    ) || exit $?
   1.131 +
   1.132 +    #   workaround problems with AqHBCI plugin run-time
   1.133 +    %{l_shtool} mkdir -f -p -m 755 \
   1.134 +        $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney
   1.135 +    mv $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney2 \
   1.136 +       $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney/aqmoney
   1.137 +    ( echo "#!/bin/sh"
   1.138 +      echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/openhbci2:/lib:/usr/lib\""
   1.139 +      echo "export LD_LIBRARY_PATH"
   1.140 +      echo "exec %{l_prefix}/libexec/aqmoney/aqmoney \${1+\"\$@\"}"
   1.141 +    ) >$RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney
   1.142 +    chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney
   1.143 +
   1.144 +    #   post-adjust installation
   1.145 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   1.146 +    mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney2.1 \
   1.147 +       $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1
   1.148 +    mv $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney2 \
   1.149 +       $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney
   1.150 +    %{l_shtool} subst \
   1.151 +       -e 's;aqmoney2;aqmoney;g' \
   1.152 +       $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1
   1.153 +
   1.154 +    #   determine installation files
   1.155 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   1.156 +
   1.157 +%files -f files
   1.158 +
   1.159 +%clean
   1.160 +    rm -rf $RPM_BUILD_ROOT
   1.161 +

mercurial