botan.spec 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ##
  2. ## botan.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2011 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. ##
  23. # package version
  24. %define V_major 1.9
  25. %define V_minor 18
  26. # package information
  27. Name: botan
  28. Summary: C++ Cryptography Library
  29. URL: http://botan.randombit.net/
  30. Vendor: The Botan Project
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Cryptography
  35. License: BSD
  36. Version: %{V_major}.%{V_minor}
  37. Release: 20110604
  38. # list of sources
  39. Source0: http://files.randombit.net/botan/v%{V_major}/Botan-%{version}.tgz
  40. Patch0: botan.patch
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, gcc::with_cxx = yes, python, perl
  43. PreReq: OpenPKG, openpkg >= 20060823
  44. %description
  45. Botan is a C++ cryptography library, providing a wide variety of
  46. cryptographic algorithms, formats, and protocols.
  47. %track
  48. prog botan = {
  49. version = %{version}
  50. url = http://botan.randombit.net/download.php
  51. regex = Botan-(__VER__)\.tgz
  52. }
  53. %prep
  54. %setup -q -n Botan-%{version}
  55. %patch -p0
  56. %build
  57. perl -p -i.bak -e \
  58. 's;(0x[\da-fA-F]{16});\1ULL;g' \
  59. src/*/*.cpp
  60. rm -f src/*.bak
  61. %{l_shtool} subst \
  62. -e 's;-mcpu=;-mtune=;g' \
  63. src/build-data/cc/gcc.txt
  64. CC="gcc" \
  65. python ./configure.py \
  66. --prefix=%{l_prefix} \
  67. --docdir=share/botan \
  68. --disable-shared
  69. %{l_make} %{l_mflags}
  70. %install
  71. %{l_make} %{l_mflags} install \
  72. DESTDIR=$RPM_BUILD_ROOT%{l_prefix} \
  73. OWNER=`%{l_shtool} echo -e '%u'` \
  74. GROUP=`%{l_shtool} echo -e '%g'`
  75. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/botan/*.txt
  76. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/botan/*.tex
  77. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/botan/*.asc
  78. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  79. %{l_files_std} \
  80. '%doc %{l_prefix}/share/botan/*.pdf'
  81. %files -f files
  82. %clean