# HG changeset patch # User Michael Schloh von Bennewitz # Date 1231336705 -3600 # Node ID 0d4f475bfc813f6c467c728e51466b532d07800c # Parent 5ba5c2911c128cd64f8f1e3427f411d81ffc8ea1 Import package vendor original specs for necessary manipulations. diff -r 5ba5c2911c12 -r 0d4f475bfc81 aqbanking/aqbanking.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aqbanking/aqbanking.patch Wed Jan 07 14:58:25 2009 +0100 @@ -0,0 +1,69 @@ +Index: aqbanking-2.3.3/src/libs/aqbanking/Makefile.in +--- aqbanking-2.3.3/src/libs/aqbanking/Makefile.in.orig 2006-01-28 00:56:18 +0100 ++++ aqbanking-2.3.3/src/libs/aqbanking/Makefile.in 2006-01-28 09:50:06 +0100 +@@ -525,7 +525,7 @@ + wcb.c\ + msgengine.c + +-libaqbanking_la_LIBADD = $(gwenhywfar_libs) \ ++libaqbanking_la_LIBADD = \ + jobs/libjobs.la \ + types/libtypes.la + +@@ -537,7 +537,7 @@ + libaqbanking_la_DEPENDENCIES = jobs/libjobs.la types/libtypes.la \ + $(am__append_1) + testlib_SOURCES = testlib.c +-testlib_LDADD = libaqbanking.la ++testlib_LDADD = libaqbanking.la $(gwenhywfar_libs) + TESTS = testlib + all: all-recursive + +Index: aqbanking-2.3.3/src/plugins/bankinfo/generic/Makefile.in +--- aqbanking-2.3.3/src/plugins/bankinfo/generic/Makefile.in.orig 2006-01-28 00:56:42 +0100 ++++ aqbanking-2.3.3/src/plugins/bankinfo/generic/Makefile.in 2006-01-28 09:49:40 +0100 +@@ -476,7 +476,7 @@ + libbankinfo_la_SOURCES = \ + generic.c + +-libbankinfo_la_LIBADD = -L$(top_builddir)/src/libs/aqbanking $(aqbanking_internal_libs) $(gwenhywfar_libs) ++libbankinfo_la_LIBADD = + libbankinfo_la_LDFLAGS = $(STRIPALL) + at_files = at/blz.idx at/bic.idx at/namloc.idx at/banks.data + ch_files = ch/blz.idx ch/bic.idx ch/namloc.idx ch/banks.data +Index: openhbci-0.9.18/src/openhbci/openhbci-config.in.in +--- openhbci-0.9.18/src/openhbci/openhbci-config.in.in.orig 2003-05-18 23:46:36 +0200 ++++ openhbci-0.9.18/src/openhbci/openhbci-config.in.in 2006-01-28 09:49:40 +0100 +@@ -9,7 +9,7 @@ + result="$result @PROGRAM_INCLUDES@ -I$dir/include" + ;; + --libraries) +- result="$result -L$dir/lib @OPENHBCI_LIB@" ++ result="$result -L$dir/lib @OPENHBCI_LIB@ -lgwenhywfar" + ;; + --plugins) + result="$result @PLUGIN_PATH@/@OPENHBCI_SO_VERSION@" +Index: openhbci2-1.9.4/src/openhbci-tng/openhbci2-config.in.in +--- openhbci2-1.9.4/src/openhbci-tng/openhbci2-config.in.in.orig 2004-05-20 03:33:53 +0200 ++++ openhbci2-1.9.4/src/openhbci-tng/openhbci2-config.in.in 2006-01-28 09:49:40 +0100 +@@ -9,7 +9,7 @@ + result="$result @PROGRAM_INCLUDES@ -I$dir/include" + ;; + --libraries) +- result="$result -L$dir/lib @OPENHBCI_LIB@" ++ result="$result -L$dir/lib @OPENHBCI_LIB@ -lgwenhywfar" + ;; + --plugins) + result="$result @PLUGIN_PATH@/@OPENHBCI_SO_EFFECTIVE_VERSION@" +Index: openhbci2-1.9.4/src/tools/hbcixml/Makefile.in +--- openhbci2-1.9.4/src/tools/hbcixml/Makefile.in.orig 2006-01-20 12:09:55 +0100 ++++ openhbci2-1.9.4/src/tools/hbcixml/Makefile.in 2006-01-28 09:49:40 +0100 +@@ -218,7 +218,7 @@ + INCLUDES = -I../../../ -I../../../openhbci2 @PROGRAM_INCLUDES@ -I../../plugins/msg-xml + noinst_HEADERS = loganalyzer.h + hbcixml_SOURCES = hbcixml.cpp loganalyzer.cpp +-hbcixml_LDADD = -L../../openhbci-tng -L../../openhbci-tng/openhbci-core @PROGRAM_LIBS@ ../../plugins/msg-xml/libmsgxml.la ++hbcixml_LDADD = -L../../openhbci-tng -L../../openhbci-tng/openhbci-core @PROGRAM_LIBS@ ../../plugins/msg-xml/libmsgxml.la $(gwenhywfar_libs) + all: all-am + + .SUFFIXES: diff -r 5ba5c2911c12 -r 0d4f475bfc81 aqbanking/aqbanking.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aqbanking/aqbanking.spec Wed Jan 07 14:58:25 2009 +0100 @@ -0,0 +1,249 @@ +## +## aqbanking.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## +## 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.3.3 +%define V_aqbanking 2.3.3 +%define V_gwenhywfar 2.6.2 +%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: 20080101 + +# 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, gcc::with_cxx = yes +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:aqbanking = { + version = %{V_aqbanking} + url = http://prdownloads.sourceforge.net/aqbanking/ + regex = aqbanking-(\d+\.\d+(\.\d+)+)\.tar\.gz + } + prog aqbanking:gwenhywfar = { + version = %{V_gwenhywfar} + url = http://prdownloads.sourceforge.net/gwenhywfar/ + regex = gwenhywfar-(\d+\.\d+\.\d+)\.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} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + diff -r 5ba5c2911c12 -r 0d4f475bfc81 aqmoney/aqmoney.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aqmoney/aqmoney.patch Wed Jan 07 14:58:25 2009 +0100 @@ -0,0 +1,63 @@ +Index: src/Makefile.in +--- src/Makefile.in.orig 2004-05-27 23:29:46 +0200 ++++ src/Makefile.in 2005-04-21 21:58:27 +0200 +@@ -197,7 +197,7 @@ + + + aqmoney2_LDADD = \ +- @PROGRAM_LIBS@ modules/libmodules.la libaqmoney/libaqmoney.la ++ modules/libmodules.la libaqmoney/libaqmoney.la @PROGRAM_LIBS@ + + aqmoney2_SOURCES = \ + aqmauth.cpp \ +@@ -206,7 +206,7 @@ + + + qtest_LDADD = \ +- @PROGRAM_LIBS@ modules/libmodules.la libaqmoney/libaqmoney.la ++ modules/libmodules.la libaqmoney/libaqmoney.la @PROGRAM_LIBS@ + + + qtest_SOURCES = qtest.cpp +Index: src/libaqmoney/converter/oldconf.c +--- src/libaqmoney/converter/oldconf.c.orig 2004-01-25 19:51:29 +0100 ++++ src/libaqmoney/converter/oldconf.c 2005-04-21 21:34:14 +0200 +@@ -642,7 +642,7 @@ + assert(root); + assert(path); + DBG_VERBOUS(0, "GetValue for \"%s\"",path); +- var=ConfigOld__GetPath(root,path, ++ var=(CONFIGOLDVARIABLE *)ConfigOld__GetPath(root,path, + CONFIGOLDMODE_PATHMUSTEXIST | + CONFIGOLDMODE_NAMEMUSTEXIST | + CONFIGOLDMODE_VARIABLE); +@@ -945,7 +945,7 @@ + } + *p=0; + DBG_VERBOUS(0, "Selecting group \"%s\"",name); +- grp=ConfigOld__GetPath(root, name, mode &~CONFIGOLDMODE_VARIABLE); ++ grp=(CONFIGOLDGROUP *)ConfigOld__GetPath(root, name, mode &~CONFIGOLDMODE_VARIABLE); + if (!grp) { + DBG_DEBUG(0, "Group \"%s\" is not available",name); + return 0; +@@ -1017,7 +1017,7 @@ + + DBG_VERBOUS(0, "Creating variable \"%s\"",np); + if (mode & CONFIGOLDMODE_ALLOW_PATH_IN_VARS) +- var=ConfigOld__GetPath(group, ++ var=(CONFIGOLDVARIABLE *)ConfigOld__GetPath(group, + np, + mode|CONFIGOLDMODE_VARIABLE); + else { +Index: configure +--- configure.orig 2004-05-27 23:29:51 +0200 ++++ configure 2005-04-22 11:16:30 +0200 +@@ -21333,7 +21333,7 @@ + + if test -n "$found_file" ; then + ktoblzcheck_libraries="-L$d" +- ktoblzcheck_lib="-l`echo $found_file | sed 's/lib//;s/\.so*//;s/\.a//'`" ++ ktoblzcheck_lib="-l`echo $found_file | sed 's/lib//;s/\.so*//;s/\.a//;s/\\.la//'`" + break + fi + done diff -r 5ba5c2911c12 -r 0d4f475bfc81 aqmoney/aqmoney.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aqmoney/aqmoney.spec Wed Jan 07 14:58:25 2009 +0100 @@ -0,0 +1,158 @@ +## +## aqmoney.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## +## 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_aqmoney 1.9.5 +%define V_ktoblzcheck 1.19 + +# package information +Name: aqmoney +Summary: Homebanking Command Line Interface +URL: http://aqmoney.sourceforge.net/ +Vendor: Martin Preuß +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: EVAL +Group: Finance +License: GPL +Version: %{V_aqmoney} +Release: 20080813 + +# list of sources +Source0: http://switch.dl.sourceforge.net/aqmoney/aqmoney2-%{V_aqmoney}.tar.gz +Source1: http://switch.dl.sourceforge.net/ktoblzcheck/ktoblzcheck-%{V_ktoblzcheck}.tar.gz +Patch0: aqmoney.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130 +PreReq: OpenPKG, openpkg >= 20040130 +BuildPreReq: aqbanking +PreReq: aqbanking +AutoReq: no +AutoReqProv: no + +%description + AqMoney is a command line interface for the AqBanking/AqHBCI and + OpenHBCI libraries in order to perform financial transactions + through the German HomeBanking Computer Interface (HBCI). + +%track + prog aqmoney = { + version = %{V_aqmoney} + url = http://prdownloads.sourceforge.net/aqmoney/ + regex = aqmoney2-(__VER__)\.tar\.gz + } + prog aqmoney:ktoblzcheck = { + version = %{V_ktoblzcheck} + url = http://prdownloads.sourceforge.net/ktoblzcheck/ + regex = ktoblzcheck-(__VER__)\.tar\.gz + } + +%prep + %setup -q -c + %setup -q -D -T -a 1 + %patch -p0 -d aqmoney2-%{V_aqmoney} + +%build + # build KtoBlzCheck library + ( cd ktoblzcheck-%{V_ktoblzcheck} + CC="%{l_cc}" \ + CXX="%{l_cxx}" \ + CFLAGS="%{l_cflags -O}" \ + CXXFLAGS="%{l_cxxflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + ./configure \ + --prefix=%{l_prefix} \ + --disable-shared + %{l_make} %{l_mflags -O} + + # pre-install it and adjust for temporary usage by AqMoney build (below) + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + ) || exit $? + + # configure and build program + ( cd aqmoney2-%{version} + %{l_shtool} subst \ + -e 's;ktoblzcheck_datafile="";;' \ + configure + CC="%{l_cxx}" \ + CXX="%{l_cxx}" \ + CFLAGS="%{l_cflags -O}" \ + CXXFLAGS="%{l_cxxflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + ./configure \ + --prefix=%{l_prefix} \ + --with-openhbci-prefix=%{l_prefix} \ + --with-ktoblzcheck-includes=$RPM_BUILD_ROOT%{l_prefix}/include \ + --with-ktoblzcheck-libs=$RPM_BUILD_ROOT%{l_prefix}/lib \ + --with-ktoblzcheck-datafile=%{l_prefix}/share/ktoblzcheck/bankdata.txt \ + --disable-shared \ + --disable-nls + %{l_make} %{l_mflags -O} + ) || exit $? + +%install + rm -rf $RPM_BUILD_ROOT + + # install programs + ( cd ktoblzcheck-%{V_ktoblzcheck} + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + ) || exit $? + ( cd aqmoney2-%{version} + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + ) || exit $? + + # workaround problems with AqHBCI plugin run-time + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney + mv $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney2 \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney/aqmoney + ( echo "#!/bin/sh" + echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/openhbci2:/lib:/usr/lib\"" + echo "export LD_LIBRARY_PATH" + echo "exec %{l_prefix}/libexec/aqmoney/aqmoney \${1+\"\$@\"}" + ) >$RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney + chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney + + # post-adjust installation + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney2.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1 + mv $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney2 \ + $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney + %{l_shtool} subst \ + -e 's;aqmoney2;aqmoney;g' \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1 + + # determine installation files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + diff -r 5ba5c2911c12 -r 0d4f475bfc81 bison/bison.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bison/bison.patch Wed Jan 07 14:58:25 2009 +0100 @@ -0,0 +1,31 @@ +Index: lib/timevar.c +--- lib/timevar.c.orig 2008-07-14 10:56:12 +0200 ++++ lib/timevar.c 2008-11-03 19:16:04 +0100 +@@ -42,6 +42,7 @@ + # include + #endif + #ifdef HAVE_SYS_RESOURCE_H ++#include + #include + #endif + +---------------------------------------------------------------------------- + +Security Fix: +http://undeadly.org/cgi?action=article&sid=20080708155228&mode=flat&count=13 + +Index: data/yacc.c +--- data/yacc.c.orig 2008-11-02 19:09:10 +0100 ++++ data/yacc.c 2008-11-03 19:16:04 +0100 +@@ -1444,7 +1444,10 @@ + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ ++if (yylen) + yyval = yyvsp[1-yylen]; ++else ++ memset(&yyval, 0, sizeof(yyval)); + + ]b4_locations_if( + [[ /* Default location. */ + diff -r 5ba5c2911c12 -r 0d4f475bfc81 bison/bison.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bison/bison.spec Wed Jan 07 14:58:25 2009 +0100 @@ -0,0 +1,137 @@ +## +## bison.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## +## 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 versions +%define V_new 2.4.1 +%define V_old 1.35 + +# package information +Name: bison +Summary: Yacc-compatible LALR(1) Parser Generator +URL: http://www.gnu.org/software/bison/ +Vendor: Free Software Foundation +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: CORE +Group: CompilerCompiler +License: GPL +Version: %{V_new} +Release: 20081213 + +# package options +%option with_old no + +# list of sources +Source0: ftp://ftp.gnu.org/gnu/bison/bison-%{V_new}.tar.gz +Source1: ftp://ftp.gnu.org/gnu/bison/bison-%{V_old}.tar.gz +Patch0: bison.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040212, m4, make +PreReq: OpenPKG, openpkg >= 20040212, m4 +AutoReq: no +AutoReqProv: no +Conflicts: yacc + +%description + Bison is a general-purpose parser generator that converts a grammar + description for an LALR(1) context-free grammar into a C program + to parse that grammar. Once you are proficient with bison, you may + use it to develop a wide range of language parsers, from those used + in simple desk calculators to complex programming languages. Bison + is upward compatible with yacc: all properly-written yacc grammars + ought to work with bison with no change. Anyone familiar with yacc + should be able to use bison with little trouble. + +%track + prog bison:new = { + version = %{V_new} + url = ftp://ftp.gnu.org/gnu/bison/ + regex = bison-(2.\d+(.\d+)*[a-z]?)\.tar\.gz + } + prog bison:old = { + version = %{V_old} + url = ftp://ftp.gnu.org/gnu/bison/ + regex = bison-(1\.3\d+)\.tar\.gz + } + +%prep + %setup -q -c -n bison-%{V_new} + %patch -p0 -d bison-%{V_new} + %setup -q -T -D -a 1 + %{l_shtool} subst \ + -e 's;^\( *SUBDIRS = .*\) examples\(.*\)$;\1\2;' \ + bison-%{V_new}/Makefile.in + +%build + ( cd bison-%{V_new} + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" \ + CONFIG_SHELL=/bin/sh \ + ./configure \ + --prefix=%{l_prefix} \ + --mandir=%{l_prefix}/man \ + --infodir=%{l_prefix}/info \ + --disable-nls + %{l_make} -f Makefile %{l_mflags} + ) || exit $? +%if "%{with_old}" == "yes" + ( cd bison-%{V_old} + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" \ + ./configure \ + --prefix=%{l_prefix} \ + --mandir=%{l_prefix}/man \ + --infodir=%{l_prefix}/info \ + --disable-nls + %{l_make} -f Makefile %{l_mflags} + ) || exit $? +%endif + +%install + rm -rf $RPM_BUILD_ROOT +%if "%{with_old}" == "yes" + ( cd bison-%{V_old} + %{l_make} -f Makefile %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + mv $RPM_BUILD_ROOT%{l_prefix}/bin/bison \ + $RPM_BUILD_ROOT%{l_prefix}/bin/bison-old + mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/bison.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/bison-old.1 + ) || exit $? +%endif + ( cd bison-%{V_new} + %{l_make} -f Makefile %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + ) || exit $? + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale + rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + diff -r 5ba5c2911c12 -r 0d4f475bfc81 perl/perl.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/perl/perl.patch Wed Jan 07 14:58:25 2009 +0100 @@ -0,0 +1,309 @@ +By default, the "vendor" area is not used, so Perl's installation +procedure forgot to create its top-level paths, too. In OpenPKG we use +the "vendor" area, so make sure it is created the same way the "site" +area is. + +Index: installperl +--- installperl.orig 2007-12-18 11:47:07 +0100 ++++ installperl 2008-03-28 15:23:47 +0100 +@@ -211,6 +211,8 @@ + my $installarchlib = "$destdir$Config{installarchlib}"; + my $installsitelib = "$destdir$Config{installsitelib}"; + my $installsitearch = "$destdir$Config{installsitearch}"; ++my $installvendorlib = "$destdir$Config{installvendorlib}"; ++my $installvendorarch = "$destdir$Config{installvendorarch}"; + my $installman1dir = "$destdir$Config{installman1dir}"; + my $man1ext = $Config{man1ext}; + my $libperl = $Config{libperl}; +@@ -372,6 +374,8 @@ + mkpath($installarchlib, $verbose, 0777); + mkpath($installsitelib, $verbose, 0777) if ($installsitelib); + mkpath($installsitearch, $verbose, 0777) if ($installsitearch); ++mkpath($installvendorlib, $verbose, 0777) if ($installvendorlib); ++mkpath($installvendorarch, $verbose, 0777) if ($installvendorarch); + + if (chdir "lib") { + $do_installarchlib = ! samepath($installarchlib, '.'); + +----------------------------------------------------------------------------- + +By default, the Perl module search order is "use lib, -I, PERL[5]LIB, +perl, site, vendor, other". This means that in OpenPKG both the modules +installed via CPAN shell (in "site" area) and the "perl-xxx" packages +(in "vendor" area) cannot override the (sometimes obsoleted) module +versions distributed with Perl (in "perl" area). Hence, we change +the search order to a more reasonable one for OpenPKG: "use lib, -I, +PERL[5]LIB, site, vendor, perl, other". + +Index: perl.c +--- perl.c.orig 2007-12-18 11:47:08 +0100 ++++ perl.c 2008-03-28 15:23:47 +0100 +@@ -4753,39 +4753,6 @@ + incpush(APPLLIB_EXP, TRUE, TRUE, TRUE, TRUE); + #endif + +-#ifdef ARCHLIB_EXP +- incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); +-#endif +-#ifdef MACOS_TRADITIONAL +- { +- Stat_t tmpstatbuf; +- SV * privdir = newSV(0); +- char * macperl = PerlEnv_getenv("MACPERL"); +- +- if (!macperl) +- macperl = ""; +- +- Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); +- if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) +- incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); +- Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); +- if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) +- incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); +- +- SvREFCNT_dec(privdir); +- } +- if (!PL_tainting) +- incpush(":", FALSE, FALSE, TRUE, FALSE); +-#else +-#ifndef PRIVLIB_EXP +-# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" +-#endif +-#if defined(WIN32) +- incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); +-#else +- incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); +-#endif +- + #ifdef SITEARCH_EXP + /* sitearch is always relative to sitelib on Windows for + * DLL-based path intuition to work correctly */ +@@ -4828,6 +4795,39 @@ + incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE, TRUE); + #endif + ++#ifdef ARCHLIB_EXP ++ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); ++#endif ++#ifdef MACOS_TRADITIONAL ++ { ++ Stat_t tmpstatbuf; ++ SV * privdir = newSV(0); ++ char * macperl = PerlEnv_getenv("MACPERL"); ++ ++ if (!macperl) ++ macperl = ""; ++ ++ Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); ++ if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) ++ incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); ++ Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); ++ if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) ++ incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); ++ ++ SvREFCNT_dec(privdir); ++ } ++ if (!PL_tainting) ++ incpush(":", FALSE, FALSE, TRUE, FALSE); ++#else ++#ifndef PRIVLIB_EXP ++# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" ++#endif ++#if defined(WIN32) ++ incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); ++#else ++ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); ++#endif ++ + #ifdef PERL_OTHERLIBDIRS + incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE, TRUE); + #endif + +----------------------------------------------------------------------------- + +Port to [Open]Darwin 6.6.2: + +1. In OpenPKG, Perl does not use the vendor GCC and our GCC does not + understand "-no-cpp-precomp", so remove this build option. + +2. The indirectly includes system specific headers + which in turn have fields named "environ" while Perl uses + a define of "environ" internally. So wrap the inclusion. + +3. Darwin 6 no longer accepts the non-standard "#import" statements, + so replace with "#include" and circumvent some header problem + related to the non-standard "__private_extern__" attribute. + +Index: hints/darwin.sh +--- hints/darwin.sh.orig 2007-12-18 11:47:07 +0100 ++++ hints/darwin.sh 2008-03-28 15:23:47 +0100 +@@ -120,9 +120,6 @@ + *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;; + esac + +-# Avoid Apple's cpp precompiler, better for extensions +-cppflags="${cppflags} -no-cpp-precomp" +- + # This is necessary because perl's build system doesn't + # apply cppflags to cc compile lines as it should. + ccflags="${ccflags} ${cppflags}" +@@ -182,8 +179,7 @@ + esac + ldlibpthname='DYLD_LIBRARY_PATH'; + +-# useshrplib=true results in much slower startup times. +-# 'false' is the default value. Use Configure -Duseshrplib to override. ++useshrplib='true' + + cat > UU/archname.cbu <<'EOCBU' + # This script UU/archname.cbu will get 'called-back' by Configure +Index: perlio.c +--- perlio.c.orig 2007-12-18 11:47:08 +0100 ++++ perlio.c 2008-03-28 15:23:47 +0100 +@@ -472,7 +472,14 @@ + #include + #endif + #ifdef HAS_MMAP ++#ifdef PERL_DARWIN ++#define environ_safe environ ++#undef environ + #include ++#define environ environ_safe ++#else ++#include ++#endif + #endif + + void +Index: ext/DynaLoader/dl_dyld.xs +--- ext/DynaLoader/dl_dyld.xs.orig 2007-12-18 11:47:07 +0100 ++++ ext/DynaLoader/dl_dyld.xs 2008-03-28 15:23:47 +0100 +@@ -45,7 +45,13 @@ + + #undef environ + #undef bool ++#ifdef PERL_DARWIN ++#define __private_extern__ extern ++#include ++#undef __private_extern__ ++#else + #import ++#endif + + static char *dlerror() + { + +----------------------------------------------------------------------------- + +Port to Tru64 5.1: + +Under Tru64 our gcc has to be built without binutils and the system +ld(1) does not accept a "-O" option, so remove the whole passing of +optimization flags to ld(1). Under a brain-dead platform like Tru64 we +really don't need any more optimization because we are already happy if +it works at all. + +Index: hints/dec_osf.sh +--- hints/dec_osf.sh.orig 2007-12-18 11:47:07 +0100 ++++ hints/dec_osf.sh 2008-03-28 15:23:47 +0100 +@@ -73,15 +73,6 @@ + *) if $test "X$optimize" = "X$undef"; then + lddlflags="$lddlflags -msym" + else +- case "$myosvers" in +- *4.0D*) +- # QAR 56761: -O4 + .so may produce broken code, +- # fixed in 4.0E or better. +- ;; +- *) +- lddlflags="$lddlflags $optimize" +- ;; +- esac + # -msym: If using a sufficiently recent /sbin/loader, + # keep the module symbols with the modules. + lddlflags="$lddlflags -msym $_lddlflags_strict_ansi" + +----------------------------------------------------------------------------- + +http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0976 + Multiple scripts in the perl package in Trustix Secure Linux 1.5 + through 2.1, and possibly other operating systems, allows local + users to overwrite files via a symlink attack on temporary files. + +Index: lib/CGI/Cookie.pm +--- lib/CGI/Cookie.pm.orig 2007-12-18 11:47:07 +0100 ++++ lib/CGI/Cookie.pm 2008-03-28 15:23:47 +0100 +@@ -470,7 +470,7 @@ + You may also retrieve cookies that were stored in some external + form using the parse() class method: + +- $COOKIES = `cat /usr/tmp/Cookie_stash`; ++ $COOKIES = `cat /var/run/www/Cookie_stash`; + %cookies = parse CGI::Cookie($COOKIES); + + If you are in a mod_perl environment, you can save some overhead by +Index: lib/Shell.pm +--- lib/Shell.pm.orig 2007-12-18 11:47:07 +0100 ++++ lib/Shell.pm 2008-03-28 15:23:47 +0100 +@@ -151,7 +151,7 @@ + use Shell qw(cat ps cp); + $passwd = cat('new; + +----------------------------------------------------------------------------- + +Index: Configure +--- Configure.orig 2007-12-18 11:47:07 +0100 ++++ Configure 2008-03-28 15:23:47 +0100 +@@ -7871,7 +7871,7 @@ + ;; + linux|irix*|gnu*) dflt="-shared $optimize" ;; + next) dflt='none' ;; +- solaris) dflt='-G' ;; ++ solaris) dflt='-shared' ;; + sunos) dflt='-assert nodefinitions' ;; + svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; + *) dflt='none' ;; + +----------------------------------------------------------------------------- + +Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl) + +Index: sv.c +--- sv.c.orig 2007-12-18 11:47:08 +0100 ++++ sv.c 2008-03-28 15:23:47 +0100 +@@ -8667,7 +8667,10 @@ + if ( (width = expect_number(&q)) ) { + if (*q == '$') { + ++q; +- efix = width; ++ if (width > PERL_INT_MAX) ++ efix = PERL_INT_MAX; ++ else ++ efix = width; + } else { + goto gotwidth; + } + +----------------------------------------------------------------------------- + +Detect NetBSD 5.x as well + +Index: hints/netbsd.sh +--- hints/netbsd.sh.orig 2007-12-18 11:47:07.000000000 +0100 ++++ hints/netbsd.sh 2008-12-24 10:51:08.000000000 +0100 +@@ -79,7 +79,7 @@ + ;; + esac + case "$osvers" in +-0.9*|1.*|2.*|3.*|4.*) ++0.9*|1.*|2.*|3.*|4.*|5.*) + d_getprotoent_r="$undef" + d_getprotobyname_r="$undef" + d_getprotobynumber_r="$undef" + diff -r 5ba5c2911c12 -r 0d4f475bfc81 perl/perl.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/perl/perl.spec Wed Jan 07 14:58:25 2009 +0100 @@ -0,0 +1,212 @@ +## +## perl.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## +## 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 information +Name: perl +Summary: Practical Extraction and Reporting Language +URL: http://www.perl.com/ +Vendor: The Perl Project +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: CORE +Group: Perl +License: GPL/Artistic +Version: 5.10.0 +Release: 20081225 + +# list of sources +Source0: ftp://ftp.cpan.org/pub/CPAN/src/perl-%{version}.tar.gz +Patch0: perl.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130, gcc +PreReq: OpenPKG, openpkg >= 20040130 +AutoReq: no +AutoReqProv: no + +%description + Perl ("Practical Reporting and Extraction Language") is a very + sophisticated and flexible (but this way also complex) programming + language. This is the original implementation of the Perl 5 + interpreter from Larry Wall and his community. + +%track + prog perl = { + version = %{version} + url = ftp://ftp.cpan.org/pub/CPAN/src/ + regex = perl-(5\.10\.\d+)\.tar\.gz + } + +%prep + %setup -q + %patch -p0 + chmod -R u+w . + +%build + # configure the Perl package + %{l_shtool} subst \ + -e 's;\(.*for thislib in $libswanted.*\);libswanted=`echo " $libswanted " | sed -e "s/ bind / /g" -e "s/ db / /g" -e "s/ gdbm / /g" -e "s/ iconv / /g"`\; \1;' \ + -e 's;package=perl5;package=perl;' \ + Configure + %{l_shtool} subst \ + -e 's; */usr/local/lib;;' \ + hints/freebsd.sh hints/netbsd.sh + optimize="" + case "%{l_platform -t}" in + amd64-* ) optimize="%{l_cflags}" ;; + *-aix* ) optimize="%{l_cflags}" ;; + *-* ) optimize="%{l_cflags -O}" ;; + esac + if [ ".$optimize" = . ]; then + optimize="-Uoptimize" + else + optimize="-Doptimize=$optimize" + fi + libdirs="" + for dir in %{l_prefix}/lib /lib64 /usr/lib64 /lib /usr/lib /usr/ccs/lib; do + if [ -d $dir ]; then + if [ ".$libdirs" = . ]; then + libdirs="$dir" + else + libdirs="$libdirs $dir" + fi + fi + done + ./Configure \ + -d -e -s \ + -Dcf_by="%{l_openpkg_release}" \ + -Dcf_email="http://www.openpkg.org/" \ + -Dprefix=%{l_prefix} \ + -Dvendorprefix=%{l_prefix} \ + -Dinstallprefix=%{l_prefix} \ + -Dinstallstyle="lib/perl5" \ + -Dman1dir=%{l_prefix}/man/man1 \ + -Dman3dir=%{l_prefix}/man/man3 \ + -Dcc="%{l_prefix}/bin/gcc" "$optimize" \ + -Dlocincpth="%{l_prefix}/include" \ + -Dloclibpth="%{l_prefix}/lib" \ + -Dldflags="%{l_ldflags}" \ + -Dlibpth="$libdirs" \ + -Dglibpth="$libdirs" \ + -Dscriptdir="%{l_prefix}/bin" \ + -Uinstallusrbinperl \ + -Ui_malloc -Ui_iconv -Ui_db \ + -Uusedevel + + # build the Perl package + %{l_make} %{l_mflags} -f Makefile + +%install + rm -rf $RPM_BUILD_ROOT + + # install the Perl package via standard procedure + %{l_make} %{l_mflags} -f Makefile install DESTDIR=$RPM_BUILD_ROOT + + # allow us to already use the temporary install perl(1) + PERL5LIB=$RPM_BUILD_ROOT%{l_prefix}/lib/perl + export PERL5LIB + + # install Perl versions of system header files + ( case "%{l_platform -t}" in + *-darwin* ) export DYLD_LIBRARY_PATH="`pwd`" ;; + esac + cd /usr/include + eval `$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installarchlib` + echo *.h sys/*.h |\ + xargs $RPM_BUILD_ROOT%{l_prefix}/bin/perl \ + $RPM_BUILD_ROOT%{l_prefix}/bin/h2ph -h -d $RPM_BUILD_ROOT$installarchlib + ) || exit $? + + # post-adjustments to installation tree + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version} + rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3 + for name in \ + libnetcfg perlaix perlamiga perlapollo \ + perlbeos perlbs2000 perlcygwin perldgux perlepoc perlfreebsd perlhpux \ + perlhurd perlirix perlmachten perlmacos perlmacosx perlmint perlmpeix \ + perlnetware perlos2 perlos390 perlos400 perlplan9 perlqnx perlsolaris \ + perlvmesa perlvms perlvos perlwin32; do + rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$name.1 + done + + # re-adjust configuration as mentioned in Perl's INSTALL document + ( case "%{l_platform -t}" in + *-darwin* ) export DYLD_LIBRARY_PATH="`pwd`" ;; + esac + $RPM_BUILD_ROOT%{l_prefix}/bin/perl -pi.orig \ + -e "s:$RPM_BUILD_ROOT%{l_prefix}:%{l_prefix}:g" \ + $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/*/Config.pm \ + `find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/ \ + -type f -name ".packlist" -print` + find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/ \ + -name "*.orig" -print | xargs rm -f + ) || exit $? + + # assume ownership for various arch/site/vendor install dirs + ( eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installarchlib`" + eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installprivlib`" + eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installsitearch`" + eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installsitelib`" + eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installvendorarch`" + eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installvendorlib`" + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT$installarchlib/auto \ + $RPM_BUILD_ROOT$installprivlib/auto \ + $RPM_BUILD_ROOT$installsitearch/auto \ + $RPM_BUILD_ROOT$installsitelib/auto \ + $RPM_BUILD_ROOT$installvendorarch/auto \ + $RPM_BUILD_ROOT$installvendorlib/auto + ) || exit $? + + # strip binary files + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true + + # resolve file conflicts (with perl-locale) + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/enc2xs \ + $RPM_BUILD_ROOT%{l_prefix}/bin/piconv + + # resolve file conflicts (with perl-module) + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/corelist \ + $RPM_BUILD_ROOT%{l_prefix}/bin/config_data \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/config_data.1 + + # resolve file conflicts (with perl-sys) + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/ptar \ + $RPM_BUILD_ROOT%{l_prefix}/bin/ptardiff \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/ptar.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/ptardiff.1 + + # resolve file conflicts (with perl-crypto) + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/shasum \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/shasum.1 + + # determine installed files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT +