File avalon-framework.spec of Package avalon-framework
#
# spec file for package avalon-framework
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# 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 short_name framework
%define short_Name Avalon
Name: avalon-framework
Version: 4.1.4
Release: 0
Summary: Java components interfaces
License: Apache-1.1
Group: Development/Libraries/Java
Url: http://avalon.apache.org/framework/
Source0: http://archive.apache.org/dist/avalon/avalon-framework/v4.1.4/Avalon-4.1.4-src.tar.gz
Patch1: %{name}-target.patch
BuildRequires: ant
BuildRequires: java-devel
BuildRequires: javapackages-tools
BuildRequires: junit
BuildRequires: log4j
#BuildRequires: avalon-logkit
BuildRequires: xml-commons-apis >= 1.3
Requires: xalan-j2
Requires: xml-commons-apis >= 1.3
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The Avalon framework consists of interfaces that define relationships
between commonly used application components, best-of-practice pattern
enforcements, and several lightweight convenience implementations of the
generic components.
What that means is that we define the central interface Component. We
also define the relationship (contract) a component has with peers,
ancestors and children.
%package manual
Summary: Manual for %{name}
Group: Development/Libraries/Java
%description manual
Documentation for %{name}.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Libraries/Java
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n %{short_Name}-%{version}
%patch1 -p1
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
# Fix for wrong-file-end-of-line-encoding problem
for i in `find docs -iname "*.html"`; do sed -i 's/\r//' $i; done
for i in `find docs -iname "*.css"`; do sed -i 's/\r//' $i; done
for i in `find docs -iname "*.xml"`; do sed -i 's/\r//' $i; done
sed -i 's/\r//' README.txt
sed -i 's/\r//' LICENSE.txt
sed -i 's/\r//' KEYS
sed -i 's/\r//' docs/api/package-list
%build
export CLASSPATH=%(build-classpath avalon-logkit junit log4j junit)
ant all
ant -Dfailonerror=false javadocs
%install
export NO_BRP_CHECK_BYTECODE_VERSION=true
install -d -m 755 %{buildroot}%{_javadir}
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
install -m 644 target/lib/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
cp -pr target/javadocs/* %{buildroot}%{_javadocdir}/%{name}
# compat symlinks
install -d -m 0755 %{buildroot}/%{_javadir}/excalibur
(cd %{buildroot}/%{_javadir}/excalibur;
ln -sf ../avalon-framework.jar avalon-framework-impl.jar
ln -sf ../avalon-framework.jar avalon-framework-api.jar)
%files
%defattr(0644,root,root,0755)
%doc KEYS LICENSE.txt README.txt
%{_javadir}/*.jar
%{_javadir}/excalibur
%files manual
%defattr(0644,root,root,0755)
%doc docs/*
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/*
%changelog