1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/aqbanking/aqbanking.spec Wed Jan 07 14:58:25 2009 +0100 1.3 @@ -0,0 +1,249 @@ 1.4 +## 1.5 +## aqbanking.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_openpkg 2.3.3 1.29 +%define V_aqbanking 2.3.3 1.30 +%define V_gwenhywfar 2.6.2 1.31 +%define V_openhbci2 1.9.4 1.32 +%define V_openhbci1 0.9.18 1.33 + 1.34 +# package information 1.35 +Name: aqbanking 1.36 +Summary: Banking Abstraction Library 1.37 +URL: http://www.aquamaniac.de/aqbanking/ 1.38 +Vendor: Martin Preuß 1.39 +Packager: OpenPKG Foundation e.V. 1.40 +Distribution: OpenPKG Community 1.41 +Class: EVAL 1.42 +Group: Finance 1.43 +License: GPL 1.44 +Version: %{V_openpkg} 1.45 +Release: 20080101 1.46 + 1.47 +# list of sources 1.48 +Source0: http://switch.dl.sourceforge.net/aqbanking/aqbanking-%{V_aqbanking}.tar.gz 1.49 +Source1: http://switch.dl.sourceforge.net/gwenhywfar/gwenhywfar-%{V_gwenhywfar}.tar.gz 1.50 +Source2: http://switch.dl.sourceforge.net/openhbci/openhbci2-%{V_openhbci2}.tar.gz 1.51 +Source3: http://switch.dl.sourceforge.net/openhbci/openhbci-%{V_openhbci1}.tar.gz 1.52 +Patch0: aqbanking.patch 1.53 + 1.54 +# build information 1.55 +Prefix: %{l_prefix} 1.56 +BuildRoot: %{l_buildroot} 1.57 +BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, gcc::with_cxx = yes 1.58 +PreReq: OpenPKG, openpkg >= 20040130 1.59 +BuildPreReq: openssl 1.60 +PreReq: openssl 1.61 +AutoReq: no 1.62 +AutoReqProv: no 1.63 + 1.64 +%description 1.65 + AqBanking is a middle layer between a home banking applicaton and 1.66 + various online banking backend libraries which provide various bank 1.67 + access methods. AqBanking supports the following banking operations: 1.68 + retrieving account balance, retrieving account statements, 1.69 + transfers, debit notes and EU transfers. 1.70 + 1.71 +%track 1.72 + prog aqbanking:aqbanking = { 1.73 + version = %{V_aqbanking} 1.74 + url = http://prdownloads.sourceforge.net/aqbanking/ 1.75 + regex = aqbanking-(\d+\.\d+(\.\d+)+)\.tar\.gz 1.76 + } 1.77 + prog aqbanking:gwenhywfar = { 1.78 + version = %{V_gwenhywfar} 1.79 + url = http://prdownloads.sourceforge.net/gwenhywfar/ 1.80 + regex = gwenhywfar-(\d+\.\d+\.\d+)\.tar\.gz 1.81 + } 1.82 + prog aqbanking:openhbci2 = { 1.83 + version = %{V_openhbci2} 1.84 + url = http://prdownloads.sourceforge.net/openhbci/ 1.85 + regex = openhbci2-(\d+\.\d+\.\d+)\.tar\.gz 1.86 + } 1.87 + prog aqbanking:openhbci1 = { 1.88 + version = %{V_openhbci1} 1.89 + url = http://prdownloads.sourceforge.net/openhbci/ 1.90 + regex = openhbci-(\d+\.\d+\.\d+)\.tar\.gz 1.91 + } 1.92 + 1.93 +%prep 1.94 + %setup -q -c 1.95 + %setup -q -D -T -a 1 1.96 + %setup -q -D -T -a 2 1.97 + %setup -q -D -T -a 3 1.98 + %patch -p0 1.99 + 1.100 +%build 1.101 + # build Gwhenhywfar 1.102 + ( cd gwenhywfar-%{V_gwenhywfar} 1.103 + %{l_shtool} subst \ 1.104 + -e 's;rm -Rf gwenhywfar;#;' \ 1.105 + configure 1.106 + CC="%{l_cc}" \ 1.107 + CFLAGS="%{l_cflags -O}" \ 1.108 + CPPFLAGS="-I`pwd`/gwenhywfar %{l_cppflags}" \ 1.109 + LDFLAGS="-L`pwd`/src %{l_ldflags}" \ 1.110 + ./configure \ 1.111 + --prefix=%{l_prefix} \ 1.112 + --enable-ssl \ 1.113 + --with-openssl-includes=%{l_prefix}/include \ 1.114 + --with-openssl-libs=%{l_prefix}/lib \ 1.115 + --disable-nls \ 1.116 + --disable-shared 1.117 + 1.118 + # build the library 1.119 + %{l_make} %{l_mflags} 1.120 + 1.121 + # pre-install it and adjust for temporary usage by AqBanking build (below) 1.122 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 1.123 + %{l_shtool} subst \ 1.124 + -e "s;%{l_prefix};$RPM_BUILD_ROOT%{l_prefix};g" \ 1.125 + $RPM_BUILD_ROOT%{l_prefix}/bin/gwenhywfar-config 1.126 + ) || exit $? 1.127 + 1.128 + # build OpenHBCI v1 (legacy) 1.129 + ( cd openhbci-%{V_openhbci1} 1.130 + CC="%{l_prefix}/bin/gcc" \ 1.131 + CXX="%{l_prefix}/bin/g++" \ 1.132 + CFLAGS="%{l_cflags -O}" \ 1.133 + CXXFLAGS="%{l_cxxflags -O}" \ 1.134 + CPPFLAGS="%{l_cppflags}" \ 1.135 + LDFLAGS="%{l_ldflags}" \ 1.136 + ./configure \ 1.137 + --prefix=%{l_prefix} \ 1.138 + --with-plugin-path=%{l_prefix}/lib/openhbci/plugins \ 1.139 + --with-gwen-dir=$RPM_BUILD_ROOT%{l_prefix} \ 1.140 + --with-openssl-includes=%{l_prefix}/include \ 1.141 + --with-openssl-libs=%{l_prefix}/lib \ 1.142 + --enable-shared \ 1.143 + --enable-static 1.144 + %{l_make} %{l_mflags} 1.145 + ) || exit $? 1.146 + 1.147 + # build OpenHBCI v2 (legacy) 1.148 + ( cd openhbci2-%{V_openhbci2} 1.149 + %{l_shtool} subst \ 1.150 + -e 's;^\(hbcixml_LDADD =\);\1 -static ;g' \ 1.151 + src/tools/hbcixml/Makefile.in 1.152 + CC="%{l_prefix}/bin/gcc" \ 1.153 + CXX="%{l_prefix}/bin/g++" \ 1.154 + CFLAGS="%{l_cflags -O}" \ 1.155 + CXXFLAGS="%{l_cxxflags -O}" \ 1.156 + CPPFLAGS="%{l_cppflags}" \ 1.157 + LDFLAGS="%{l_ldflags}" \ 1.158 + ./configure \ 1.159 + --prefix=%{l_prefix} \ 1.160 + --with-plugin-path=%{l_prefix}/lib/openhbci2/plugins \ 1.161 + --with-xmldata-dir=%{l_prefix}/share/openhbci2/xmldata \ 1.162 + --with-gwen-dir=$RPM_BUILD_ROOT%{l_prefix} \ 1.163 + --with-openssl-includes=%{l_prefix}/include \ 1.164 + --with-openssl-libs=%{l_prefix}/lib \ 1.165 + --enable-shared \ 1.166 + --enable-static 1.167 + %{l_make} %{l_mflags} 1.168 + ) || exit $? 1.169 + 1.170 + # build AqBanking 1.171 + ( cd aqbanking-%{V_aqbanking} 1.172 + echo 'ac_cv_header_iconv_h=no' >config.cache 1.173 + CC="%{l_cc}" \ 1.174 + CFLAGS="%{l_cflags -O}" \ 1.175 + CPPFLAGS="-I`pwd`/aqbanking %{l_cppflags}" \ 1.176 + LDFLAGS="-L`pwd`/src/libs/aqbanking %{l_ldflags}" \ 1.177 + LIBS="-lssl -lcrypto" \ 1.178 + SHELL="%{l_bash}" \ 1.179 + ./configure \ 1.180 + --cache-file=./config.cache \ 1.181 + --prefix=%{l_prefix} \ 1.182 + --with-gwen-dir=$RPM_BUILD_ROOT%{l_prefix} \ 1.183 + --disable-chipcard-client \ 1.184 + --with-backends="aqhbci aqdtaus" \ 1.185 + --with-frontends="cbanking" \ 1.186 + --disable-nls \ 1.187 + --enable-shared \ 1.188 + --enable-static 1.189 + %{l_make} %{l_mflags} \ 1.190 + SHELL="%{l_bash}" 1.191 + ) || exit $? 1.192 + 1.193 +%install 1.194 + rm -rf $RPM_BUILD_ROOT 1.195 + 1.196 + # install Gwhenhywfar 1.197 + ( cd gwenhywfar-%{V_gwenhywfar} 1.198 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 1.199 + ) || exit $? 1.200 + 1.201 + # install OpenHBCI v1 (legacy) 1.202 + ( cd openhbci-%{V_openhbci1} 1.203 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 1.204 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 1.205 + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci/plugins/*/*/*.a 1.206 + mv $RPM_BUILD_ROOT%{l_prefix}/lib/*.so* \ 1.207 + $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci/ 1.208 + ) || exit $? 1.209 + 1.210 + # install OpenHBCI v2 (legacy) 1.211 + ( cd openhbci2-%{V_openhbci2} 1.212 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 1.213 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 1.214 + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci2/plugins/*/*/*.a 1.215 + mv $RPM_BUILD_ROOT%{l_prefix}/lib/*.so* \ 1.216 + $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci2/ 1.217 + mv $RPM_BUILD_ROOT%{l_prefix}/bin/hbcixml \ 1.218 + $RPM_BUILD_ROOT%{l_prefix}/bin/openhbci2-hbcixml 1.219 + ) || exit $? 1.220 + 1.221 + # install AqBanking 1.222 + ( cd aqbanking-%{V_aqbanking} 1.223 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 1.224 + ) || exit $? 1.225 + 1.226 + # strip down installation 1.227 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 1.228 + rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/gwen-public-ca.crt 1.229 + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.so* 1.230 + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/aqbanking/plugins/0/*/*.a 1.231 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc 1.232 + 1.233 + # post-adjust installation 1.234 + %{l_shtool} subst \ 1.235 + -e 's;-laqbanking";-laqbanking -lgwenhywfar";' \ 1.236 + -e 's;-laqbankingpp";-laqbankingpp -lgwenpp";' \ 1.237 + -e "s;$RPM_BUILD_ROOT%{l_prefix};%{l_prefix};" \ 1.238 + $RPM_BUILD_ROOT%{l_prefix}/bin/aqbanking-config 1.239 + %{l_shtool} subst \ 1.240 + -e 's;^\(dlname=.\).*\(.\)$;\1\2;' \ 1.241 + -e 's;^\(library_names=.\).*\(.\)$;\1\2;' \ 1.242 + $RPM_BUILD_ROOT%{l_prefix}/lib/lib*.la 1.243 + 1.244 + # determine installation files 1.245 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 1.246 + %{l_files_std} 1.247 + 1.248 +%files -f files 1.249 + 1.250 +%clean 1.251 + rm -rf $RPM_BUILD_ROOT 1.252 +