commit f31ed20b3ff69ae0665e7efcce760327130dfc16ab9b6270c9557cacc78d2b12 Author: Dmitry Roshchin Date: Tue Apr 29 10:22:07 2014 +0000 Accepting request 231958 from home:jengelh:branches:science OBS-URL: https://build.opensuse.org/request/show/231958 OBS-URL: https://build.opensuse.org/package/show/science/jmol?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Jmol-14.0.13-full.tar.gz b/Jmol-14.0.13-full.tar.gz new file mode 100644 index 0000000..8709092 --- /dev/null +++ b/Jmol-14.0.13-full.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a71aee9708e76b521561db63728dbfcbac92534231666992f11b0c1b5a5cebf +size 124304216 diff --git a/Jmol_icon13.png b/Jmol_icon13.png new file mode 100644 index 0000000..5f6136a --- /dev/null +++ b/Jmol_icon13.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2495bc0475016db0d32f723e460eea32baae64dc11a9a8ad552ad0e22702e664 +size 13027 diff --git a/datadir.diff b/datadir.diff new file mode 100644 index 0000000..3f12750 --- /dev/null +++ b/datadir.diff @@ -0,0 +1,38 @@ +--- + jmol.sh | 22 +--------------------- + 1 file changed, 1 insertion(+), 21 deletions(-) + +Index: jmol-14.0.13/jmol.sh +=================================================================== +--- jmol-14.0.13.orig/jmol.sh ++++ jmol-14.0.13/jmol.sh +@@ -9,28 +9,8 @@ done + + # Determine installation location + if [ "$JMOL_HOME" = "" ]; then +- binDir=${0%/*} +- if [ "$binDir" = "$0" ]; then +- # Ran from local directory +- binDir=$PWD +- fi +- # Resolve symlinks. +- program="$0" +- while [ -L "$program" ]; do +- ls=`/bin/ls -ld "$program"` +- link=`/usr/bin/expr "$ls" : '.*-> \(.*\)$'` +- if /usr/bin/expr "$link" : '.*/.*' > /dev/null; then +- program="$link" +- else +- program="`/usr/bin/dirname $program`/$link" +- fi +- done +- binDir=`dirname $program` ++ JMOL_HOME="@pkgdatadir@" + fi +- +-JMOL_HOME=${JMOL_HOME:-$binDir} +-libDir=${JMOL_HOME}/jars +- + if [ ! -e ${JMOL_HOME}/Jmol.jar ]; then + echo "Jmol could not find its installed files." + exit diff --git a/jmol.changes b/jmol.changes new file mode 100644 index 0000000..ded69a1 --- /dev/null +++ b/jmol.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Mon Apr 28 22:22:31 UTC 2014 - jengelh@inai.de + +- Initial package (version 14.0.13) for build.opensuse.org diff --git a/jmol.spec b/jmol.spec new file mode 100644 index 0000000..5c54958 --- /dev/null +++ b/jmol.spec @@ -0,0 +1,83 @@ +# +# 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.13 +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-full.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 -q +%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