nspr.spec 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. ##
  2. ## nspr.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: nspr
  27. Summary: Netscape Portable Runtime
  28. URL: http://www.mozilla.org/projects/nspr/
  29. Vendor: Mozilla
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: PLUS
  33. Group: System
  34. License: MPL
  35. Version: 4.4.1
  36. Release: 20040204
  37. # list of sources
  38. Source0: ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/nspr/releases/v%{version}/src/nspr-%{version}.tar.gz
  39. Patch0: nspr.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. NSPR provides platform independence for non-GUI operating
  49. system facilities. These facilities include threads, thread
  50. synchronization, normal file and network I/O, interval timing and
  51. calendar time, basic memory management (malloc and free) and shared
  52. library linking.
  53. %track
  54. prog nspr = {
  55. version = %{version}
  56. url = ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/nspr/releases/
  57. regex = v(__VER__)
  58. url = ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/nspr/releases/v__NEWVER__/src/
  59. regex = nspr-(__VER__)\.tar\.gz
  60. }
  61. %prep
  62. %setup -q
  63. %patch -p0
  64. %build
  65. cd mozilla/nsprpub
  66. CC="%{l_cc}" \
  67. CXX="%{l_cxx}" \
  68. CFLAGS="%{l_cflags -O}" \
  69. CXXFLAGS="%{l_cxxflags -O}" \
  70. ./configure \
  71. --prefix=%{l_prefix} \
  72. --disable-debug
  73. %{l_make} %{l_mflags -O}
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. %{l_shtool} mkdir -f -p -m 755 \
  77. $RPM_BUILD_ROOT%{l_prefix}/include/nspr \
  78. $RPM_BUILD_ROOT%{l_prefix}/lib
  79. %{l_shtool} install -c -m 644 \
  80. mozilla/nsprpub/dist/include/nspr/* \
  81. $RPM_BUILD_ROOT%{l_prefix}/include/nspr/
  82. %{l_shtool} install -c -m 644 \
  83. mozilla/nsprpub/dist/lib/*.a \
  84. $RPM_BUILD_ROOT%{l_prefix}/lib/
  85. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  86. %files -f files
  87. %clean
  88. rm -rf $RPM_BUILD_ROOT