diff -r 5ba5c2911c12 -r 0d4f475bfc81 aqmoney/aqmoney.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aqmoney/aqmoney.spec Wed Jan 07 14:58:25 2009 +0100 @@ -0,0 +1,158 @@ +## +## aqmoney.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package version +%define V_aqmoney 1.9.5 +%define V_ktoblzcheck 1.19 + +# package information +Name: aqmoney +Summary: Homebanking Command Line Interface +URL: http://aqmoney.sourceforge.net/ +Vendor: Martin Preuß +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: EVAL +Group: Finance +License: GPL +Version: %{V_aqmoney} +Release: 20080813 + +# list of sources +Source0: http://switch.dl.sourceforge.net/aqmoney/aqmoney2-%{V_aqmoney}.tar.gz +Source1: http://switch.dl.sourceforge.net/ktoblzcheck/ktoblzcheck-%{V_ktoblzcheck}.tar.gz +Patch0: aqmoney.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130 +PreReq: OpenPKG, openpkg >= 20040130 +BuildPreReq: aqbanking +PreReq: aqbanking +AutoReq: no +AutoReqProv: no + +%description + AqMoney is a command line interface for the AqBanking/AqHBCI and + OpenHBCI libraries in order to perform financial transactions + through the German HomeBanking Computer Interface (HBCI). + +%track + prog aqmoney = { + version = %{V_aqmoney} + url = http://prdownloads.sourceforge.net/aqmoney/ + regex = aqmoney2-(__VER__)\.tar\.gz + } + prog aqmoney:ktoblzcheck = { + version = %{V_ktoblzcheck} + url = http://prdownloads.sourceforge.net/ktoblzcheck/ + regex = ktoblzcheck-(__VER__)\.tar\.gz + } + +%prep + %setup -q -c + %setup -q -D -T -a 1 + %patch -p0 -d aqmoney2-%{V_aqmoney} + +%build + # build KtoBlzCheck library + ( cd ktoblzcheck-%{V_ktoblzcheck} + CC="%{l_cc}" \ + CXX="%{l_cxx}" \ + CFLAGS="%{l_cflags -O}" \ + CXXFLAGS="%{l_cxxflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + ./configure \ + --prefix=%{l_prefix} \ + --disable-shared + %{l_make} %{l_mflags -O} + + # pre-install it and adjust for temporary usage by AqMoney build (below) + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + ) || exit $? + + # configure and build program + ( cd aqmoney2-%{version} + %{l_shtool} subst \ + -e 's;ktoblzcheck_datafile="";;' \ + configure + CC="%{l_cxx}" \ + CXX="%{l_cxx}" \ + CFLAGS="%{l_cflags -O}" \ + CXXFLAGS="%{l_cxxflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + ./configure \ + --prefix=%{l_prefix} \ + --with-openhbci-prefix=%{l_prefix} \ + --with-ktoblzcheck-includes=$RPM_BUILD_ROOT%{l_prefix}/include \ + --with-ktoblzcheck-libs=$RPM_BUILD_ROOT%{l_prefix}/lib \ + --with-ktoblzcheck-datafile=%{l_prefix}/share/ktoblzcheck/bankdata.txt \ + --disable-shared \ + --disable-nls + %{l_make} %{l_mflags -O} + ) || exit $? + +%install + rm -rf $RPM_BUILD_ROOT + + # install programs + ( cd ktoblzcheck-%{V_ktoblzcheck} + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + ) || exit $? + ( cd aqmoney2-%{version} + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + ) || exit $? + + # workaround problems with AqHBCI plugin run-time + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney + mv $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney2 \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney/aqmoney + ( echo "#!/bin/sh" + echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/openhbci2:/lib:/usr/lib\"" + echo "export LD_LIBRARY_PATH" + echo "exec %{l_prefix}/libexec/aqmoney/aqmoney \${1+\"\$@\"}" + ) >$RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney + chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney + + # post-adjust installation + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney2.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1 + mv $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney2 \ + $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney + %{l_shtool} subst \ + -e 's;aqmoney2;aqmoney;g' \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1 + + # determine installation files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT +