133 lines
4.6 KiB
RPMSpec
133 lines
4.6 KiB
RPMSpec
#
|
|
# spec file for package xbean
|
|
#
|
|
# Copyright (c) 2022 SUSE LLC
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: xbean
|
|
Version: 4.20
|
|
Release: 0
|
|
Summary: Java plugin based web server
|
|
License: Apache-2.0
|
|
Group: Development/Libraries/Java
|
|
URL: https://geronimo.apache.org/xbean/
|
|
Source0: https://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
|
Patch2: 0002-Unbundle-ASM.patch
|
|
Patch3: 0003-Remove-dependency-on-log4j-and-commons-logging.patch
|
|
BuildRequires: fdupes
|
|
BuildRequires: java-devel >= 1.8
|
|
BuildRequires: javapackages-local
|
|
BuildRequires: objectweb-asm >= 9
|
|
BuildRequires: slf4j
|
|
BuildRequires: unzip
|
|
Requires: objectweb-asm >= 9
|
|
Requires: slf4j
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
XBean is a plugin-based server analogous to Eclipse being a
|
|
plugin-based IDE. XBean is able to discover, download and install
|
|
server plugins from an Internet-based repository. Support for
|
|
multiple IoC systems, support for running with no IoC system, JMX
|
|
without JMX code, lifecycle and class loader management, and a Spring
|
|
integration is included.
|
|
|
|
%package javadoc
|
|
Summary: API documentation for %{name}
|
|
Group: Documentation/HTML
|
|
|
|
%description javadoc
|
|
This package provides API documentation for xbean.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
|
|
cp xbean-asm-util/src/main/java/org/apache/xbean/asm9/original/commons/AsmConstants.java xbean-reflect/src/main/java/org/apache/xbean/recipe/
|
|
|
|
# Parent POM is not packaged
|
|
%pom_remove_parent
|
|
|
|
%pom_disable_module xbean-classloader
|
|
%pom_disable_module xbean-classpath
|
|
%pom_disable_module xbean-bundleutils
|
|
%pom_disable_module xbean-asm9-shaded
|
|
%pom_disable_module xbean-finder-shaded
|
|
%pom_disable_module xbean-naming
|
|
%pom_disable_module xbean-blueprint
|
|
%pom_disable_module xbean-spring
|
|
%pom_disable_module xbean-telnet
|
|
%pom_disable_module maven-xbean-plugin
|
|
|
|
%pom_remove_dep :commons-logging-api xbean-reflect
|
|
%pom_remove_dep :log4j xbean-reflect
|
|
%pom_remove_dep :xbean-asm9-shaded xbean-reflect
|
|
find -name CommonsLoggingConverter.java -delete
|
|
find -name Log4jConverter.java -delete
|
|
|
|
# Plugins useful for upstream only
|
|
%pom_remove_plugin :apache-rat-plugin
|
|
%pom_remove_plugin :maven-source-plugin
|
|
|
|
%pom_remove_dep :xbean-bundleutils xbean-finder
|
|
rm -r xbean-finder/src/main/java/org/apache/xbean/finder{,/archive}/Bundle*
|
|
|
|
# Disable one test that fails on JDK 11
|
|
sed -i '/testGetBytecode/i@org.junit.Ignore' xbean-finder/src/test/java/org/apache/xbean/finder/archive/MJarJarArchiveTest.java
|
|
|
|
%pom_change_dep -r -f ::::: :::::
|
|
|
|
%build
|
|
for i in xbean-asm-util xbean-finder xbean-naming xbean-reflect; do
|
|
pushd $i
|
|
mkdir -p build/classes
|
|
javac -d build/classes -encoding utf-8 -source 6 -target 6 \
|
|
-cp $(build-classpath reload4j commons-logging-api slf4j/api objectweb-asm/asm objectweb-asm/asm-commons):../xbean-asm-util/xbean-asm-util.jar \
|
|
$(find src/main/java -name *.java)
|
|
jar cf $i.jar -C build/classes .
|
|
popd
|
|
done
|
|
mkdir -p build/apidoc
|
|
javadoc -d build/apidoc -source 6 -encoding utf-8 \
|
|
-classpath $(build-classpath slf4j/api objectweb-asm/asm objectweb-asm/asm-commons) \
|
|
$(for i in xbean-asm-util xbean-finder xbean-naming xbean-reflect; do find $i/src/main/java -name *.java; done | xargs)
|
|
|
|
%install
|
|
# jars && poms
|
|
install -dm 755 %{buildroot}%{_javadir}/%{name}
|
|
install -dm 755 %{buildroot}%{_mavenpomdir}/%{name}
|
|
for i in xbean-asm-util xbean-finder xbean-naming xbean-reflect; do
|
|
install -m 0644 $i/$i.jar %{buildroot}%{_javadir}/%{name}
|
|
%pom_remove_parent ${i}
|
|
%pom_xpath_inject pom:project "<groupId>org.apache.xbean</groupId><version>%{version}</version>" ${i}
|
|
install -m 0644 $i/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/$i.pom
|
|
%add_maven_depmap %{name}/$i.pom %{name}/$i.jar
|
|
done
|
|
|
|
# javadoc
|
|
install -dm 755 %{buildroot}/%{_javadocdir}/%{name}
|
|
cp -aL build/apidoc/* %{buildroot}/%{_javadocdir}/%{name}
|
|
%fdupes -s %{buildroot}/%{_javadocdir}/%{name}
|
|
|
|
%files -f .mfiles
|
|
%license LICENSE
|
|
%doc NOTICE
|
|
|
|
%files javadoc
|
|
%{_javadocdir}/%{name}
|
|
|
|
%changelog
|