# # spec file for package jmol # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: jmol Version: 14.0.17 Release: 0 Summary: 3D Viewer for chemical structures License: LGPL-2.1 Group: Productivity/Scientific/Chemistry Url: http://jmol.sf.net/ Source: http://downloads.sf.net/jmol/Jmol-%{version}_2014.06.10-binary.tar.gz Source2: Jmol_icon13.png #Source2-Orig: http://wiki.jmol.org/index.php/File:Jmol_icon13.png Patch1: datadir.diff BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: dos2unix BuildRequires: unzip Requires: java %description Jmol is a Java-based viewer for chemical structures in 3D with features for chemicals, crystals, materials and biomolecules. %prep %setup -qn %name-%{version}_2014.06.10 %patch -P 1 -p1 cp %{S:2} . %build dos2unix CHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt perl -i -pe 's{\@pkgdatadir\@}{%_datadir/%name}gs' jmol.sh %install b="%buildroot" # jar mkdir -p "$b/%_datadir/%name" cp -a Jmol.jar "$b/%_datadir/%name/" # script mkdir -p "$b/%_bindir" cp -a jmol.sh "$b/%_bindir/jmol" # icon mkdir -p "$b/%_datadir/pixmaps" cp -a Jmol_icon13.png "$b/%_datadir/pixmaps/%name.png" # .desktop mkdir -p "$b/%_datadir/applications" cat >"$b/%_datadir/applications/%name.desktop" <<-EOF [Desktop Entry] Name=Jmol Comment=An open-source Java viewer for chemical structures in 3D GenericName=Jmol Exec=jmol Icon=jmol Terminal=0 Categories=Education;Science;Chemistry;Physics; Type=Application EOF %files %defattr(-,root,root) %doc README.txt LICENSE.txt COPYRIGHT.txt CHANGES.txt %_bindir/jmol %_datadir/%name %_datadir/applications/%name.desktop %_datadir/pixmaps/%name.png %changelog