Name: jmol
Version: 11.8.20
Release: 1%{?dist}
Summary: An open-source Java viewer for chemical structures in 3D
Group: Applications/Engineering
License: LGPLv2+
URL: http://jmol.sourceforge.net
BuildArch: noarch
Source0: http://downloads.sourceforge.net/project/jmol/Jmol/Version%2011.8/Version%20%{version}/jmol-%{version}-full.tar.gz
# Image available at "http://wiki.jmol.org:81/index.php/Image:Jmol_icon_128.png"
Source1: Jmol_icon_128.png
# Patch to get Jmol to build in Fedora
Patch0: jmol-11.8.14-fedorabuild.patch
# Patch to change jar file location to %{_javadir}
Patch1: jmol-11.8-jarlocation.patch
# Don't try to sign jars
Patch2: jmol-11.8.14-dontsign.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ant, ant-contrib
BuildRequires: desktop-file-utils
BuildRequires: gettext-devel
BuildRequires: itext
BuildRequires: jakarta-commons-cli
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
# For javax.vecmath
BuildRequires: vecmath
Requires: java >= 1:1.6.0
Requires: jpackage-utils
%description
Jmol is a free, open source molecule viewer for students, educators,
and researchers in chemistry and biochemistry.
%package javadoc
Summary: Javadocs 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
%patch0 -p1 -b .fedorabuild
%patch1 -p1 -b .jarlocation
%patch2 -p1 -b .nosign
# Remove binaries
find -name '*.class' -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
ant doc main
%install
rm -rf %{buildroot}
install -D -p -m 755 jmol %{buildroot}%{_bindir}/%{name}
install -D -p -m 644 build/JmolUnsigned.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
# Install desktop file
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications --vendor=fedora jmol.desktop
# Javadoc files
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -rp build/javadoc/* %{buildroot}%{_javadocdir}/%{name}
%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/fedora-%{name}.desktop
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}/
%files doc
%defattr(-,root,root,-)
%doc build/doc/*
%changelog
* Thu Mar 11 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.8.20-1
- Update to 11.8.20.
* Fri Mar 05 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.8.19-1
- Update to 11.8.19.
* Sat Feb 06 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.8.18-1
- Update to 11.8.18.
* Sat Jan 16 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.8.17-1
- Update to 11.8.17.
* Thu Jan 14 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.8.16-1
- Update to 11.8.16.
* Tue Jan 05 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.8.15-1
- Update to 11.8.15.
* Wed Dec 23 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 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 <jussilehtola@fedoraproject.org> - 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 <jussilehtola@fedoraproject.org> - 11.8-1.11564
- Update to 11.8 series, svn revision 11564.
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 11.6-12.11223svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Jul 16 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.6-11.11223svn
- Include desktop file in the spec.
* Thu Jul 16 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.6-10.11223svn
- Bump release to be able to rebuild in koji.
* Thu Jul 16 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.6-9.11223svn
- Update to svn revision 11223.
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 11.6-8.10506svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Thu Dec 18 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.6-7.10506svn
- Remove jpackage-utils from the Requires of the documentation packages.
* Fri Oct 24 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.6-6.10137svn
- Fix build on EPEL 5.
* Fri Oct 24 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.6-5.10137svn
- Disable JAR signing.
* Fri Oct 24 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.6-4.10137svn
- Add gettext-devel to BR and fix desktop-file-install.
* Thu Oct 23 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.6-3.10137svn
- Update to svn revision 10137.
* Tue Oct 14 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.6-2.10081svn
- Review fixes.
* Mon Oct 13 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 11.6-1.10081svn
- First release.