Procházet zdrojové kódy

merge openhbci parts of old aqhbci package into aqbanking as the aqhbci part is now part of aqbanking distribution anyway

Ralf S. Engelschall před 20 roky
rodič
revize
7fcc14e1f6
1 změnil soubory, kde provedl 85 přidání a 5 odebrání
  1. 85 5
      aqbanking/aqbanking.spec

+ 85 - 5
aqbanking/aqbanking.spec

@@ -25,6 +25,8 @@
 #   package version
 %define       V_aqbanking   1.6.1
 %define       V_gwenhywfar  1.19.1
+%define       V_openhbci2   1.9.3
+%define       V_openhbci1   0.9.18
 
 #   package information
 Name:         aqbanking
@@ -37,11 +39,13 @@ Class:        EVAL
 Group:        Finance
 License:      GPL
 Version:      %{V_aqbanking}
-Release:      20051104
+Release:      20051114
 
 #   list of sources
 Source0:      http://osdn.dl.sourceforge.net/aqbanking/aqbanking-%{V_aqbanking}.tar.gz
 Source1:      http://osdn.dl.sourceforge.net/gwenhywfar/gwenhywfar-%{V_gwenhywfar}.tar.gz
+Source2:      http://osdn.dl.sourceforge.net/openhbci/openhbci2-%{V_openhbci2}.tar.gz
+Source3:      http://osdn.dl.sourceforge.net/openhbci/openhbci-%{V_openhbci1}.tar.gz
 Patch0:       aqbanking.patch
 
 #   build information
@@ -70,14 +74,67 @@ AutoReqProv:  no
         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 -d aqbanking-%{V_aqbanking}
 
 %build
-    #   build Gwhenhywfar library
+    #   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-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=%{l_prefix} \
+          --with-openssl-includes=%{l_prefix}/include \
+          --with-openssl-libs=%{l_prefix}/lib \
+          --enable-shared \
+          --enable-static
+      %{l_make} %{l_mflags}
+    ) || exit $?
+
+    #   build Gwhenhywfar
     ( cd gwenhywfar-%{V_gwenhywfar}
       %{l_shtool} subst \
           -e 's;rm -Rf gwenhywfar;#;' \
@@ -104,7 +161,7 @@ AutoReqProv:  no
           $RPM_BUILD_ROOT%{l_prefix}/bin/gwenhywfar-config
     ) || exit $?
 
-    #   build AqBanking library
+    #   build AqBanking
     ( cd aqbanking-%{V_aqbanking}
       echo 'ac_cv_header_iconv_h=no' >config.cache
       CC="%{l_cc}" \
@@ -124,11 +181,34 @@ AutoReqProv:  no
     ) || exit $?
 
 %install
-    #   install libraries
     rm -rf $RPM_BUILD_ROOT
+
+    #   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 $?
+
+    #   build Gwhenhywfar
     ( cd gwenhywfar-%{V_gwenhywfar}
       %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
     ) || exit $?
+
+    #   build AqBanking
     ( cd aqbanking-%{V_aqbanking}
       %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
     ) || exit $?
@@ -138,7 +218,7 @@ AutoReqProv:  no
     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 -f $RPM_BUILD_ROOT%{l_prefix}/share/doc
+    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
 
     #   post-adjust installation
     %{l_shtool} subst \