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