Fri, 03 Aug 2012 20:11:53 +0200
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 | ## aqmoney.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_aqmoney 1.9.5 |
michael@22 | 26 | %define V_ktoblzcheck 1.19 |
michael@22 | 27 | |
michael@22 | 28 | # package information |
michael@22 | 29 | Name: aqmoney |
michael@22 | 30 | Summary: Homebanking Command Line Interface |
michael@22 | 31 | URL: http://aqmoney.sourceforge.net/ |
michael@22 | 32 | Vendor: Martin Preuß |
michael@22 | 33 | Packager: OpenPKG Foundation e.V. |
michael@22 | 34 | Distribution: OpenPKG Community |
michael@22 | 35 | Class: EVAL |
michael@22 | 36 | Group: Finance |
michael@22 | 37 | License: GPL |
michael@22 | 38 | Version: %{V_aqmoney} |
michael@26 | 39 | Release: 20090106 |
michael@22 | 40 | |
michael@22 | 41 | # list of sources |
michael@22 | 42 | Source0: http://switch.dl.sourceforge.net/aqmoney/aqmoney2-%{V_aqmoney}.tar.gz |
michael@22 | 43 | Source1: http://switch.dl.sourceforge.net/ktoblzcheck/ktoblzcheck-%{V_ktoblzcheck}.tar.gz |
michael@22 | 44 | Patch0: aqmoney.patch |
michael@22 | 45 | |
michael@22 | 46 | # build information |
michael@22 | 47 | Prefix: %{l_prefix} |
michael@22 | 48 | BuildRoot: %{l_buildroot} |
michael@85 | 49 | BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, gcc::with_cxx = yes |
michael@22 | 50 | PreReq: OpenPKG, openpkg >= 20040130 |
michael@22 | 51 | BuildPreReq: aqbanking |
michael@22 | 52 | PreReq: aqbanking |
michael@22 | 53 | AutoReq: no |
michael@22 | 54 | AutoReqProv: no |
michael@22 | 55 | |
michael@22 | 56 | %description |
michael@22 | 57 | AqMoney is a command line interface for the AqBanking/AqHBCI and |
michael@22 | 58 | OpenHBCI libraries in order to perform financial transactions |
michael@22 | 59 | through the German HomeBanking Computer Interface (HBCI). |
michael@22 | 60 | |
michael@22 | 61 | %track |
michael@22 | 62 | prog aqmoney = { |
michael@22 | 63 | version = %{V_aqmoney} |
michael@22 | 64 | url = http://prdownloads.sourceforge.net/aqmoney/ |
michael@22 | 65 | regex = aqmoney2-(__VER__)\.tar\.gz |
michael@22 | 66 | } |
michael@22 | 67 | prog aqmoney:ktoblzcheck = { |
michael@22 | 68 | version = %{V_ktoblzcheck} |
michael@22 | 69 | url = http://prdownloads.sourceforge.net/ktoblzcheck/ |
michael@22 | 70 | regex = ktoblzcheck-(__VER__)\.tar\.gz |
michael@22 | 71 | } |
michael@22 | 72 | |
michael@22 | 73 | %prep |
michael@22 | 74 | %setup -q -c |
michael@22 | 75 | %setup -q -D -T -a 1 |
michael@22 | 76 | %patch -p0 -d aqmoney2-%{V_aqmoney} |
michael@22 | 77 | |
michael@22 | 78 | %build |
michael@22 | 79 | # build KtoBlzCheck library |
michael@22 | 80 | ( cd ktoblzcheck-%{V_ktoblzcheck} |
michael@22 | 81 | CC="%{l_cc}" \ |
michael@22 | 82 | CXX="%{l_cxx}" \ |
michael@22 | 83 | CFLAGS="%{l_cflags -O}" \ |
michael@22 | 84 | CXXFLAGS="%{l_cxxflags -O}" \ |
michael@22 | 85 | CPPFLAGS="%{l_cppflags}" \ |
michael@22 | 86 | LDFLAGS="%{l_ldflags}" \ |
michael@22 | 87 | ./configure \ |
michael@22 | 88 | --prefix=%{l_prefix} \ |
michael@22 | 89 | --disable-shared |
michael@22 | 90 | %{l_make} %{l_mflags -O} |
michael@22 | 91 | |
michael@22 | 92 | # pre-install it and adjust for temporary usage by AqMoney build (below) |
michael@26 | 93 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@22 | 94 | ) || exit $? |
michael@22 | 95 | |
michael@22 | 96 | # configure and build program |
michael@22 | 97 | ( cd aqmoney2-%{version} |
michael@26 | 98 | loclibs='' |
michael@26 | 99 | case "%{l_platform -t}" in |
michael@26 | 100 | *-linux* ) |
michael@26 | 101 | loclibs='-ldl' |
michael@26 | 102 | ;; |
michael@26 | 103 | esac |
michael@22 | 104 | %{l_shtool} subst \ |
michael@22 | 105 | -e 's;ktoblzcheck_datafile="";;' \ |
michael@22 | 106 | configure |
michael@22 | 107 | CC="%{l_cxx}" \ |
michael@22 | 108 | CXX="%{l_cxx}" \ |
michael@22 | 109 | CFLAGS="%{l_cflags -O}" \ |
michael@22 | 110 | CXXFLAGS="%{l_cxxflags -O}" \ |
michael@22 | 111 | CPPFLAGS="%{l_cppflags}" \ |
michael@22 | 112 | LDFLAGS="%{l_ldflags}" \ |
michael@26 | 113 | LIBS="-lintl -liconv $loclibs" \ |
michael@22 | 114 | ./configure \ |
michael@22 | 115 | --prefix=%{l_prefix} \ |
michael@22 | 116 | --with-openhbci-prefix=%{l_prefix} \ |
michael@22 | 117 | --with-ktoblzcheck-includes=$RPM_BUILD_ROOT%{l_prefix}/include \ |
michael@22 | 118 | --with-ktoblzcheck-libs=$RPM_BUILD_ROOT%{l_prefix}/lib \ |
michael@22 | 119 | --with-ktoblzcheck-datafile=%{l_prefix}/share/ktoblzcheck/bankdata.txt \ |
michael@22 | 120 | --disable-shared \ |
michael@22 | 121 | --disable-nls |
michael@22 | 122 | %{l_make} %{l_mflags -O} |
michael@22 | 123 | ) || exit $? |
michael@22 | 124 | |
michael@22 | 125 | %install |
michael@22 | 126 | rm -rf $RPM_BUILD_ROOT |
michael@22 | 127 | |
michael@22 | 128 | # install programs |
michael@22 | 129 | ( cd ktoblzcheck-%{V_ktoblzcheck} |
michael@26 | 130 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@22 | 131 | ) || exit $? |
michael@22 | 132 | ( cd aqmoney2-%{version} |
michael@26 | 133 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@22 | 134 | ) || exit $? |
michael@22 | 135 | |
michael@22 | 136 | # workaround problems with AqHBCI plugin run-time |
michael@22 | 137 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@22 | 138 | $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney |
michael@22 | 139 | mv $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney2 \ |
michael@22 | 140 | $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney/aqmoney |
michael@22 | 141 | ( echo "#!/bin/sh" |
michael@22 | 142 | echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/openhbci2:/lib:/usr/lib\"" |
michael@22 | 143 | echo "export LD_LIBRARY_PATH" |
michael@22 | 144 | echo "exec %{l_prefix}/libexec/aqmoney/aqmoney \${1+\"\$@\"}" |
michael@22 | 145 | ) >$RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney |
michael@22 | 146 | chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney |
michael@22 | 147 | |
michael@22 | 148 | # post-adjust installation |
michael@22 | 149 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@22 | 150 | mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney2.1 \ |
michael@22 | 151 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1 |
michael@22 | 152 | mv $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney2 \ |
michael@22 | 153 | $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney |
michael@22 | 154 | %{l_shtool} subst \ |
michael@22 | 155 | -e 's;aqmoney2;aqmoney;g' \ |
michael@22 | 156 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1 |
michael@22 | 157 | |
michael@22 | 158 | # determine installation files |
michael@22 | 159 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@22 | 160 | |
michael@22 | 161 | %files -f files |
michael@22 | 162 | |
michael@22 | 163 | %clean |
michael@22 | 164 | rm -rf $RPM_BUILD_ROOT |
michael@22 | 165 |