File bytelist.spec of Package bytelist

#
# spec file for package bytelist
#
# Copyright (c) 2013 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/
#


%global  git_commit 61655c8
%global cluster jruby

# Prevent brp-java-repack-jars from being run.
%define __jar_repack %{nil}

Name:           bytelist
Version:        1.0.3
Release:        0
Summary:        A java library for lists of bytes
License:        CPL-1.0 or GPL-2.0+ or LGPL-2.1+
Group:          Development/Libraries/Java

Url:            http://github.com/%{cluster}/%{name}
Source0:        %{url}/tarball/%{version}/%{cluster}-%{name}-%{git_commit}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

BuildRequires:  ant
BuildRequires:  ant-junit
BuildRequires:  java-devel
BuildRequires:  javapackages-tools
BuildRequires:  jcodings
BuildRequires:  junit

Requires:       java
Requires:       javapackages-tools
Requires:       jcodings

%description
A small java library for manipulating lists of bytes.


%prep
%setup -q -n %{cluster}-%{name}-%{git_commit}

find -name '*.class' -delete
find -name '*.jar' -delete

%build
echo "See %{url} for more info about the %{name} project." > README.txt

export CLASSPATH=$(build-classpath junit jcodings)
%__mkdir_p lib
%ant

%install
%__rm -rf %{buildroot}
%__mkdir_p %{buildroot}%{_javadir}

%__cp -p lib/%{name}-1.0.1.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
pushd %{buildroot}%{_javadir}/
  %__ln_s %{name}-%{version}.jar %{name}.jar
popd

%check
export CLASSPATH=$(build-classpath junit jcodings)
%ant test

%files
%defattr(-,root,root,-)
%{_javadir}/*
%doc README.txt

%changelog
openSUSE Build Service is sponsored by