File sat4j.spec of Package sat4j

#
# spec file for package sat4j (Version 2.0.3)
#
# Copyright (c) 2009 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/
#


%define eclipse_base %{_libdir}/eclipse
# We want the version to match that shipped in Eclipse's Orbit project
%define qualifier 20081021

Name:           sat4j
Version:        2.0.3
Release:        2
Summary:        A library of SAT solvers written in Java
Group:          Development/Libraries
License:        EPL and LGPLv2
Url:            http://www.sat4j.org/
# svn co svn://svn.forge.objectweb.org/svnroot/sat4j/maven/tags/2_0_3 sat4j-2.0.3
Source0:        %{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  java-devel >= 1.6
BuildRequires:  ant
Requires:       java >= 1.6
Requires:       jpackage-utils
BuildArch:      noarch

%description
The aim of the SAT4J library is to provide an efficient library of SAT
solvers in Java. The SAT4J library targets first users of SAT "black
boxes", those willing to embed SAT technologies into their application
without worrying about the details.

%prep
%setup -q
# Only used for the tests
rm lib/commons-cli.jar

%build
#ant -Drelease=%{version} -DBUILD_DATE=`LC_ALL=C date +'%Y%m%d'` p2 
ant -Drelease=%{version}  p2 

%install
%{__install} -d -m 755 %{buildroot}%{_javadir}
%{__install} -m 0644 dist/%{version}/org.sat4j.core.jar %{buildroot}%{_javadir}/org.sat4j.core-%{version}.jar
%{__install} -m 0644 dist/%{version}/org.sat4j.pb.jar   %{buildroot}%{_javadir}/org.sat4j.pb-%{version}.jar
(cd %{buildroot}%{_javadir}/ && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_javadir}/org.%{name}*.jar

%changelog
openSUSE Build Service is sponsored by