%global pkgdate 2015.01.22 %global with_jsmol 1 Name: jmol Version: 14.2.12 Release: 2.%{pkgdate}%{?dist} Summary: An open-source Java viewer for chemical structures in 3D Group: Applications/Engineering # most is LGPLv2+, src/com/obrador is combination of IJG and BSD # src/org@/jmol/export/image is partially 2 clause BSD License: LGPLv2+ and IJG and BSD URL: http://jmol.sourceforge.net BuildArch: noarch Source0: http://downloads.sourceforge.net/%{name}/Jmol-%{version}_%{pkgdate}-full.tar.gz Source1: http://wiki.jmol.org/images/1/1c/Jmol_icon13.png # Patch to get Jmol to build in Fedora (location of JAR files) Patch0: jmol-14.2.12-fedorabuild.patch # Don't try to sign jars Patch1: jmol-14.0.11-dontsign.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ant, ant-contrib BuildRequires: desktop-file-utils BuildRequires: gettext-devel BuildRequires: apache-commons-cli BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils BuildRequires: jspecview >= 2-6.1464svn BuildRequires: naga # In newer releases some of the necessary Java classes are # in the browser plugin package BuildRequires: icedtea-web Requires: icedtea-web Requires: java >= 1:1.6.0 Requires: jpackage-utils Requires: apache-commons-cli Requires: jspecview >= 2-6.1464svn Requires: naga %description Jmol is a free, open source molecule viewer for students, educators, and researchers in chemistry and biochemistry. %if %{with_jsmol} %package -n jsmol Summary: JavaScript-Based Molecular Viewer From Jmol Group: Applications/Engineering Requires: %{name} = %{version}-%{release} BuildRequires: web-assets-devel Requires: web-assets-filesystem %description -n jsmol Smol is the extension of the Java-based molecular visualization applet Jmol (jmol.sourceforge.net) as an HTML5 JavaScript-only web app. It can be used in conjunction with the Java applet to provide an alternative to Java when the platform does not support that (iPhone/iPad) or does not support applets (Android). Used in conjunction with the Jmol JavaScript Object (http://wiki.jmol.org/index.php/Jmol_Javascript_Object ), JSmol seamlessly offers alternatives to Java on these non-Applet platforms. JSmol can read all the files that Jmol reads. You can do all the scripting that Jmol does. You can create all the buttons and links and such that you are used to creating for Jmol. All of the rendering capability of the Jmol applet is there. JSmol has both a console and a popup menu. JSmol is integrated fully with JSME and JSpecView. A "lite" version of JSmol provides minimal functionality (balls and sticks only) for extremely small-bandwith apps. %endif %package javadoc Summary: Java docs for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} %description doc The documentation for %{name}. %prep %setup -q -n %{name}-%{version}_%{pkgdate} %patch0 -p1 -b .fedorabuild %patch1 -p1 -b .nosign # Remove binaries find -name '*.class' -exec rm -f '{}' \; find -name '*.exe' -exec rm -f '{}' \; find -name '*.jar' -exec rm -f '{}' \; rm -f jars/* # Remove executable permissions from documentation find -name "*.txt" -exec chmod 644 {} \; # Fix EOL encoding for doc in README.txt COPYRIGHT.txt LICENSE.txt CHANGES.txt; do sed "s|\r||g" $doc > $doc.new && \ touch -r $doc $doc.new && \ mv $doc.new $doc done # Make desktop file cat > jmol.desktop << EOF [Desktop Entry] Encoding=UTF-8 Name=Jmol Comment=An open-source Java viewer for chemical structures in 3D Exec=jmol Icon=jmol Terminal=false Type=Application Categories=Education;Science;Chemistry;Physics;DataVisualization; EOF %build export ANT_OPTS="-Dfile.encoding=utf-8" # Need to be able to find netscape.javascript.*classes PLUGIN_JAR=%{_datadir}/icedtea-web/plugin.jar jar tf $PLUGIN_JAR | grep javascript/JSObject.class ant --execdebug -lib $PLUGIN_JAR jar applet-jar doc %install rm -rf %{buildroot} install -D -p -m 644 build/Jmol.jar %{buildroot}%{_javadir}/Jmol.jar install -D -p -m 644 build/JmolApplet.jar %{buildroot}%{_javadir}/JmolApplet.jar install -D -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png %jpackage_script org.openscience.jmol.app.Jmol "" "" Jmol:commons-cli:jspecview.app:jspecview.applet jmol true # Install desktop file desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications jmol.desktop # Javadoc files mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -rp build/javadoc/* %{buildroot}%{_javadocdir}/%{name} %if %{with_jsmol} pushd appletweb unzip jsmol.zip pushd jsmol mkdir -p %{buildroot}%{_jsdir}/jsmol cp -pr *.htm *.js j2s js %{buildroot}%{_jsdir}/jsmol popd popd %endif %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc build/doc/* README.txt COPYRIGHT.txt LICENSE.txt ChangeLog.html CHANGES.txt %{_bindir}/%{name} %{_javadir}/Jmol.jar %{_javadir}/JmolApplet.jar %{_datadir}/pixmaps/%{name}.png %{_datadir}/applications/%{name}.desktop %if %{with_jsmol} %files -n jsmol %defattr(-,root,root,-) %{_jsdir}/jsmol %endif %files javadoc %defattr(-,root,root,-) %{_javadocdir}/%{name}/ %files doc %defattr(-,root,root,-) %doc build/doc/* %changelog * Sat Feb 07 2015 pcpa - 14.2.12-2.2015.01.22 - Create jsmol subpackage (#1190356) * Mon Feb 02 2015 Susi Lehtola - 14.2.12-1.2015.01.22 - Update to 14.2.12 snapshot 2015.01.22. * Sun Jun 08 2014 Fedora Release Engineering - 14.0.13-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 07 2014 Susi Lehtola - 14.0.13-2 - Don't bundle external libraries (BZ #1095315). * Thu Apr 03 2014 Susi Lehtola - 14.0.13-1 - Need full java because this is a GUI application. - Update to 14.0.13. * Fri Mar 28 2014 Michael Simacek - 14.0.11-2 - Use Requires: java-headless rebuild (#1067528) * Thu Mar 13 2014 Susi Lehtola - 14.0.11-1 - Update to 14.0.11. * Wed Feb 12 2014 Susi Lehtola - 14.0.7-1 - Added missing Requires: jspecview (BZ #1064335). - Update to 14.0.7. * Tue Jan 07 2014 Susi Lehtola - 14.0.3-1 - Update to 14.0.4. * Wed Jan 01 2014 Susi Lehtola - 14.0.3-1 - Update to 14.0.3. - Updated logo. * Fri Aug 23 2013 Susi Lehtola - 13.2.4-1 - Update to 13.2.4. * Sat Aug 10 2013 Susi Lehtola - 13.2.3-1 - Update to 13.2.3. * Sat Aug 03 2013 Fedora Release Engineering - 13.0.15-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue May 14 2013 Susi Lehtola - 13.0.15-1 - Update to 13.0.15. * Wed Mar 6 2013 Toshio Kuratomi - 12.0.48-10 - Remove vendor prefix from desktop files in F19+ https://fedorahosted.org/fesco/ticket/1077 * Thu Feb 14 2013 Fedora Release Engineering - 12.0.48-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Thu Jul 19 2012 Fedora Release Engineering - 12.0.48-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed May 9 2012 Jussi Lehtola - 12.0.48-7 - Remove exe file in %%prep. * Mon May 7 2012 Stanislav Ochotnicky - 12.0.48-6 - Add forgotten apache-commons BR/R * Mon May 7 2012 Stanislav Ochotnicky - 12.0.48-5 - Unbundle bundled libraries - Fix javadoc encoding build problem - Start using jpackage_script macro - Fix up license tag somewhat * Fri Jan 13 2012 Fedora Release Engineering - 12.0.48-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Aug 24 2011 Jussi Lehtola - 12.0.48-3 - Really fix build by not ignoring system classpath (thanks to omajid). * Wed Aug 17 2011 Jussi Lehtola - 12.0.48-2 - Try to fix build on rawhide and F16 by adding CLASSPATH definition. * Wed Aug 17 2011 Jussi Lehtola - 12.0.48-1 - Update to 12.0.48. * Thu Apr 28 2011 Jussi Lehtola - 12.0.41-1 - Update to 12.0.41. * Wed Feb 09 2011 Fedora Release Engineering - 11.8.26-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Fri Aug 6 2010 Jussi Lehtola - 11.8.26-1 - Update to 11.8.26. * Sat Jul 24 2010 Jussi Lehtola - 11.8.25-1 - Update to 11.8.25. * Tue May 18 2010 Jussi Lehtola - 11.8.24-1 - Update to 11.8.24. * Sun Apr 25 2010 Jussi Lehtola - 11.8.23-1 - Update to 11.8.23. * Fri Mar 26 2010 Jussi Lehtola - 11.8.22-1 - Update to 11.8.22. * Tue Mar 23 2010 Jussi Lehtola - 11.8.21-1 - Update to 11.8.21. * Thu Mar 11 2010 Jussi Lehtola - 11.8.20-1 - Update to 11.8.20. * Fri Mar 05 2010 Jussi Lehtola - 11.8.19-1 - Update to 11.8.19. * Sat Feb 06 2010 Jussi Lehtola - 11.8.18-1 - Update to 11.8.18. * Sat Jan 16 2010 Jussi Lehtola - 11.8.17-1 - Update to 11.8.17. * Thu Jan 14 2010 Jussi Lehtola - 11.8.16-1 - Update to 11.8.16. * Tue Jan 05 2010 Jussi Lehtola - 11.8.15-1 - Update to 11.8.15. * Wed Dec 23 2009 Jussi Lehtola - 11.8.14-1 - Build from stable release tarballs works now, switch to using stable releases. - Update to 11.8.14. * Fri Oct 02 2009 Jussi Lehtola - 11.8-1.11581 - Switch back to tar.bz2 source since xz doesn't work in EL-5. - Update to svn revision 11581. * Tue Sep 22 2009 Jussi Lehtola - 11.8-1.11564 - Update to 11.8 series, svn revision 11564. * Fri Jul 24 2009 Fedora Release Engineering - 11.6-12.11223svn - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Jul 16 2009 Jussi Lehtola - 11.6-11.11223svn - Include desktop file in the spec. * Thu Jul 16 2009 Jussi Lehtola - 11.6-10.11223svn - Bump release to be able to rebuild in koji. * Thu Jul 16 2009 Jussi Lehtola - 11.6-9.11223svn - Update to svn revision 11223. * Wed Feb 25 2009 Fedora Release Engineering - 11.6-8.10506svn - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Thu Dec 18 2008 Jussi Lehtola - 11.6-7.10506svn - Remove jpackage-utils from the Requires of the documentation packages. * Fri Oct 24 2008 Jussi Lehtola - 11.6-6.10137svn - Fix build on EPEL 5. * Fri Oct 24 2008 Jussi Lehtola - 11.6-5.10137svn - Disable JAR signing. * Fri Oct 24 2008 Jussi Lehtola - 11.6-4.10137svn - Add gettext-devel to BR and fix desktop-file-install. * Thu Oct 23 2008 Jussi Lehtola - 11.6-3.10137svn - Update to svn revision 10137. * Tue Oct 14 2008 Jussi Lehtola - 11.6-2.10081svn - Review fixes. * Mon Oct 13 2008 Jussi Lehtola - 11.6-1.10081svn - First release.