forked from pool/avalon-framework
118 lines
3.6 KiB
RPMSpec
118 lines
3.6 KiB
RPMSpec
#
|
|
# spec file for package avalon-framework
|
|
#
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
# Copyright (c) 2000-2007, JPackage Project
|
|
#
|
|
# 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 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: avalon-logkit
|
|
BuildRequires: fdupes
|
|
BuildRequires: java-devel >= 1.8
|
|
BuildRequires: javapackages-tools
|
|
BuildRequires: junit
|
|
BuildRequires: log4j
|
|
BuildRequires: xml-commons-apis >= 1.3
|
|
Requires: xalan-j2
|
|
Requires: xml-commons-apis >= 1.3
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildArch: noarch
|
|
|
|
%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
|
|
ant \
|
|
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
|
|
-Djunit.jar=$(build-classpath junit) \
|
|
-Dlogkit.jar=$(build-classpath avalon-logkit) \
|
|
-Dlog4j.jar=$(build-classpath log4j) \
|
|
all javadocs
|
|
|
|
%install
|
|
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}
|
|
%fdupes -s %{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
|