File netbeans-svnclientadapter.spec of Package netbeans-svnclientadapter

#
# spec file for package netbeans-svnclientadapter (Version 6.5)
#
# 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 nb_            netbeans
%define nb_org         %{nb_}.org
%define nb_ver         6.5

Name:           netbeans-svnclientadapter
Version:        6.5
Release:        2
Summary:        Subversion Client Adapter
License:        ASL 2.0
Url:            http://subclipse.tigris.org/svnClientAdapter.html
Group:          Development/Libraries
%define svnCA_ver      1.4.0
# The source for this package was pulled from upstream's vcs.  Use the
# following commands to generate the tarball:
# svn --username guest co \
#     http://subclipse.tigris.org/svn/subclipse/tags/subclipse/%{svnCA_ver}/svnClientAdapter \
#     svnClientAdapter
# rm svnClientAdapter/lib/* #bnc#509501
# tar --exclude-vcs -czvf svnClientAdapter-%{svnCA_ver}-nojars.tar.gz svnClientAdapter
Source0:        svnClientAdapter-%{svnCA_ver}-nojars.tar.bz2
Patch0:         svnClientAdapter-%{svnCA_ver}-build.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  ant
BuildRequires:  ant-nodeps
BuildRequires:  ant-junit
BuildRequires:  java-devel
BuildRequires:  jpackage-utils
BuildRequires:  subversion-javahl
Requires:       java
Requires:       jpackage-utils
Requires:       subversion-javahl
Provides:       libnb-svnClientAdapter = 6.1

%description
SVNClientAdapter is a high-level Java API for Subversion.

%prep
%setup -q -n svnClientAdapter
# remove all binary libs
find . -name "*.jar" -exec %{__rm} -f {} \;
%patch0 -p1 -b .sav
#%{__ln_s} -f %{_javadir}//svnkit-javahl.jar lib/svnjavahl.jar
%{__ln_s} -f $(build-classpath svn-javahl.jar) lib/svnjavahl.jar

%build
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java 
export CLASSPATH=$CLASSPATH:lib/svnjavahl.jar
ant -verbose svnClientAdapter.jar

%install
# jar
%{__install} -d -m 755 %{buildroot}%{_javadir}
%{__install} -m 644 build/lib/svnClientAdapter.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
%{__ln_s} %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar

%clean
%{__rm} -rf %{buildroot}

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

%changelog
openSUSE Build Service is sponsored by