File isorelax.spec of Package isorelax

# spec file for package isorelax
# Copyright (c) 2018 SUSE LINUX 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

%define	cvsversion	20041111
Name:           isorelax
Version:        0.1
Release:        0
Summary:        Public interfaces useful for applications to support RELAX Core
License:        Apache-2.0 AND MIT
Group:          Development/Libraries/Java
Source0:        %{name}.%{cvsversion}.zip
Source1:        %{name}-build.xml
Source2:        isorelax-maven-project.xml
Source3:        isorelax-maven-project.xsd
Patch0:         isorelax-java5-compatibility.patch
BuildRequires:  ant
BuildRequires:  java-devel
BuildRequires:  javapackages-local
BuildRequires:  unzip
BuildRequires:  xerces-j2
BuildRequires:  xml-apis
Requires:       xerces-j2
Requires:       xml-apis
Obsoletes:      isorelax-bootstrap
Provides:       isorelax-bootstrap
Obsoletes:      %{name}-javadoc
BuildArch:      noarch

The ISO RELAX project is started to host the public interfaces useful
for applications to support RELAX Core. But nowadays some of the stuff
we have is schema language neutral.

%setup -q -T -c
unzip -q %{SOURCE0}
mkdir src
(cd src; unzip -q ../
rm -f
cp %{SOURCE1} build.xml
mkdir test
cp %{SOURCE2} test
cp %{SOURCE3} test
chmod -R go=u-w *
find . -name "*.jar" -exec rm -f {} \;
rm -rf src/jp/gr/xml/relax/swift
%patch0 -b .sav0

export CLASSPATH=$(build-classpath \
xerces-j2 \
xml-apis \
ant \
    -Dbuild.sysclasspath=only release

# jars
install -d -m 755 %{buildroot}%{_javadir}
install -m 644 %{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -m 644 %{SOURCE4} %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom
%add_maven_depmap %{name}-%{version}.pom %{name}-%{version}.jar

%license COPYING.txt
%if %{defined _maven_repository}

openSUSE Build Service is sponsored by