rhino-vl.spec 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. # Copyright (c) 2000-2005, JPackage Project
  2. # All rights reserved.
  3. #
  4. # Redistribution and use in source and binary forms, with or without
  5. # modification, are permitted provided that the following conditions
  6. # are met:
  7. #
  8. # 1. Redistributions of source code must retain the above copyright
  9. # notice, this list of conditions and the following disclaimer.
  10. # 2. Redistribution1s in binary form must reproduce the above copyright
  11. # notice, this list of conditions and the following disclaimer in the
  12. # documentation and/or other materials provided with the
  13. # distribution.
  14. # 3. Neither the name of the JPackage Project nor the names of its
  15. # contributors may be used to endorse or promote products derived
  16. # from this software without specific prior written permission.
  17. #
  18. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  22. # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  23. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  24. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  26. # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  28. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. #
  30. %define scm_version 1_7R4
  31. Name: rhino
  32. Version: 1.7
  33. Release: 0.r4.1%{?_dist_release}
  34. Summary: JavaScript for Java
  35. Summary(ja): Java で記述された JavaScript
  36. Group: Development/Libraries
  37. License: MPLv2.0
  38. URL: http://www.mozilla.org/rhino/
  39. Source0: https://github.com/mozilla/rhino/archive/Rhino%{scm_version}_RELEASE.zip
  40. Source2: %{name}.script
  41. Patch0: %{name}-build.patch
  42. # Add OSGi metadata from Eclipse Orbit project
  43. # Rip out of MANIFEST.MF included in this JAR:
  44. # http://www.eclipse.org/downloads/download.php?r=1&file=/tools/orbit/downloads/drops/R20110523182458/repository/plugins/org.mozilla.javascript_1.7.2.v201005080400.jar
  45. Patch1: %{name}-addOrbitManifest.patch
  46. Patch2: %{name}-shell-manpage.patch
  47. # Originally from https://github.com/mozilla/rhino/commit\
  48. # /52e25f784cd1b927d44383aa9afb358191df97e4.patch
  49. # See RHBZ# 1011947
  50. Patch3: %{name}-overflow-detection.patch
  51. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  52. BuildArch: noarch
  53. BuildRequires: ant
  54. BuildRequires: java-devel
  55. Requires: jpackage-utils
  56. Requires: jline
  57. # Disable xmlbeans until we can get it into Fedora
  58. #Requires: xmlbeans
  59. #BuildRequires: xmlbeans
  60. %description
  61. Rhino is an open-source implementation of JavaScript written entirely
  62. in Java. It is typically embedded into Java applications to provide
  63. scripting to end users.
  64. %description -l ja
  65. Rhino はすべてが Java で記述された JavaScript のオープンソースな実装です.
  66. 一般的には Java アプリケーションに組み込まれることで、エンドユーザーによる
  67. スクリプトの記述が可能になります.
  68. %package demo
  69. Summary: Examples for %{name}
  70. Summary(ja): %{name} のデモプログラム
  71. Group: Development/Libraries
  72. %description demo
  73. Examples for %{name}.
  74. #%package manual
  75. #Summary: Manual for %{name}
  76. #Group: Documentation
  77. #
  78. #%description manual
  79. #Documentation for %{name}.
  80. %prep
  81. %setup -q -n %{name}-Rhino%{scm_version}_RELEASE
  82. %patch0 -p1 -b .build
  83. %patch1 -p1 -b .fixManifest
  84. %patch2 -p1 -b .manpage
  85. %patch3 -p1 -b .overflow
  86. # Fix build
  87. sed -i -e '/.*<get.*src=.*>$/d' build.xml testsrc/build.xml \
  88. toolsrc/org/mozilla/javascript/tools/debugger/build.xml xmlimplsrc/build.xml
  89. # Fix manifest
  90. sed -i -e '/^Class-Path:.*$/d' src/manifest
  91. # Add jpp release info to version
  92. sed -i -e 's|^implementation.version: Rhino .* release .* \${implementation.date}|implementation.version: Rhino %{version} release %{release} \${implementation.date}|' build.properties
  93. %build
  94. ant deepclean jar copy-all -Dno-xmlbeans=1
  95. pushd examples
  96. export CLASSPATH=../build/%{name}%{scm_version}/js.jar:$(build-classpath xmlbeans/xbean 2>/dev/null)
  97. %{javac} *.java
  98. %{jar} cvf ../build/%{name}%{scm_version}/%{name}-examples.jar *.class
  99. popd
  100. %install
  101. rm -rf $RPM_BUILD_ROOT
  102. # jars
  103. mkdir -p $RPM_BUILD_ROOT%{_javadir}
  104. cp -a build/%{name}%{scm_version}/js.jar $RPM_BUILD_ROOT%{_javadir}
  105. ln -s js.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
  106. cp -a build/%{name}%{scm_version}/%{name}-examples.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-examples.jar
  107. # man page
  108. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
  109. install -m 644 build/%{name}%{scm_version}/man/%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
  110. ## script
  111. mkdir -p $RPM_BUILD_ROOT%{_bindir}
  112. install -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
  113. # examples
  114. mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
  115. cp -a examples/* $RPM_BUILD_ROOT%{_datadir}/%{name}
  116. find $RPM_BUILD_ROOT%{_datadir}/%{name} -name '*.build' -delete
  117. %clean
  118. rm -rf $RPM_BUILD_ROOT
  119. %files
  120. %defattr(0644,root,root,0755)
  121. %doc LICENSE.txt
  122. %attr(0755,root,root) %{_bindir}/*
  123. %{_javadir}/*
  124. %{_mandir}/man1/%{name}.1*
  125. %files demo
  126. %defattr(0644,root,root,0755)
  127. %{_datadir}/%{name}
  128. #%files manual
  129. #%defattr(0644,root,root,0755)
  130. #%if 0
  131. #%doc build/%{name}%{scm_version}/docs/*
  132. #%endif
  133. %changelog
  134. * Fri Jan 23 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.7-0.r4.1
  135. - new upstream release
  136. * Sat Jun 2 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.7-0.r3.1
  137. - new upstream release
  138. * Wed Sep 1 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.7-0.r2.1
  139. - Initial build for VineLinux
  140. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-0.7.r2
  141. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  142. * Sun May 31 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0:1.7-0.6.r2
  143. - Update to rhino1_7R2
  144. - Add patch from Steven Elliott to fix exception in the interpreter shell.
  145. * Mon Apr 20 2009 Lillian Angel <langel@redhat.com> - 0:1.7-0.4.r2pre.1.1
  146. - Added jpackage-utils requirement.
  147. - Resolves: rhbz#496435
  148. * Thu Mar 26 2009 Lillian Angel <langel@redhat.com> - 0:1.7-0.3.r2pre.1.1
  149. - Updated rhino-build.patch
  150. - License for treetable has been fixed. Re-included this code, and removed patch.
  151. - Resolves: rhbz#457336
  152. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-0.2.r2pre.1.1
  153. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  154. * Fri Feb 13 2009 Lillian Angel <langel@redhat.com> - 0:1.7-0.1.r2pre.1.1
  155. - Upgraded to 1.7r2pre.
  156. - Resolves: rhbz#485135
  157. * Thu Jul 10 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.6-0.1.r5.1.3
  158. - drop repotag
  159. - fix license tag
  160. * Thu Mar 15 2007 Matt Wringe <mwringe@redhat.com> 0:1.6-0.1.r5.1jpp.2
  161. - Remove script from build as the debugging tool is disabled due to it
  162. containing proprietary code from Sun.
  163. * Wed Mar 07 2007 Deepak Bhole <dbhole@redhat.com> 0:1.6-0.1.r5.1jpp.1
  164. - Upgrade to 1.6r5
  165. - Change release per Fedora guidelines
  166. - Disable dependency on xmlbeans (optional component, not in Fedora yet)
  167. - Disable building of debugger tool, as it needs confidential code from Sun
  168. - Remove post/postuns for javadoc and add the two dirs as %%doc
  169. * Wed Jun 14 2006 Ralph Apel <r.apel@r-apel.de> 0:1.6-0.r2.2jpp
  170. - Add bea-stax-api in order to build xmlimpl classes
  171. * Tue May 31 2006 Fernando Nasser <fnasser@redhat.com> 0:1.6-0.r2.1jpp
  172. - Upgrade to RC2
  173. * Mon Apr 24 2006 Fernando Nasser <fnasser@redhat.com> 0:1.6-0.r1.2jpp
  174. - First JPP 1.7 build
  175. * Thu Dec 02 2004 David Walluck <david@jpackage.org> 0:1.6-0.r1.1jpp
  176. - 1_6R1
  177. - add demo subpackage containing example code
  178. - add jpp release info to implementation version
  179. - add script to launch js shell
  180. - build E4X implementation (Requires: xmlbeans)
  181. - remove `Class-Path' from manifest
  182. * Tue Aug 24 2004 Fernando Nasser <fnasser@redhat.com> - 0:1.5-1.R5.1jpp
  183. - Update to 1.5R5.
  184. - Rebuild with Ant 1.6.2
  185. * Sat Jul 19 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.5-1.R4.1.1jpp
  186. - Update to 1.5R4.1.
  187. - Non-versioned javadoc dir symlink.
  188. * Fri Apr 11 2003 David Walluck <davdi@anti-microsoft.org> 0:1.5-0.R4.2jpp
  189. - remove build patches in favor of perl
  190. - add epoch
  191. * Sun Mar 30 2003 Ville Skyttä <ville.skytta at iki.fi> - 1.5-0.r4.1jpp
  192. - Update to 1.5R4.
  193. - Rebuild for JPackage 1.5.
  194. * Wed May 08 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5-0.R3.1jpp
  195. - 1.5R3
  196. - versioned dir for javadoc
  197. * Sun Mar 10 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5-0.R2.9jpp
  198. - versioned compatibility symlink
  199. * Mon Jan 21 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5-0.R2.8jpp
  200. - section macro
  201. - new release scheme
  202. * Thu Jan 17 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-7jpp
  203. - spec cleanup
  204. - changelog corrections
  205. * Fri Jan 11 2002 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-6jpp
  206. - backward compatibility js.jar symlink
  207. - used original swing exemples archive
  208. - fixed javadoc empty package-list file
  209. - no dependencies for manual and javadoc packages
  210. * Sat Dec 1 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-5jpp
  211. - javadoc in javadoc package
  212. - fixed offline build
  213. * Wed Nov 21 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 1.5R2-4jpp
  214. - changed extension --> jpp
  215. * Sat Oct 6 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-3jpp
  216. - first unified release
  217. - s/jPackage/JPackage
  218. - corrected license to MPL
  219. * Sat Sep 15 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-2mdk
  220. - spec cleanup
  221. - standardized cvs references
  222. * Thu Aug 31 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.5R2-1mdk
  223. - first Mandrake release