aqbanking/aqbanking.spec

Fri, 03 Aug 2012 20:11:53 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 03 Aug 2012 20:11:53 +0200
changeset 470
f8813e60f168
parent 25
d347f9d0cfb2
permissions
-rw-r--r--

Neutralize buggy code causing OpenPKG to have 'fatal problems' in
spite of correct installation, configuration, and operation. An
administrator suffering from this failure is even unable to
uninstall the flawed software.

michael@22 1 ##
michael@22 2 ## aqbanking.spec -- OpenPKG RPM Package Specification
michael@22 3 ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@22 4 ##
michael@22 5 ## Permission to use, copy, modify, and distribute this software for
michael@22 6 ## any purpose with or without fee is hereby granted, provided that
michael@22 7 ## the above copyright notice and this permission notice appear in all
michael@22 8 ## copies.
michael@22 9 ##
michael@22 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@22 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@22 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@22 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@22 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@22 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@22 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@22 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@22 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@22 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@22 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@22 21 ## SUCH DAMAGE.
michael@22 22 ##
michael@22 23
michael@22 24 # package version
michael@22 25 %define V_openpkg 2.3.3
michael@22 26 %define V_aqbanking 2.3.3
michael@22 27 %define V_gwenhywfar 2.6.2
michael@22 28 %define V_openhbci2 1.9.4
michael@22 29 %define V_openhbci1 0.9.18
michael@22 30
michael@22 31 # package information
michael@22 32 Name: aqbanking
michael@22 33 Summary: Banking Abstraction Library
michael@22 34 URL: http://www.aquamaniac.de/aqbanking/
michael@22 35 Vendor: Martin Preuß
michael@22 36 Packager: OpenPKG Foundation e.V.
michael@22 37 Distribution: OpenPKG Community
michael@22 38 Class: EVAL
michael@22 39 Group: Finance
michael@22 40 License: GPL
michael@22 41 Version: %{V_openpkg}
michael@25 42 Release: 20090106
michael@22 43
michael@22 44 # list of sources
michael@22 45 Source0: http://switch.dl.sourceforge.net/aqbanking/aqbanking-%{V_aqbanking}.tar.gz
michael@22 46 Source1: http://switch.dl.sourceforge.net/gwenhywfar/gwenhywfar-%{V_gwenhywfar}.tar.gz
michael@22 47 Source2: http://switch.dl.sourceforge.net/openhbci/openhbci2-%{V_openhbci2}.tar.gz
michael@22 48 Source3: http://switch.dl.sourceforge.net/openhbci/openhbci-%{V_openhbci1}.tar.gz
michael@22 49 Patch0: aqbanking.patch
michael@22 50
michael@22 51 # build information
michael@22 52 Prefix: %{l_prefix}
michael@22 53 BuildRoot: %{l_buildroot}
michael@85 54 BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, gcc::with_cxx = yes
michael@22 55 PreReq: OpenPKG, openpkg >= 20040130
michael@25 56 BuildPreReq: openssl, gettext, libiconv
michael@25 57 PreReq: openssl, gettext, libiconv
michael@22 58 AutoReq: no
michael@22 59 AutoReqProv: no
michael@22 60
michael@22 61 %description
michael@22 62 AqBanking is a middle layer between a home banking applicaton and
michael@22 63 various online banking backend libraries which provide various bank
michael@22 64 access methods. AqBanking supports the following banking operations:
michael@22 65 retrieving account balance, retrieving account statements,
michael@22 66 transfers, debit notes and EU transfers.
michael@22 67
michael@22 68 %track
michael@22 69 prog aqbanking:aqbanking = {
michael@22 70 version = %{V_aqbanking}
michael@22 71 url = http://prdownloads.sourceforge.net/aqbanking/
michael@22 72 regex = aqbanking-(\d+\.\d+(\.\d+)+)\.tar\.gz
michael@22 73 }
michael@22 74 prog aqbanking:gwenhywfar = {
michael@22 75 version = %{V_gwenhywfar}
michael@22 76 url = http://prdownloads.sourceforge.net/gwenhywfar/
michael@22 77 regex = gwenhywfar-(\d+\.\d+\.\d+)\.tar\.gz
michael@22 78 }
michael@22 79 prog aqbanking:openhbci2 = {
michael@22 80 version = %{V_openhbci2}
michael@22 81 url = http://prdownloads.sourceforge.net/openhbci/
michael@22 82 regex = openhbci2-(\d+\.\d+\.\d+)\.tar\.gz
michael@22 83 }
michael@22 84 prog aqbanking:openhbci1 = {
michael@22 85 version = %{V_openhbci1}
michael@22 86 url = http://prdownloads.sourceforge.net/openhbci/
michael@22 87 regex = openhbci-(\d+\.\d+\.\d+)\.tar\.gz
michael@22 88 }
michael@22 89
michael@22 90 %prep
michael@22 91 %setup -q -c
michael@22 92 %setup -q -D -T -a 1
michael@22 93 %setup -q -D -T -a 2
michael@22 94 %setup -q -D -T -a 3
michael@22 95 %patch -p0
michael@22 96
michael@22 97 %build
michael@22 98 # build Gwhenhywfar
michael@22 99 ( cd gwenhywfar-%{V_gwenhywfar}
michael@22 100 %{l_shtool} subst \
michael@22 101 -e 's;rm -Rf gwenhywfar;#;' \
michael@22 102 configure
michael@22 103 CC="%{l_cc}" \
michael@22 104 CFLAGS="%{l_cflags -O}" \
michael@22 105 CPPFLAGS="-I`pwd`/gwenhywfar %{l_cppflags}" \
michael@22 106 LDFLAGS="-L`pwd`/src %{l_ldflags}" \
michael@22 107 ./configure \
michael@22 108 --prefix=%{l_prefix} \
michael@22 109 --enable-ssl \
michael@22 110 --with-openssl-includes=%{l_prefix}/include \
michael@22 111 --with-openssl-libs=%{l_prefix}/lib \
michael@22 112 --disable-nls \
michael@22 113 --disable-shared
michael@22 114
michael@22 115 # build the library
michael@25 116 %{l_make} %{l_mflags -O} LIBS="-lintl -liconv"
michael@22 117
michael@22 118 # pre-install it and adjust for temporary usage by AqBanking build (below)
michael@25 119 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@22 120 %{l_shtool} subst \
michael@22 121 -e "s;%{l_prefix};$RPM_BUILD_ROOT%{l_prefix};g" \
michael@22 122 $RPM_BUILD_ROOT%{l_prefix}/bin/gwenhywfar-config
michael@22 123 ) || exit $?
michael@22 124
michael@22 125 # build OpenHBCI v1 (legacy)
michael@22 126 ( cd openhbci-%{V_openhbci1}
michael@22 127 CC="%{l_prefix}/bin/gcc" \
michael@22 128 CXX="%{l_prefix}/bin/g++" \
michael@22 129 CFLAGS="%{l_cflags -O}" \
michael@22 130 CXXFLAGS="%{l_cxxflags -O}" \
michael@22 131 CPPFLAGS="%{l_cppflags}" \
michael@22 132 LDFLAGS="%{l_ldflags}" \
michael@22 133 ./configure \
michael@22 134 --prefix=%{l_prefix} \
michael@22 135 --with-plugin-path=%{l_prefix}/lib/openhbci/plugins \
michael@22 136 --with-gwen-dir=$RPM_BUILD_ROOT%{l_prefix} \
michael@22 137 --with-openssl-includes=%{l_prefix}/include \
michael@22 138 --with-openssl-libs=%{l_prefix}/lib \
michael@22 139 --enable-shared \
michael@22 140 --enable-static
michael@25 141 %{l_make} %{l_mflags -O}
michael@22 142 ) || exit $?
michael@22 143
michael@22 144 # build OpenHBCI v2 (legacy)
michael@22 145 ( cd openhbci2-%{V_openhbci2}
michael@22 146 %{l_shtool} subst \
michael@22 147 -e 's;^\(hbcixml_LDADD =\);\1 -static ;g' \
michael@22 148 src/tools/hbcixml/Makefile.in
michael@22 149 CC="%{l_prefix}/bin/gcc" \
michael@22 150 CXX="%{l_prefix}/bin/g++" \
michael@22 151 CFLAGS="%{l_cflags -O}" \
michael@22 152 CXXFLAGS="%{l_cxxflags -O}" \
michael@22 153 CPPFLAGS="%{l_cppflags}" \
michael@22 154 LDFLAGS="%{l_ldflags}" \
michael@22 155 ./configure \
michael@22 156 --prefix=%{l_prefix} \
michael@22 157 --with-plugin-path=%{l_prefix}/lib/openhbci2/plugins \
michael@22 158 --with-xmldata-dir=%{l_prefix}/share/openhbci2/xmldata \
michael@22 159 --with-gwen-dir=$RPM_BUILD_ROOT%{l_prefix} \
michael@22 160 --with-openssl-includes=%{l_prefix}/include \
michael@22 161 --with-openssl-libs=%{l_prefix}/lib \
michael@22 162 --enable-shared \
michael@22 163 --enable-static
michael@25 164 %{l_make} %{l_mflags -O}
michael@22 165 ) || exit $?
michael@22 166
michael@22 167 # build AqBanking
michael@22 168 ( cd aqbanking-%{V_aqbanking}
michael@22 169 echo 'ac_cv_header_iconv_h=no' >config.cache
michael@22 170 CC="%{l_cc}" \
michael@22 171 CFLAGS="%{l_cflags -O}" \
michael@22 172 CPPFLAGS="-I`pwd`/aqbanking %{l_cppflags}" \
michael@22 173 LDFLAGS="-L`pwd`/src/libs/aqbanking %{l_ldflags}" \
michael@22 174 LIBS="-lssl -lcrypto" \
michael@22 175 SHELL="%{l_bash}" \
michael@22 176 ./configure \
michael@22 177 --cache-file=./config.cache \
michael@22 178 --prefix=%{l_prefix} \
michael@22 179 --with-gwen-dir=$RPM_BUILD_ROOT%{l_prefix} \
michael@22 180 --disable-chipcard-client \
michael@22 181 --with-backends="aqhbci aqdtaus" \
michael@22 182 --with-frontends="cbanking" \
michael@22 183 --disable-nls \
michael@22 184 --enable-shared \
michael@22 185 --enable-static
michael@22 186 %{l_make} %{l_mflags} \
michael@22 187 SHELL="%{l_bash}"
michael@22 188 ) || exit $?
michael@22 189
michael@22 190 %install
michael@22 191 rm -rf $RPM_BUILD_ROOT
michael@22 192
michael@22 193 # install Gwhenhywfar
michael@22 194 ( cd gwenhywfar-%{V_gwenhywfar}
michael@25 195 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@22 196 ) || exit $?
michael@22 197
michael@22 198 # install OpenHBCI v1 (legacy)
michael@22 199 ( cd openhbci-%{V_openhbci1}
michael@25 200 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@22 201 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
michael@22 202 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci/plugins/*/*/*.a
michael@22 203 mv $RPM_BUILD_ROOT%{l_prefix}/lib/*.so* \
michael@22 204 $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci/
michael@22 205 ) || exit $?
michael@22 206
michael@22 207 # install OpenHBCI v2 (legacy)
michael@22 208 ( cd openhbci2-%{V_openhbci2}
michael@25 209 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@22 210 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
michael@22 211 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci2/plugins/*/*/*.a
michael@22 212 mv $RPM_BUILD_ROOT%{l_prefix}/lib/*.so* \
michael@22 213 $RPM_BUILD_ROOT%{l_prefix}/lib/openhbci2/
michael@22 214 mv $RPM_BUILD_ROOT%{l_prefix}/bin/hbcixml \
michael@22 215 $RPM_BUILD_ROOT%{l_prefix}/bin/openhbci2-hbcixml
michael@22 216 ) || exit $?
michael@22 217
michael@22 218 # install AqBanking
michael@22 219 ( cd aqbanking-%{V_aqbanking}
michael@25 220 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@22 221 ) || exit $?
michael@22 222
michael@22 223 # strip down installation
michael@22 224 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
michael@22 225 rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/gwen-public-ca.crt
michael@22 226 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.so*
michael@22 227 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/aqbanking/plugins/0/*/*.a
michael@22 228 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
michael@22 229
michael@22 230 # post-adjust installation
michael@22 231 %{l_shtool} subst \
michael@22 232 -e 's;-laqbanking";-laqbanking -lgwenhywfar";' \
michael@22 233 -e 's;-laqbankingpp";-laqbankingpp -lgwenpp";' \
michael@22 234 -e "s;$RPM_BUILD_ROOT%{l_prefix};%{l_prefix};" \
michael@22 235 $RPM_BUILD_ROOT%{l_prefix}/bin/aqbanking-config
michael@22 236 %{l_shtool} subst \
michael@22 237 -e 's;^\(dlname=.\).*\(.\)$;\1\2;' \
michael@22 238 -e 's;^\(library_names=.\).*\(.\)$;\1\2;' \
michael@22 239 $RPM_BUILD_ROOT%{l_prefix}/lib/lib*.la
michael@22 240
michael@22 241 # determine installation files
michael@22 242 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@22 243 %{l_files_std}
michael@22 244
michael@22 245 %files -f files
michael@22 246
michael@22 247 %clean
michael@22 248 rm -rf $RPM_BUILD_ROOT
michael@22 249

mercurial