File simple-xml.spec of Package simple-xml
#
# spec file for package simple-xml
#
# 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/
#
%define third_party_jars bea-stax-api xpp3
Name: simple-xml
Summary: XML serialization framework for Java
Version: 2.6.2
Release: 0.<RELEASE10>
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://simple.sourceforge.net
Source0: %{name}-%{version}.zip
Source1: %{name}.pom
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ant
BuildRequires: javapackages-local
%if 0%{?suse_version}
BuildRequires: bea-stax
%else
BuildRequires: bea-stax-api
%endif
BuildRequires: java-devel
BuildRequires: jpackage-utils >= 1.6
BuildRequires: xpp3
BuildRequires: unzip
BuildArch: noarch
%description
Simple is a high performance XML serialization and configuration
framework for Java. Its goal is to provide an XML framework that
enables rapid development of XML configuration and communication
systems.
%package javadoc
License: Apache-2.0
Summary: XML serialization framework for Java
Group: Development/Libraries/Java
%description javadoc
Simple is a high performance XML serialization and configuration
framework for Java. Its goal is to provide an XML framework that
enables rapid development of XML configuration and communication
systems.
%prep
%setup
cp %{SOURCE1} pom.xml
rm lib/*.jar
build-jar-repository -p lib/ %third_party_jars
%build
ant -Dant.build.javac.source=1.7 -Dant.build.javac.target=1.7
%install
#jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 jar/simple-xml-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# Maven metadata
install -d -m 0755 %{buildroot}/%{_mavenpomdir}/
pwd
%{mvn_install_pom} pom.xml %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}-%{version}.jar
#javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f .mfiles
%defattr(0644,root,root,0755)
%{_javadir}/*.jar
%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}
%changelog