aqmoney/aqmoney.spec

Wed, 07 Jan 2009 14:58:25 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 07 Jan 2009 14:58:25 +0100
changeset 22
0d4f475bfc81
child 26
89094e16ef70
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

     1 ##
     2 ##  aqmoney.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package version
    25 %define       V_aqmoney     1.9.5
    26 %define       V_ktoblzcheck 1.19
    28 #   package information
    29 Name:         aqmoney
    30 Summary:      Homebanking Command Line Interface
    31 URL:          http://aqmoney.sourceforge.net/
    32 Vendor:       Martin Preuß
    33 Packager:     OpenPKG Foundation e.V.
    34 Distribution: OpenPKG Community
    35 Class:        EVAL
    36 Group:        Finance
    37 License:      GPL
    38 Version:      %{V_aqmoney}
    39 Release:      20080813
    41 #   list of sources
    42 Source0:      http://switch.dl.sourceforge.net/aqmoney/aqmoney2-%{V_aqmoney}.tar.gz
    43 Source1:      http://switch.dl.sourceforge.net/ktoblzcheck/ktoblzcheck-%{V_ktoblzcheck}.tar.gz
    44 Patch0:       aqmoney.patch
    46 #   build information
    47 Prefix:       %{l_prefix}
    48 BuildRoot:    %{l_buildroot}
    49 BuildPreReq:  OpenPKG, openpkg >= 20040130
    50 PreReq:       OpenPKG, openpkg >= 20040130
    51 BuildPreReq:  aqbanking
    52 PreReq:       aqbanking
    53 AutoReq:      no
    54 AutoReqProv:  no
    56 %description
    57     AqMoney is a command line interface for the AqBanking/AqHBCI and
    58     OpenHBCI libraries in order to perform financial transactions
    59     through the German HomeBanking Computer Interface (HBCI).
    61 %track
    62     prog aqmoney = {
    63         version   = %{V_aqmoney}
    64         url       = http://prdownloads.sourceforge.net/aqmoney/
    65         regex     = aqmoney2-(__VER__)\.tar\.gz
    66     }
    67     prog aqmoney:ktoblzcheck = {
    68         version   = %{V_ktoblzcheck}
    69         url       = http://prdownloads.sourceforge.net/ktoblzcheck/
    70         regex     = ktoblzcheck-(__VER__)\.tar\.gz
    71     }
    73 %prep
    74     %setup -q -c
    75     %setup -q -D -T -a 1
    76     %patch -p0 -d aqmoney2-%{V_aqmoney}
    78 %build
    79     #   build KtoBlzCheck library
    80     ( cd ktoblzcheck-%{V_ktoblzcheck}
    81       CC="%{l_cc}" \
    82       CXX="%{l_cxx}" \
    83       CFLAGS="%{l_cflags -O}" \
    84       CXXFLAGS="%{l_cxxflags -O}" \
    85       CPPFLAGS="%{l_cppflags}" \
    86       LDFLAGS="%{l_ldflags}" \
    87       ./configure \
    88           --prefix=%{l_prefix} \
    89           --disable-shared
    90       %{l_make} %{l_mflags -O}
    92       #   pre-install it and adjust for temporary usage by AqMoney build (below)
    93       %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
    94     ) || exit $?
    96     #   configure and build program
    97     ( cd aqmoney2-%{version}
    98       %{l_shtool} subst \
    99           -e 's;ktoblzcheck_datafile="";;' \
   100           configure
   101       CC="%{l_cxx}" \
   102       CXX="%{l_cxx}" \
   103       CFLAGS="%{l_cflags -O}" \
   104       CXXFLAGS="%{l_cxxflags -O}" \
   105       CPPFLAGS="%{l_cppflags}" \
   106       LDFLAGS="%{l_ldflags}" \
   107       ./configure \
   108           --prefix=%{l_prefix} \
   109           --with-openhbci-prefix=%{l_prefix} \
   110           --with-ktoblzcheck-includes=$RPM_BUILD_ROOT%{l_prefix}/include \
   111           --with-ktoblzcheck-libs=$RPM_BUILD_ROOT%{l_prefix}/lib \
   112           --with-ktoblzcheck-datafile=%{l_prefix}/share/ktoblzcheck/bankdata.txt \
   113           --disable-shared \
   114           --disable-nls
   115       %{l_make} %{l_mflags -O}
   116     ) || exit $?
   118 %install
   119     rm -rf $RPM_BUILD_ROOT
   121     #   install programs
   122     ( cd ktoblzcheck-%{V_ktoblzcheck}
   123       %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   124     ) || exit $?
   125     ( cd aqmoney2-%{version}
   126       %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   127     ) || exit $?
   129     #   workaround problems with AqHBCI plugin run-time
   130     %{l_shtool} mkdir -f -p -m 755 \
   131         $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney
   132     mv $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney2 \
   133        $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney/aqmoney
   134     ( echo "#!/bin/sh"
   135       echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/openhbci2:/lib:/usr/lib\""
   136       echo "export LD_LIBRARY_PATH"
   137       echo "exec %{l_prefix}/libexec/aqmoney/aqmoney \${1+\"\$@\"}"
   138     ) >$RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney
   139     chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney
   141     #   post-adjust installation
   142     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   143     mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney2.1 \
   144        $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1
   145     mv $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney2 \
   146        $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney
   147     %{l_shtool} subst \
   148        -e 's;aqmoney2;aqmoney;g' \
   149        $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1
   151     #   determine installation files
   152     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   154 %files -f files
   156 %clean
   157     rm -rf $RPM_BUILD_ROOT

mercurial