botan.spec 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. ##
  2. ## botan.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 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.8
  25. %define V_minor 4
  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: 20090713
  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. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, gcc::with_cxx = yes
  45. PreReq: OpenPKG, openpkg >= 20060823
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. Botan is a C++ cryptography library, providing a wide variety of
  50. cryptographic algorithms, formats, and protocols.
  51. %track
  52. prog botan = {
  53. version = %{version}
  54. url = http://botan.randombit.net/download.php
  55. regex = Botan-(__VER__)\.tgz
  56. }
  57. %prep
  58. %setup -q -n Botan-%{version}
  59. %patch -p0
  60. %build
  61. perl -p -i.bak -e \
  62. 's;(0x[\da-fA-F]{16});\1ULL;g' \
  63. src/*.cpp
  64. rm -f src/*.bak
  65. %{l_shtool} subst \
  66. -e 's;-mcpu=;-mtune=;g' \
  67. src/build-data/cc/gcc
  68. CC="gcc" \
  69. perl ./configure.pl \
  70. --prefix=%{l_prefix} \
  71. --docdir=share/botan \
  72. --disable-shared
  73. %{l_make} %{l_mflags -O}
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. %{l_make} %{l_mflags} install \
  77. DESTDIR=$RPM_BUILD_ROOT%{l_prefix} \
  78. OWNER=`%{l_shtool} echo -e '%u'` \
  79. GROUP=`%{l_shtool} echo -e '%g'`
  80. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/botan/*.txt
  81. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/botan/*.tex
  82. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/botan/*.asc
  83. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  84. %{l_files_std} \
  85. '%doc %{l_prefix}/share/botan/*.pdf'
  86. %files -f files
  87. %clean
  88. rm -rf $RPM_BUILD_ROOT