File surfex.spec of Package surfex
#
# spec file for package surfex
#
# Copyright (c) 2011 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: surfex
Version: 0.90.00
Release: 0
%define uver 0_90_00
Summary: Algebraic geometry visualizer
Group: Productivity/Scientific/Math
License: GPL-2.0 or GPL-3.0
URL: http://surfex.algebraicsurface.net/
#DL: http://www.surfex.algebraicsurface.net/data/surfex_0_90_00.tar.gz
Source: %{name}_%uver.tar.xz
Requires: java
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: fastjar, unzip, xz
BuildArch: noarch
%description
surfex is a program for high-quality visualization of algebraic
surfaces, written in Java.
%prep
%setup -n %{name}_%uver
find . "(" -name "*~" -o -name "*.class" -o -name "*.java" ")" -delete;
%build
%install
b="%buildroot";
mkdir -p "$b/%_bindir" "$b/%_datadir";
pushd ../;
cp -a "%{name}_%uver" "$b/%_datadir/%name";
popd;
cat >"$b/%_bindir/%name" <<-EOF;
#!/bin/sh
exec java -jar %_datadir/%name/%name.jar;
EOF
chmod a+x "$b/%_bindir/%name";
%files
%defattr(-,root,root)
%_bindir/%name
%_datadir/%name
%changelog