From b0e05d232a1084e915cfc5291ca864b8b79a61a561aa59667d5f334e5289c34e Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 16 Mar 2022 12:50:50 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/felix-shell?expand=0&rev=9 --- felix-shell.changes | 7 ++ felix-shell.spec | 45 ++++++---- org.apache.felix.shell-build.xml | 138 +++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+), 16 deletions(-) create mode 100644 org.apache.felix.shell-build.xml diff --git a/felix-shell.changes b/felix-shell.changes index 79b853e..3f40481 100644 --- a/felix-shell.changes +++ b/felix-shell.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 16 12:49:38 UTC 2022 - Fridrich Strba + +- Rewrite the build system to ant so that we can eventually avoid + build cycles with maven-plugin-bundle built against + felix-bundlerepository + ------------------------------------------------------------------- Tue Mar 31 06:10:51 UTC 2020 - Fridrich Strba diff --git a/felix-shell.spec b/felix-shell.spec index e0da481..6baa650 100644 --- a/felix-shell.spec +++ b/felix-shell.spec @@ -1,7 +1,7 @@ # # spec file for package felix-shell # -# Copyright (c) 2020 SUSE LLC +# 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 @@ -25,12 +25,14 @@ License: Apache-2.0 Group: Development/Libraries/Java URL: https://felix.apache.org Source0: http://archive.apache.org/dist/felix/%{bundle}-%{version}-source-release.tar.gz +Source1: %{bundle}-build.xml +BuildRequires: ant BuildRequires: fdupes -BuildRequires: maven-local -BuildRequires: mvn(org.apache.felix:felix-parent:pom:) -BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) -BuildRequires: mvn(org.osgi:osgi.cmpn) -BuildRequires: mvn(org.osgi:osgi.core) +BuildRequires: javapackages-local +BuildRequires: osgi-compendium +BuildRequires: osgi-core +Requires: mvn(org.osgi:osgi.cmpn) +Requires: mvn(org.osgi:osgi.core) BuildArch: noarch %description @@ -45,6 +47,10 @@ This package contains API documentation for %{name}. %prep %setup -q -n %{bundle}-%{version} +cp %{SOURCE1} build.xml + +%pom_remove_parent +%pom_xpath_inject pom:project "org.apache.felix" %pom_remove_plugin org.codehaus.mojo:rat-maven-plugin @@ -52,25 +58,32 @@ This package contains API documentation for %{name}. %pom_change_dep :org.osgi.core org.osgi:osgi.core %pom_change_dep :org.osgi.compendium org.osgi:osgi.cmpn -%pom_add_dep junit:junit::test - -%{mvn_file} :%{bundle} "felix/%{bundle}" - %build -%{mvn_build} -f \ -%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} - -- -Dmaven.compiler.release=6 -%endif +mkdir -p lib +build-jar-repository -s lib osgi-core osgi-compendium +%ant jar javadoc %install -%mvn_install +# jar +install -d -m 755 %{buildroot}%{_javadir}/felix +install -m 644 target/%{bundle}-%{version}.jar %{buildroot}%{_javadir}/felix/%{bundle}.jar + +# pom +install -d -m 755 %{buildroot}%{_mavenpomdir}/felix +install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/felix/%{bundle}.pom +%add_maven_depmap felix/%{bundle}.pom felix/%{bundle}.jar + +# javadoc +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -r target/site/apidocs/* %{buildroot}/%{_javadocdir}/%{name} %fdupes -s %{buildroot}%{_javadocdir} %files -f .mfiles %license LICENSE NOTICE %doc DEPENDENCIES -%files javadoc -f .mfiles-javadoc +%files javadoc +%{_javadocdir}/%{name} %license LICENSE NOTICE %changelog diff --git a/org.apache.felix.shell-build.xml b/org.apache.felix.shell-build.xml new file mode 100644 index 0000000..36639bb --- /dev/null +++ b/org.apache.felix.shell-build.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +