aqbanking/aqbanking.spec

Wed, 14 Jan 2009 15:59:12 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 14 Jan 2009 15:59:12 +0100
changeset 86
78e7deb1d6ab
parent 25
d347f9d0cfb2
permissions
-rw-r--r--

Correct and improve many buildconf and code logic blocks. In particular:
1. Document potential problems building with current binutils releases.
2. Document the flawed webkit and explain its temporary exclusion.
3. Document the edition of Qt which is built and installed.
4. Remove the Solaris x11_supdir logic as it is no longer found.
5. Correct several .pr[io] files including QMAKE_CXXFLAGS and INCPATH,
which previously caused preexisting Qt installations to deliver
erroneous old include and library logic instead of relying on
that of the currently building package. -I/opkg/include is now
placed at the end of the compile statements.
6. Don't trust the QMAKE_[INC|LIB]DIR_X11 identifiers in qmake.conf.
7. Allow more 64-bit builds and more properly identify the platform.
8. Place plugins (which are shared objects) in lib instead of share.
9. Build components as plugins when possible if with_shared is enabled.
10. Translate German text to English to be more consistent.
11. Instead of removing the pkgconfig directory of with_shared builds,
place it in a child directory useful for shared building.
12. Document the nonstandard shared build directory structure,
including using the hidden pkgconfig directory (PKG_CONFIG_PATH.)
13. Change %doc to specify files rather than directories in the RPM DB.

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

mercurial