pcre.spec 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ##
  2. ## pcre.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 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 information
  25. Name: pcre
  26. Summary: Perl Compatible Regular Expressions
  27. URL: http://www.pcre.org/
  28. Vendor: Philip Hazel
  29. Packager: OpenPKG Foundation e.V.
  30. Distribution: OpenPKG Community
  31. Class: BASE
  32. Group: Libraries
  33. License: LGPL
  34. Version: 7.4
  35. Release: 20071219
  36. # package options
  37. %option with_utf8 yes
  38. # list of sources
  39. Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-%{version}.tar.gz
  40. Patch0: pcre.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20040130, make
  45. PreReq: OpenPKG, openpkg >= 20040130
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. PCRE is a library implementing Perl Compatible Regular Expressions.
  50. %track
  51. prog pcre = {
  52. version = %{version}
  53. url = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
  54. regex = pcre-(__VER__)\.tar\.gz
  55. }
  56. %prep
  57. %setup -q
  58. %patch -p0
  59. %{l_shtool} subst \
  60. -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
  61. configure
  62. %build
  63. CC="%{l_cc}" \
  64. CFLAGS="%{l_cflags -O}" \
  65. GREP="grep" \
  66. ./configure \
  67. --prefix=%{l_prefix} \
  68. --mandir=%{l_prefix}/man \
  69. %if "%{with_utf8}" == "yes"
  70. --enable-utf8 \
  71. --enable-unicode-properties \
  72. %endif
  73. --disable-cpp \
  74. --disable-shared
  75. %{l_make} %{l_mflags}
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  79. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share
  80. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  81. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  82. %files -f files
  83. %clean
  84. rm -rf $RPM_BUILD_ROOT