1
0

Accepting request 672040 from Java:packages

Build against glassfish-servlet-api

OBS-URL: https://build.opensuse.org/request/show/672040
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache-commons-logging?expand=0&rev=19
This commit is contained in:
Stephan Kulow
2019-02-06 14:47:54 +00:00
committed by Git OBS Bridge
3 changed files with 99 additions and 16 deletions

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Feb 6 06:47:05 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Build against glassfish-servlet-api
-------------------------------------------------------------------
Mon Jan 28 12:43:50 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* commons-logging-manifests.patch
+ Different Bundle-SymbolicName for different jars
-------------------------------------------------------------------
Fri Oct 19 20:35:40 UTC 2018 - Fridrich Strba <fstrba@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package apache-commons-logging
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2007, JPackage Project
#
# All modifications and additions to the file contributed by third parties
@@ -25,7 +25,7 @@ Release: 0
Summary: Apache Commons Logging
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://commons.apache.org/%{base_name}
URL: http://commons.apache.org/%{base_name}
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Source1: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc
Source2: apache-commons-logging.keyring
@@ -33,16 +33,17 @@ Source3: http://central.maven.org/maven2/%{short_name}/%{short_name}/%{ve
Source4: http://central.maven.org/maven2/%{short_name}/%{short_name}-api/1.1/%{short_name}-api-1.1.pom
Patch0: commons-logging-1.1.3-src-junit.diff
Patch1: commons-logging-1.2-sourcetarget.patch
Patch2: commons-logging-manifests.patch
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: apache-commons-parent
BuildRequires: glassfish-servlet-api
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: junit
BuildRequires: log4j-mini >= 1.2
BuildRequires: servletapi5
Requires: java >= 1.8
Requires: mvn(org.apache.commons:commons-parent:pom:)
Provides: jakarta-%{short_name} = %{version}-%{release}
Obsoletes: jakarta-%{short_name} < %{version}
Provides: %{short_name} = %{version}-%{release}
@@ -64,6 +65,7 @@ logging implementation.
%setup -q -n %{short_name}-%{version}-src
%patch0 -p1
%patch1 -p1
%patch2 -p1
sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt
@@ -78,8 +80,10 @@ export CLASSPATH=$(build-classpath \
plexus/ \
junit \
):target/classes:target/test-classes
ant -Dmaven.mode.offline=true -Dlog4j12.jar=%{_javadir}/log4j.jar dist \
-lib %{_javadir}
ant \
-Dmaven.mode.offline=true -lib %{_javadir} \
-Dlog4j12.jar=%{_javadir}/log4j.jar -Dservletapi.jar=%{_javadir}/glassfish-servlet-api.jar \
dist
%install
# jars
@@ -105,15 +109,9 @@ install -pm 644 tmp.pom %{buildroot}/%{_mavenpomdir}/%{short_name}-adapters-%{ve
%add_maven_depmap %{short_name}-api-%{version}.pom %{short_name}-api.jar -a "org.apache.commons:%{short_name}-api","apache:%{short_name}-api"
%add_maven_depmap %{short_name}-adapters-%{version}.pom %{short_name}-adapters.jar -a "org.apache.commons:%{short_name}-adapters","apache:%{short_name}-adapters"
%files
%defattr(0644,root,root,0755)
%doc PROPOSAL.html LICENSE.txt RELEASE-NOTES.txt NOTICE.txt
%{_javadir}/*
%{_mavenpomdir}/*
%if %{defined _maven_repository}
%{_mavendepmapfragdir}/%{name}
%else
%{_datadir}/maven-metadata/%{name}.xml*
%endif
%files -f .mfiles
%{_javadir}/%{name}*.jar
%license LICENSE.txt
%doc PROPOSAL.html RELEASE-NOTES.txt NOTICE.txt
%changelog

View File

@@ -0,0 +1,73 @@
--- commons-logging-1.2-src/build.xml 2014-07-05 20:11:36.000000000 +0200
+++ commons-logging-1.2-src/build.xml 2019-01-28 13:41:46.362796232 +0100
@@ -263,9 +263,31 @@
description="Copy static files to build directory">
<tstamp/>
<copy todir="${build.home}/conf" filtering="on">
- <fileset dir="${conf.home}" includes="*.MF"/>
<fileset dir="${conf.home}" includes="*.properties"/>
</copy>
+ <copy file="${conf.home}/MANIFEST.MF" toFile="${build.home}/conf/MANIFEST.MF" filtering="on">
+ <filterset>
+ <filter token="bsn-extension" value=""/>
+ </filterset>
+ </copy>
+ <mkdir dir="${build.home}/conf/tests"/>
+ <copy file="${conf.home}/MANIFEST.MF" toFile="${build.home}/conf/tests/MANIFEST.MF" filtering="on">
+ <filterset>
+ <filter token="bsn-extension" value=".tests"/>
+ </filterset>
+ </copy>
+ <mkdir dir="${build.home}/conf/api"/>
+ <copy file="${conf.home}/MANIFEST.MF" toFile="${build.home}/conf/api/MANIFEST.MF" filtering="on">
+ <filterset>
+ <filter token="bsn-extension" value=".api"/>
+ </filterset>
+ </copy>
+ <mkdir dir="${build.home}/conf/adapters"/>
+ <copy file="${conf.home}/MANIFEST.MF" toFile="${build.home}/conf/adapters/MANIFEST.MF" filtering="on">
+ <filterset>
+ <filter token="bsn-extension" value=".adapters"/>
+ </filterset>
+ </copy>
</target>
<target name="compile" depends="static,compile-only"
@@ -478,7 +500,7 @@
<jar jarfile="${build.home}/${api.jar.name}"
basedir="${build.home}/classes"
- manifest="${build.home}/conf/MANIFEST.MF">
+ manifest="${build.home}/conf/api/MANIFEST.MF">
<include name="org/apache/commons/logging/*.class" />
<include name="org/apache/commons/logging/impl/LogFactoryImpl*.class" />
<include name="org/apache/commons/logging/impl/WeakHashtable*.class" />
@@ -492,7 +514,7 @@
<jar jarfile="${build.home}/${adapters.jar.name}"
basedir="${build.home}/classes"
- manifest="${build.home}/conf/MANIFEST.MF">
+ manifest="${build.home}/conf/adapters/MANIFEST.MF">
<include name="org/apache/commons/logging/impl/**.class" />
<include name="META-INF/LICENSE.txt"/>
<include name="META-INF/NOTICE.txt"/>
@@ -594,7 +616,7 @@
</copy>
<jar jarfile="${build.home}/commons-${component.name}-tests.jar"
basedir="${build.home}/tests"
- manifest="${build.home}/conf/MANIFEST.MF">
+ manifest="${build.home}/conf/tests/MANIFEST.MF">
<exclude name="org/apache/commons/logging/Wrapper.class"/>
<exclude name="org/apache/commons/logging/jdk14/TestHandler.class"
if="jdk.1.4.present"/>
--- commons-logging-1.2-src/src/conf/MANIFEST.MF 2014-07-05 20:11:36.000000000 +0200
+++ commons-logging-1.2-src/src/conf/MANIFEST.MF 2019-01-28 13:37:10.333359706 +0100
@@ -6,7 +6,7 @@
Implementation-Vendor-Id: org.apache
Specification-Title: Commons Logging
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-SymbolicName: org.apache.commons.logging
+Bundle-SymbolicName: org.apache.commons.logging@bsn-extension@
X-Compile-Target-JDK: 1.2
Implementation-Version: 1.2
Specification-Vendor: The Apache Software Foundation