File jcuber.spec of Package jcuber

# Copyright (c) 2015  Dave Love, University of Liverpool
# MIT licence, per Fedora policy

Name:           jcuber
Version:        4.3.3
Release:        2%{?dist}
Summary:        CUBE reader for Java
# tarviewer is ASL
License:        BSD and ASL 2.0
URL:            http://www.scalasca.org/software/cube-4.x/download.html
Source0:        http://apps.fz-juelich.de/scalasca/releases/cube/4.3/dist/jcuber-%version.tar.gz

BuildRequires:  java-devel
BuildRequires:  jpackage-utils
BuildRequires:  xerces-j2
Requires:       java jpackage-utils
Obsoletes:      cube-java <= 4.3.2-1
Provides:       cube-java = %version-%release
BuildArch:      noarch


%description
A CUBE reader written in Java.

%package        doc
Summary:        Documentation for %{name}
BuildArch:      noarch
Conflicts:      cube-java <= 4.3.2-1

%description    doc
The %{name}-doc package contains documentation for %{name}.

%prep
%setup -q


%build
%configure
# As an alternative to patching configure.ac and then worrying about
# autoconf268 in EPEL6:
sed -i -e s/jCubeR/jcuber/ -e 's|/cube|/jcuber|' bin/jcuber-config
# nothing to parallelize
make


%check
make check


%install
make install install-html DESTDIR=%buildroot
cp -rp examples AUTHORS %buildroot%_defaultdocdir/%name


%{!?_licensedir:%global license %doc}
%files
%dir %_defaultdocdir/%name
%license COPYING
%_defaultdocdir/%name/AUTHORS
%_datadir/java/CubeReader.jar
# rpmlint complains, but I don't think they should be in a devel package --
# at least the file extension should be relevant at runtime.
%_bindir/jcuber-config*
%_datadir/jcuber
%exclude %_docdir/jcuber

%files doc
%_defaultdocdir/%name
%license COPYING


%changelog
* Wed Jan 13 2016 Dave Love <loveshack@fedoraproject.org> - 4.3.3-2
- Fix "==" in provides
- Add some comments to spec

* Tue Jan 12 2016 Dave Love <loveshack@fedoraproject.org> - 4.3.3-1
- New version

* Tue Dec  8 2015 Dave Love <loveshack@fedoraproject.org> - 4.3.2-2
- Add check
- Require java, not java-headless
- Install examples
- Fix jcuber-config

* Mon Jun 29 2015 Dave Love <loveshack@fedoraproject.org> - 4.3.2-1
- Initial packaging
openSUSE Build Service is sponsored by