nspr.spec 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ##
  2. ## nspr.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 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: nspr
  26. Summary: Netscape Portable Runtime
  27. URL: http://www.mozilla.org/projects/nspr/
  28. Vendor: Mozilla
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: PLUS
  32. Group: System
  33. License: MPL
  34. Version: 4.6
  35. Release: 20050713
  36. # list of sources
  37. Source0: ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v%{version}/src/nspr-%{version}.tar.gz
  38. Patch0: nspr.patch
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
  43. PreReq: OpenPKG, openpkg >= 20040130
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. NSPR provides platform independence for non-GUI operating
  48. system facilities. These facilities include threads, thread
  49. synchronization, normal file and network I/O, interval timing and
  50. calendar time, basic memory management (malloc and free) and shared
  51. library linking.
  52. %track
  53. prog nspr = {
  54. version = %{version}
  55. url = ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/
  56. regex = v(__VER__)
  57. url = ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v__NEWVER__/src/
  58. regex = nspr-(__VER__)\.tar\.gz
  59. }
  60. %prep
  61. %setup -q
  62. %patch -p0
  63. %build
  64. cd mozilla/nsprpub
  65. CC="%{l_cc}" \
  66. CXX="%{l_cxx}" \
  67. CFLAGS="%{l_cflags -O}" \
  68. CXXFLAGS="%{l_cxxflags -O}" \
  69. ./configure \
  70. --prefix=%{l_prefix} \
  71. --disable-debug
  72. %{l_make} %{l_mflags -O}
  73. %install
  74. rm -rf $RPM_BUILD_ROOT
  75. %{l_shtool} mkdir -f -p -m 755 \
  76. $RPM_BUILD_ROOT%{l_prefix}/include/nspr \
  77. $RPM_BUILD_ROOT%{l_prefix}/lib
  78. %{l_shtool} install -c -m 644 \
  79. mozilla/nsprpub/dist/include/nspr/* \
  80. $RPM_BUILD_ROOT%{l_prefix}/include/nspr/
  81. %{l_shtool} install -c -m 644 \
  82. mozilla/nsprpub/dist/lib/*.a \
  83. $RPM_BUILD_ROOT%{l_prefix}/lib/
  84. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  85. %files -f files
  86. %clean
  87. rm -rf $RPM_BUILD_ROOT