regexp9.spec 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ##
  2. ## regexp9.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 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 information
  24. Name: regexp9
  25. Summary: Plan9 Regular Expression Library
  26. URL: http://swtch.com/plan9port/unix/
  27. Vendor: Rob Pike et al.
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: RegExp
  32. License: MIT-style
  33. Version: 20080906
  34. Release: 20080906
  35. # list of sources
  36. Source0: http://swtch.com/plan9port/unix/libregexp9.tgz
  37. Source1: http://swtch.com/plan9port/unix/libfmt.tgz
  38. Source2: http://swtch.com/plan9port/unix/libutf.tgz
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20060823
  43. PreReq: OpenPKG, openpkg >= 20060823
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. Libregexp9 is a port of Plan 9's Unicode-capable regular expression
  48. library. It is small and simple and provides the traditional
  49. extended regular expressions (without modern complications like {}
  50. and various \x character classes). It supports Unicode via wide
  51. character or UTF-8 encoding.
  52. %track
  53. prog regexp9 = {
  54. disabled
  55. version = %{version}
  56. url = http://swtch.com/plan9port/unix/
  57. regex = libregexp9-(__VER__)\.tar\.gz
  58. }
  59. %prep
  60. %setup -q -c
  61. %setup -q -T -D -a 1
  62. %setup -q -T -D -a 2
  63. %build
  64. ( cd libutf
  65. %{l_make} %{l_mflags} CC="%{l_cc}"
  66. ) || exit $?
  67. ( cd libfmt
  68. %{l_make} %{l_mflags} CC="%{l_cc}"
  69. ) || exit $?
  70. ( cd libregexp
  71. %{l_make} %{l_mflags} CC="%{l_cc}"
  72. ) || exit $?
  73. ar cr libregexp9.a libutf/*.o libfmt/*.o libregexp/*.o
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. %{l_shtool} mkdir -f -p -m 755 \
  77. $RPM_BUILD_ROOT%{l_prefix}/include/regexp9 \
  78. $RPM_BUILD_ROOT%{l_prefix}/lib
  79. %{l_shtool} install -c -m 644 \
  80. libregexp/*.h $RPM_BUILD_ROOT%{l_prefix}/include/regexp9/
  81. %{l_shtool} install -c -m 644 \
  82. libregexp9.a $RPM_BUILD_ROOT%{l_prefix}/lib/
  83. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  84. %files -f files
  85. %clean
  86. rm -rf $RPM_BUILD_ROOT