## ## aqbanking.spec -- OpenPKG RPM Package Specification ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. ## Copyright (c) 2000-2007 Ralf S. Engelschall ## ## 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_openpkg 2.2.5 %define V_aqbanking 2.2.5 %define V_gwenhywfar 2.5.1 %define V_openhbci2 1.9.4 %define V_openhbci1 0.9.18 # package information Name: aqbanking Summary: Banking Abstraction Library URL: http://www.aquamaniac.de/aqbanking/ Vendor: Martin Preuß Packager: OpenPKG Foundation e.V. Distribution: OpenPKG Community Class: EVAL Group: Finance License: GPL Version: %{V_openpkg} Release: 20070116 # list of sources Source0: http://switch.dl.sourceforge.net/aqbanking/aqbanking-%{V_aqbanking}.tar.gz Source1: http://switch.dl.sourceforge.net/gwenhywfar/gwenhywfar-%{V_gwenhywfar}.tar.gz Source2: http://switch.dl.sourceforge.net/openhbci/openhbci2-%{V_openhbci2}.tar.gz Source3: http://switch.dl.sourceforge.net/openhbci/openhbci-%{V_openhbci1}.tar.gz Patch0: aqbanking.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20040130, gcc PreReq: OpenPKG, openpkg >= 20040130 BuildPreReq: openssl PreReq: openssl AutoReq: no AutoReqProv: no %description AqBanking is a middle layer between a home banking applicaton and various online banking backend libraries which provide various bank access methods. AqBanking supports the following banking operations: retrieving account balance, retrieving account statements, transfers, debit notes and EU transfers. %track prog aqbanking = { version = %{V_aqbanking} url = http://prdownloads.sourceforge.net/aqbanking/ regex = aqbanking-(\d+(\.\d+)+(?:beta)?)\.tar\.gz } prog aqbanking:gwenhywfar = { version = %{V_gwenhywfar} url = http://prdownloads.sourceforge.net/gwenhywfar/ regex = gwenhywfar-(__VER__)\.tar\.gz } prog aqbanking:openhbci2 = { version = %{V_openhbci2} url = http://prdownloads.sourceforge.net/openhbci/ regex = openhbci2-(\d+\.\d+\.\d+)\.tar\.gz } prog aqbanking:openhbci1 = { version = %{V_openhbci1} url = http://prdownloads.sourceforge.net/openhbci/ regex = openhbci-(\d+\.\d+\.\d+)\.tar\.gz } %prep %setup -q -c %setup -q -D -T -a 1 %setup -q -D -T -a 2 %setup -q -D -T -a 3 %patch -p0 %build # build Gwhenhywfar ( cd gwenhywfar-%{V_gwenhywfar} %{l_shtool} subst \ -e 's;rm -Rf gwenhywfar;#;' \ configure CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="-I`pwd`/gwenhywfar %{l_cppflags}" \ LDFLAGS="-L`pwd`/src %{l_ldflags}" \ ./configure \ --prefix=%{l_prefix} \ --enable-ssl \ --with-openssl-includes=%{l_prefix}/include \ --with-openssl-libs=%{l_prefix}/lib \ --disable-nls \ --disable-shared # build the library %{l_make} %{l_mflags} # pre-install it and adjust for temporary usage by AqBanking build (below) %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" %{l_shtool} subst \ -e "s;%{l_prefix};$RPM_BUILD_ROOT%{l_prefix};g" \ $RPM_BUILD_ROOT%{l_prefix}/bin/gwenhywfar-config ) || exit $? # build OpenHBCI v1 (legacy) ( cd openhbci-%{V_openhbci1} CC="%{l_prefix}/bin/gcc" \ CXX="%{l_prefix}/bin/g++" \ CFLAGS="%{l_cflags -O}" \ CXXFLAGS="%{l_cxxflags -O}" \ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags}" \ ./configure \ --prefix=%{l_prefix} \ --with-plugin-path=%{l_prefix}/lib/openhbci/plugins \ --with-gwen-dir=$RPM_BUILD_ROOT%{l_prefix} \ --with-openssl-includes=%{l_prefix}/include \ --with-openssl-libs=%{l_prefix}/lib \ --enable-shared \ --enable-static %{l_make} %{l_mflags} ) || exit $? # build OpenHBCI v2 (legacy) ( cd openhbci2-%{V_openhbci2} %{l_shtool} subst \ -e 's;^\(hbcixml_LDADD =\);\1 -static ;g' \ src/tools/hbcixml/Makefile.in CC="%{l_prefix}/bin/gcc" \ CXX="%{l_prefix}/bin/g++" \ CFLAGS="%{l_cflags -O}" \ CXXFLAGS="%{l_cxxflags -O}" \ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags}" \ ./configure \ --prefix=%{l_prefix} \ --with-plugin-path=%{l_prefix}/lib/openhbci2/plugins \ --with-xmldata-dir=%{l_prefix}/share/openhbci2/xmldata \ --with-gwen-dir=$RPM_BUILD_ROOT%{l_prefix} \ --with-openssl-includes=%{l_prefix}/include \ --with-openssl-libs=%{l_prefix}/lib \ --enable-shared \ --enable-static %{l_make} %{l_mflags} ) || exit $? # build AqBanking ( cd aqbanking-%{V_aqbanking} echo 'ac_cv_header_iconv_h=no' >config.cache CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="-I`pwd`/aqbanking %{l_cppflags}" \ LDFLAGS="-L`pwd`/src/libs/aqbanking %{l_ldflags}" \ LIBS="-lssl -lcrypto" \ SHELL="%{l_bash}" \ ./configure \ --cache-file=./config.cache \ --prefix=%{l_prefix} \ --with-gwen-dir=$RPM_BUILD_ROOT%{l_prefix} \ --disable-chipcard-client \ --with-backends="aqhbci aqdtaus" \ --with-frontends="cbanking" \ --disable-nls \ --enable-shared \ --enable-static %{l_make} %{l_mflags} \ SHELL="%{l_bash}" ) || exit $? %install rm -rf $RPM_BUILD_ROOT # install Gwhenhywfar ( cd gwenhywfar-%{V_gwenhywfar} %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" ) || exit $? # install OpenHBCI v1 (legacy) ( cd openhbci-%{V_openhbci1} %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci/plugins/*/*/*.a mv $RPM_BUILD_ROOT%{l_prefix}/lib/*.so* \ $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci/ ) || exit $? # install OpenHBCI v2 (legacy) ( cd openhbci2-%{V_openhbci2} %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci2/plugins/*/*/*.a mv $RPM_BUILD_ROOT%{l_prefix}/lib/*.so* \ $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci2/ mv $RPM_BUILD_ROOT%{l_prefix}/bin/hbcixml \ $RPM_BUILD_ROOT%{l_prefix}/bin/openhbci2-hbcixml ) || exit $? # install AqBanking ( cd aqbanking-%{V_aqbanking} %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" ) || exit $? # strip down installation strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/gwen-public-ca.crt rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.so* rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/aqbanking/plugins/0/*/*.a rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc # post-adjust installation %{l_shtool} subst \ -e 's;-laqbanking";-laqbanking -lgwenhywfar";' \ -e 's;-laqbankingpp";-laqbankingpp -lgwenpp";' \ -e "s;$RPM_BUILD_ROOT%{l_prefix};%{l_prefix};" \ $RPM_BUILD_ROOT%{l_prefix}/bin/aqbanking-config %{l_shtool} subst \ -e 's;^\(dlname=.\).*\(.\)$;\1\2;' \ -e 's;^\(library_names=.\).*\(.\)$;\1\2;' \ $RPM_BUILD_ROOT%{l_prefix}/lib/lib*.la # determine installation files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} \ '%not %dir %{l_prefix}/share/aclocal' %files -f files %clean rm -rf $RPM_BUILD_ROOT