aqmoney.spec 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. ##
  2. ## aqmoney.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package version
  25. %define V_aqmoney 1.9.4
  26. %define V_ktoblzcheck 1.9
  27. # package information
  28. Name: aqmoney
  29. Summary: Homebanking Command Line Interface
  30. URL: http://aqmoney.sourceforge.net/
  31. Vendor: Martin Preuß
  32. Packager: OpenPKG
  33. Distribution: OpenPKG
  34. Class: EVAL
  35. Group: Finance
  36. License: GPL
  37. Version: %{V_aqmoney}
  38. Release: 20060127
  39. # list of sources
  40. Source0: http://osdn.dl.sourceforge.net/aqmoney/aqmoney2-%{V_aqmoney}.tar.gz
  41. Source1: http://osdn.dl.sourceforge.net/ktoblzcheck/ktoblzcheck-%{V_ktoblzcheck}.tar.gz
  42. Patch0: aqmoney.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. BuildPreReq: aqbanking
  49. PreReq: aqbanking
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. AqMoney is a command line interface for the AqBanking/AqHBCI and
  54. OpenHBCI libraries in order to perform financial transactions
  55. through the German HomeBanking Computer Interface (HBCI).
  56. %track
  57. prog aqmoney = {
  58. version = %{V_aqmoney}
  59. url = http://prdownloads.sourceforge.net/aqmoney/
  60. regex = aqmoney2-(__VER__)\.tar\.gz
  61. }
  62. prog aqmoney:ktoblzcheck = {
  63. version = %{V_ktoblzcheck}
  64. url = http://prdownloads.sourceforge.net/ktoblzcheck/
  65. regex = ktoblzcheck-(__VER__)\.tar\.gz
  66. }
  67. %prep
  68. %setup -q -c
  69. %setup -q -D -T -a 1
  70. %patch -p0 -d aqmoney2-%{V_aqmoney}
  71. %build
  72. # build KtoBlzCheck library
  73. ( cd ktoblzcheck-%{V_ktoblzcheck}
  74. CC="%{l_cc}" \
  75. CXX="%{l_cxx}" \
  76. CFLAGS="%{l_cflags -O}" \
  77. CXXFLAGS="%{l_cxxflags -O}" \
  78. CPPFLAGS="%{l_cppflags}" \
  79. LDFLAGS="%{l_ldflags}" \
  80. ./configure \
  81. --prefix=%{l_prefix} \
  82. --disable-shared
  83. %{l_make} %{l_mflags -O}
  84. # pre-install it and adjust for temporary usage by AqMoney build (below)
  85. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  86. ) || exit $?
  87. # configure and build program
  88. ( cd aqmoney2-%{version}
  89. %{l_shtool} subst \
  90. -e 's;ktoblzcheck_datafile="";;' \
  91. configure
  92. CC="%{l_cxx}" \
  93. CXX="%{l_cxx}" \
  94. CFLAGS="%{l_cflags -O}" \
  95. CXXFLAGS="%{l_cxxflags -O}" \
  96. CPPFLAGS="%{l_cppflags}" \
  97. LDFLAGS="%{l_ldflags}" \
  98. ./configure \
  99. --prefix=%{l_prefix} \
  100. --with-openhbci-prefix=%{l_prefix} \
  101. --with-ktoblzcheck-includes=$RPM_BUILD_ROOT%{l_prefix}/include \
  102. --with-ktoblzcheck-libs=$RPM_BUILD_ROOT%{l_prefix}/lib \
  103. --with-ktoblzcheck-datafile=%{l_prefix}/share/ktoblzcheck/bankdata.txt \
  104. --disable-shared \
  105. --disable-nls
  106. %{l_make} %{l_mflags -O}
  107. ) || exit $?
  108. %install
  109. rm -rf $RPM_BUILD_ROOT
  110. # install programs
  111. ( cd ktoblzcheck-%{V_ktoblzcheck}
  112. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  113. ) || exit $?
  114. ( cd aqmoney2-%{version}
  115. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  116. ) || exit $?
  117. # workaround problems with AqHBCI plugin run-time
  118. %{l_shtool} mkdir -f -p -m 755 \
  119. $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney
  120. mv $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney2 \
  121. $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney/aqmoney
  122. ( echo "#!/bin/sh"
  123. echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/openhbci2:/lib:/usr/lib\""
  124. echo "export LD_LIBRARY_PATH"
  125. echo "exec %{l_prefix}/libexec/aqmoney/aqmoney \${1+\"\$@\"}"
  126. ) >$RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney
  127. chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney
  128. # post-adjust installation
  129. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  130. mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney2.1 \
  131. $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1
  132. mv $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney2 \
  133. $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney
  134. %{l_shtool} subst \
  135. -e 's;aqmoney2;aqmoney;g' \
  136. $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1
  137. # determine installation files
  138. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  139. %files -f files
  140. %clean
  141. rm -rf $RPM_BUILD_ROOT