# # spec file for package jmol # # Copyright (c) 2016 SUSE LINUX 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.6.0 Release: 0 %define date 2016.05.24 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}_%date-binary.zip Source2: Jmol_icon13.png #Source2-Orig: http://wiki.jmol.org/index.php/File:Jmol_icon13.png Source3: %{name}.man Source4: %{name}.desktop Patch1: datadir.diff Patch2: fsf-adress.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: dos2unix BuildRequires: unzip BuildRequires: desktop-file-utils BuildRequires: update-desktop-files Requires: java %description Jmol is an open-source Java-based viewer for chemical structures in 3D with features for chemicals, crystals, materials and biomolecules. %prep %setup -qn %name-%{version}_%date %patch -P 1 -p1 %patch -P 2 -p0 cp %{S:2} . %build dos2unix CHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt perl -i -pe 's{\@pkgdatadir\@}{%_datadir/%name}gs' jmol.sh # man cp %{S:3} . sed -i 's/INST_VERSION/%{version}/' jmol.man sed -i 's/INST_SUMMARY/%{summary}/' jmol.man gzip jmol.man %install b="%buildroot" # jar mkdir -p "$b/%_datadir/%name" install -D -p -m 644 Jmol.jar "$b/%_datadir/%name/" # script mkdir -p "$b/%_bindir" install -D -p -m 755 jmol.sh "$b/%_bindir/jmol" # icon mkdir -p "$b/%_datadir/pixmaps" install -m 644 Jmol_icon13.png "$b/%_datadir/pixmaps/%name.png" # manual mkdir -p %{buildroot}%{_mandir}/man1 install -m 644 jmol.man.gz "$b/%_mandir/man1/jmol.1.gz" # .desktop desktop-file-install --dir %{buildroot}%{_datadir}/applications %{S:4} %suse_update_desktop_file %{name} %files %defattr(-,root,root) %doc README.txt LICENSE.txt COPYRIGHT.txt CHANGES.txt %_bindir/%name %_datadir/%name %_datadir/applications/%name.desktop %_datadir/pixmaps/%name.png %_mandir/man1/%{name}.1.gz %changelog