js-vl.spec 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. %define real_version 1.7.0
  2. Summary: JavaScript interpreter and libraries
  3. Name: js
  4. Version: 1.70
  5. Release: 1%{?_dist_release}
  6. # The sources are triple licensed, but when we link against readline which is
  7. # GPL, the result can only be GPL.
  8. %if 0%{?_without_readline:1}
  9. License: GPLv2+ or LGPLv2+ or MPLv1.1
  10. %else
  11. License: GPLv2+
  12. %endif
  13. Group: Development/Languages
  14. URL: http://www.mozilla.org/js/
  15. Source: http://ftp.mozilla.org/pub/mozilla.org/js/js-%{real_version}.tar.gz
  16. Patch0: js-1.7.0-make.patch
  17. Patch1: js-shlib.patch
  18. Patch2: js-1.5-va_copy.patch
  19. Patch3: js-ldflags.patch
  20. Patch4: js-1.7.0-threadsafe.patch
  21. Patch5: js-1.60-ncurses.patch
  22. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  23. BuildRequires: nspr-devel
  24. BuildRequires: readline-devel, ncurses-devel
  25. Buildrequires: pkgconfig perl
  26. Provides: libjs = %{version}-%{release}
  27. %description
  28. JavaScript is the Netscape-developed object scripting languages.
  29. This package has been created for purposes of Sablotron and is suitable
  30. for embedding in applications.
  31. %package devel
  32. Summary: Header files, libraries and development documentation for %{name}
  33. Group: Development/Libraries
  34. Requires: %{name} = %{version}-%{release}
  35. Requires: pkgconfig
  36. Provides: libjs-devel = %{version}-%{release}
  37. %description devel
  38. This package contains the header files, static libraries and development
  39. documentation for %{name}. If you like to develop programs using %{name},
  40. you will need to install %{name}-devel.
  41. %prep
  42. %setup -q -n %{name}
  43. %patch0 -p1 -b .make
  44. %patch1 -p0 -b .shlib
  45. %patch2 -p1 -b .vacopy
  46. %patch3 -p0 -b .ldflags
  47. %patch4 -p1 -b .threadsafe
  48. %patch5 -p1 -b .ncurses
  49. # Create pkgconfig file
  50. %{__cat} > libjs.pc << 'EOF'
  51. prefix=%{_prefix}
  52. exec_prefix=%{_prefix}
  53. libdir=%{_libdir}
  54. includedir=%{_includedir}
  55. Name: libjs
  56. Description: JS library
  57. Requires:
  58. Version: %{real_version}
  59. Libs: -L${libdir} -ljs
  60. Cflags: -I${includedir}
  61. EOF
  62. %build
  63. export BUILD_OPT=1
  64. %{__make} -C src -f Makefile.ref \
  65. JS_THREADSAFE="1" \
  66. XCFLAGS="%{optflags} -fPIC" \
  67. BUILD_OPT="1" \
  68. %if 0%{!?_without_readline:1}
  69. JS_READLINE="1" \
  70. %endif
  71. %install
  72. %{__rm} -rf %{buildroot}
  73. %{__mkdir_p} %{buildroot}%{_bindir} \
  74. %{buildroot}%{_libdir}/pkgconfig \
  75. %{buildroot}%{_includedir}
  76. %{__install} -m 0755 src/Linux_All_OPT.OBJ/{js,jscpucfg} \
  77. %{buildroot}%{_bindir}/
  78. %{__install} -m 0644 src/Linux_All_OPT.OBJ/libjs.a \
  79. %{buildroot}%{_libdir}/
  80. %{__install} -m 0755 src/Linux_All_OPT.OBJ/libjs.so \
  81. %{buildroot}%{_libdir}/
  82. %{__mv} %{buildroot}%{_libdir}/libjs.so %{buildroot}%{_libdir}/libjs.so.1
  83. %{__ln_s} -nf libjs.so.1 %{buildroot}%{_libdir}/libjs.so
  84. %{__install} -m 0644 src/js*.h src/js.msg src/jsopcode.tbl \
  85. src/Linux_All_OPT.OBJ/jsautocfg.h \
  86. %{buildroot}%{_includedir}/
  87. %{__install} -m 0644 libjs.pc \
  88. %{buildroot}%{_libdir}/pkgconfig/
  89. %clean
  90. %{__rm} -rf %{buildroot}
  91. %post -p /sbin/ldconfig
  92. %postun -p /sbin/ldconfig
  93. %files
  94. %defattr(-,root,root,-)
  95. %doc src/README*.html
  96. %{_bindir}/js
  97. %{_libdir}/*.so.*
  98. #{perl_vendorarch}/auto/JS/
  99. #{perl_vendorarch}/*.pm
  100. %files devel
  101. %defattr(-,root,root,-)
  102. %{_bindir}/jscpucfg
  103. %{_libdir}/pkgconfig/*.pc
  104. %{_libdir}/*.so
  105. %{_libdir}/*.a
  106. %{_includedir}/js*.h
  107. %{_includedir}/jsopcode.tbl
  108. %{_includedir}/js.msg
  109. %changelog
  110. * Sun Aug 17 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.70-1
  111. - new upstream release
  112. - applied new versioning policy
  113. - removed no longer provided perlconnect parts.
  114. * Mon Jun 4 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.60-2vl1
  115. - initial build for Vine Linux
  116. * Fri Feb 2 2007 Matthias Saou <http://freshrpms.net/> 1.60-2
  117. - Include jsopcode.tbl and js.msg in devel (#235481).
  118. - Install static lib mode 644 instead of 755.
  119. * Fri Feb 2 2007 Matthias Saou <http://freshrpms.net/> 1.60-1
  120. - Update to 1.60.
  121. - Rebuild in order to link against ncurses instead of termcap (#226773).
  122. - Add ncurses-devel build requirement and patch s/termcap/ncurses/ in.
  123. - Change mode of perl library from 555 to 755 (#224603).
  124. * Mon Aug 28 2006 Matthias Saou <http://freshrpms.net/> 1.5-6
  125. - Fix pkgconfig file (#204232 & dupe #204236).
  126. * Mon Jul 24 2006 Matthias Saou <http://freshrpms.net/> 1.5-5
  127. - FC6 rebuild.
  128. - Enable JS_THREADSAFE in the build (#199696), add patch and nspr build req.
  129. * Mon Mar 6 2006 Matthias Saou <http://freshrpms.net/> 1.5-4
  130. - FC5 rebuild.
  131. * Thu Feb 9 2006 Matthias Saou <http://freshrpms.net/> 1.5-3
  132. - Rebuild for new gcc/glibc.
  133. * Mon Jan 30 2006 Matthias Saou <http://freshrpms.net/> 1.5-2
  134. - Fix .pc file.
  135. * Thu Jan 26 2006 Matthias Saou <http://freshrpms.net/> 1.5-1
  136. - Update to 1.5.0 final.
  137. - Spec file cleanups.
  138. - Move docs from devel to main, since we need the license there.
  139. - Remove no longer needed js-perlconnect.patch.
  140. - Update js-1.5-va_copy.patch.
  141. - Include a pkgconfig file (#178993).
  142. * Tue Apr 19 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.5-0.rc6a.6
  143. - Link shared lib with libperl.
  144. * Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
  145. - rebuilt
  146. * Mon Feb 14 2005 David Woodhouse <dwmw2@infradead.org> - 1.5-0.rc6a.4
  147. - Take js-va_copy.patch out of %%ifarch x86_64 so it fixes the PPC build too
  148. * Sun Feb 13 2005 Thorsten Leemhuis <fedora at leemhuis dot info> - 1.5-0.rc6a.3
  149. - Add js-va_copy.patch to fix x86_64; Patch was found in a Mandrake srpm
  150. * Sat Dec 11 2004 Ville Skyttä <ville.skytta at iki.fi> - 1.5-0.rc6a.2
  151. - Include perlconnect.
  152. - Include readline support, rebuild using "--without readline" to disable.
  153. - Add libjs* provides for upstream compatibility.
  154. - Install header files in %%{_includedir} instead of %%{_includedir}/js.
  155. * Tue Jun 15 2004 Matthias Saou <http://freshrpms.net> 1.5-0.rc6a
  156. - Update to 1.5rc6a.
  157. * Tue Mar 02 2004 Dag Wieers <dag@wieers.com> - 1.5-0.rc6
  158. - Initial package. (using DAR)