nspr.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ##
  2. ## nspr.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 information
  24. Name: nspr
  25. Summary: Netscape Portable Runtime
  26. URL: http://www.mozilla.org/projects/nspr/
  27. Vendor: Mozilla
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: Libraries
  32. License: MPL
  33. Version: 4.8
  34. Release: 20090529
  35. # list of sources
  36. Source0: ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v%{version}/src/nspr-%{version}.tar.gz
  37. Source1: nspr.pc
  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. CFLAGS="%{l_cflags -O}" \
  67. ./configure \
  68. --prefix=%{l_prefix} \
  69. --with-pthreads \
  70. --disable-debug
  71. %{l_make} %{l_mflags -O}
  72. %install
  73. rm -rf $RPM_BUILD_ROOT
  74. %{l_shtool} mkdir -f -p -m 755 \
  75. $RPM_BUILD_ROOT%{l_prefix}/include/nspr/obsolete \
  76. $RPM_BUILD_ROOT%{l_prefix}/include/nspr/private \
  77. $RPM_BUILD_ROOT%{l_prefix}/lib/nspr \
  78. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
  79. %{l_shtool} install -c -m 644 \
  80. mozilla/nsprpub/dist/include/nspr/*.h \
  81. $RPM_BUILD_ROOT%{l_prefix}/include/nspr/
  82. %{l_shtool} install -c -m 644 \
  83. mozilla/nsprpub/dist/include/nspr/obsolete/*.h \
  84. $RPM_BUILD_ROOT%{l_prefix}/include/nspr/obsolete/
  85. %{l_shtool} install -c -m 644 \
  86. mozilla/nsprpub/dist/include/nspr/private/*.h \
  87. $RPM_BUILD_ROOT%{l_prefix}/include/nspr/private/
  88. %{l_shtool} install -c -m 644 \
  89. mozilla/nsprpub/dist/lib/*.a \
  90. $RPM_BUILD_ROOT%{l_prefix}/lib/nspr/
  91. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  92. -e 's;@version@;%{version};g' \
  93. %{SOURCE nspr.pc} \
  94. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
  95. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  96. %files -f files
  97. %clean
  98. rm -rf $RPM_BUILD_ROOT