abc2bc
Name:           aqute-bnd
abc2bc
Version:        4.3.0
abc2bc
Release:        2%{?dist}
abc2bc
Summary:        BND Tool
abc2bc
# Part of jpm is under BSD, but jpm is not included in binary RPM
abc2bc
License:        ASL 2.0
abc2bc
URL:            http://bnd.bndtools.org/
abc2bc
BuildArch:      noarch
abc2bc
abc2bc
Source0:        %{version}.REL.tar.gz
abc2bc
# removes bundled jars from upstream tarball
abc2bc
# run as:
abc2bc
# ./repack-tarball.sh
abc2bc
Source1:        repack-tarball.sh
abc2bc
abc2bc
Source2:        parent.pom
abc2bc
Source3:        https://repo1.maven.org/maven2/biz/aQute/bnd/aQute.libg/%{version}/aQute.libg-%{version}.pom
abc2bc
Source4:        https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd/%{version}/biz.aQute.bnd-%{version}.pom
abc2bc
Source5:        https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/%{version}/biz.aQute.bndlib-%{version}.pom
abc2bc
Source6:        https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.annotation/%{version}/biz.aQute.bnd.annotation-%{version}.pom
abc2bc
abc2bc
Patch0:         0001-Disable-removed-commands.patch
abc2bc
Patch1:         0002-Fix-ant-compatibility.patch
abc2bc
Patch2:         0003-Port-to-OSGI-7.0.0.patch
abc2bc
abc2bc
BuildRequires:  maven-local
abc2bc
BuildRequires:  mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
abc2bc
BuildRequires:  mvn(org.apache.maven.plugins:maven-plugin-plugin)
abc2bc
BuildRequires:  mvn(org.apache.maven.plugins:maven-source-plugin)
abc2bc
BuildRequires:  mvn(org.apache.maven.shared:maven-mapping)
abc2bc
BuildRequires:  mvn(org.apache.maven:maven-artifact)
abc2bc
BuildRequires:  mvn(org.apache.maven:maven-compat)
abc2bc
BuildRequires:  mvn(org.apache.maven:maven-core)
abc2bc
BuildRequires:  mvn(org.apache.maven:maven-plugin-api)
abc2bc
BuildRequires:  mvn(org.eclipse.aether:aether-api)
abc2bc
BuildRequires:  mvn(org.osgi:osgi.annotation)
abc2bc
BuildRequires:  mvn(org.osgi:osgi.cmpn)
abc2bc
BuildRequires:  mvn(org.osgi:osgi.core)
abc2bc
BuildRequires:  mvn(org.slf4j:slf4j-api)
abc2bc
BuildRequires:  mvn(org.slf4j:slf4j-simple)
abc2bc
BuildRequires:  mvn(org.sonatype.plexus:plexus-build-api)
abc2bc
abc2bc
# Explicit javapackages-tools requires since bnd script uses
abc2bc
# /usr/share/java-utils/java-functions
abc2bc
Requires:       javapackages-tools
abc2bc
abc2bc
%description
abc2bc
The bnd tool helps you create and diagnose OSGi bundles.
abc2bc
The key functions are:
abc2bc
- Show the manifest and JAR contents of a bundle
abc2bc
- Wrap a JAR so that it becomes a bundle
abc2bc
- Create a Bundle from a specification and a class path
abc2bc
- Verify the validity of the manifest entries
abc2bc
The tool is capable of acting as:
abc2bc
- Command line tool
abc2bc
- File format
abc2bc
- Directives
abc2bc
- Use of macros
abc2bc
abc2bc
%package -n aqute-bndlib
abc2bc
Summary:        BND library
abc2bc
abc2bc
%description -n aqute-bndlib
abc2bc
%{summary}.
abc2bc
abc2bc
%package -n bnd-maven-plugin
abc2bc
Summary:        BND Maven plugin
abc2bc
abc2bc
%description -n bnd-maven-plugin
abc2bc
%{summary}.
abc2bc
abc2bc
%package javadoc
abc2bc
Summary:        Javadoc for %{name}
abc2bc
abc2bc
%description javadoc
abc2bc
API documentation for %{name}.
abc2bc
abc2bc
%prep
abc2bc
%setup -q -n bnd-%{version}.REL
abc2bc
abc2bc
rm gradlew*
abc2bc
abc2bc
%patch0 -p1
abc2bc
%patch1 -p1
abc2bc
%patch2 -p1
abc2bc
abc2bc
# the commands pull in more dependencies than we want (felix-resolver, jetty)
abc2bc
rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand}.java
abc2bc
abc2bc
sed 's/@VERSION@/%{version}/' %SOURCE2 > pom.xml
abc2bc
sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd.info
abc2bc
abc2bc
# libg
abc2bc
pushd aQute.libg
abc2bc
cp -p %{SOURCE3} pom.xml
abc2bc
%pom_add_parent biz.aQute.bnd:parent:%{version}
abc2bc
%pom_remove_dep :org.osgi.util.function
abc2bc
%pom_remove_dep :org.osgi.util.promise
abc2bc
%pom_add_dep org.osgi:osgi.core
abc2bc
%pom_add_dep org.osgi:osgi.cmpn
abc2bc
popd
abc2bc
abc2bc
# bndlib.annotations
abc2bc
pushd biz.aQute.bnd.annotation
abc2bc
cp -p %{SOURCE6} pom.xml
abc2bc
%pom_add_parent biz.aQute.bnd:parent:%{version}
abc2bc
%pom_add_dep org.osgi:osgi.core
abc2bc
%pom_add_dep org.osgi:osgi.cmpn
abc2bc
popd
abc2bc
abc2bc
# bndlib
abc2bc
pushd biz.aQute.bndlib
abc2bc
cp -p %{SOURCE5} pom.xml
abc2bc
%pom_add_parent biz.aQute.bnd:parent:%{version}
abc2bc
%pom_remove_dep :org.osgi.util.function
abc2bc
%pom_remove_dep :org.osgi.util.promise
abc2bc
%pom_add_dep org.osgi:osgi.core
abc2bc
%pom_add_dep org.osgi:osgi.cmpn
abc2bc
%pom_add_dep biz.aQute.bnd:aQute.libg:%{version}
abc2bc
%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version}
abc2bc
popd
abc2bc
abc2bc
# bnd
abc2bc
cp -r biz.aQute.bnd.exporters/src/aQute/bnd/exporter biz.aQute.bnd/src/aQute/bnd/
abc2bc
pushd biz.aQute.bnd
abc2bc
cp -p %{SOURCE4} pom.xml
abc2bc
%pom_remove_dep :biz.aQute.resolve
abc2bc
%pom_remove_dep :biz.aQute.repository
abc2bc
%pom_remove_dep :biz.aQute.bnd.exporters
abc2bc
%pom_remove_dep :biz.aQute.bnd.reporter
abc2bc
%pom_remove_dep :biz.aQute.remote.api
abc2bc
%pom_remove_dep :snakeyaml
abc2bc
%pom_remove_dep :jline
abc2bc
popd
abc2bc
abc2bc
# maven-plugins
abc2bc
cp -r biz.aQute.bnd.maven/src/aQute/bnd/maven/lib/configuration maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/lib
abc2bc
pushd maven
abc2bc
%pom_remove_dep -r :biz.aQute.bnd.maven
abc2bc
# Unavailable reactor dependency - org.osgi.impl.bundle.repoindex.cli
abc2bc
%pom_disable_module bnd-indexer-maven-plugin
abc2bc
# Requires unbuilt parts of bnd
abc2bc
%pom_disable_module bnd-export-maven-plugin
abc2bc
%pom_disable_module bnd-reporter-maven-plugin
abc2bc
%pom_disable_module bnd-resolver-maven-plugin
abc2bc
%pom_disable_module bnd-run-maven-plugin
abc2bc
%pom_disable_module bnd-testing-maven-plugin
abc2bc
# Integration tests require Internet access
abc2bc
%pom_remove_plugin -r :maven-invoker-plugin
abc2bc
%pom_remove_plugin -r :maven-javadoc-plugin
abc2bc
abc2bc
%pom_remove_plugin -r :flatten-maven-plugin
abc2bc
popd
abc2bc
abc2bc
%mvn_alias biz.aQute.bnd:biz.aQute.bnd :bnd biz.aQute:bnd
abc2bc
%mvn_alias biz.aQute.bnd:biz.aQute.bndlib :bndlib biz.aQute:bndlib
abc2bc
abc2bc
%mvn_package biz.aQute.bnd:biz.aQute.bndlib bndlib
abc2bc
%mvn_package biz.aQute.bnd:biz.aQute.bnd.annotation bndlib
abc2bc
%mvn_package biz.aQute.bnd:aQute.libg bndlib
abc2bc
%mvn_package biz.aQute.bnd:bnd-maven-plugin maven
abc2bc
%mvn_package biz.aQute.bnd:bnd-baseline-maven-plugin maven
abc2bc
%mvn_package biz.aQute.bnd:parent __noinstall
abc2bc
%mvn_package biz.aQute.bnd:bnd-plugin-parent __noinstall
abc2bc
abc2bc
%build
abc2bc
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
abc2bc
abc2bc
%install
abc2bc
%mvn_install
abc2bc
abc2bc
install -d -m 755 %{buildroot}%{_sysconfdir}/ant.d
abc2bc
echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium" >%{buildroot}%{_sysconfdir}/ant.d/%{name}
abc2bc
abc2bc
%jpackage_script aQute.bnd.main.bnd "" "" aqute-bnd:slf4j/slf4j-api:slf4j/slf4j-simple:osgi-annotation:osgi-core:osgi-compendium bnd 1
abc2bc
abc2bc
%files -f .mfiles
abc2bc
%license LICENSE
abc2bc
%{_bindir}/bnd
abc2bc
%config(noreplace) %{_sysconfdir}/ant.d/*
abc2bc
abc2bc
%files -n aqute-bndlib -f .mfiles-bndlib
abc2bc
%license LICENSE
abc2bc
abc2bc
%files -n bnd-maven-plugin -f .mfiles-maven
abc2bc
abc2bc
%files javadoc -f .mfiles-javadoc
abc2bc
%license LICENSE
abc2bc
abc2bc
%changelog
abc2bc
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3.0-2
abc2bc
- Mass rebuild for javapackages-tools 201902
abc2bc
abc2bc
* Wed Oct 09 2019 Marian Koncek <mkoncek@redhat.com> - 4.3.0-1
abc2bc
- Update to upstream version 4.3.0
abc2bc
abc2bc
* Thu Jul 04 2019 Marian Koncek <mkoncek@redhat.com> - 4.2.0-1
abc2bc
- Update to upstream version 4.2.0
abc2bc
abc2bc
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5.0-6
abc2bc
- Mass rebuild for javapackages-tools 201901
abc2bc
abc2bc
* Fri Apr 12 2019 Marian Koncek <mkoncek@redhat.com> - 3.5.0-5
abc2bc
- Port to OSGI 7.0.0
abc2bc
abc2bc
* Mon Jul 30 2018 Severin Gehwolf <sgehwolf@redhat.com> - 3.5.0-4
abc2bc
- Add requirement on javapackages-tools for bnd script.
abc2bc
abc2bc
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-3
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
abc2bc
abc2bc
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-2
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
abc2bc
abc2bc
* Fri Oct 13 2017 Michael Simacek <msimacek@redhat.com> - 3.5.0-1
abc2bc
- Update to upstream version 3.5.0
abc2bc
abc2bc
* Mon Oct 02 2017 Troy Dawson <tdawson@redhat.com> - 3.4.0-3
abc2bc
- Cleanup spec file conditionals
abc2bc
abc2bc
* Sat Sep 23 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.4.0-2
abc2bc
- Remove unneeded javadoc plugin
abc2bc
abc2bc
* Tue Sep 12 2017 Michael Simacek <msimacek@redhat.com> - 3.4.0-1
abc2bc
- Update to upstream version 3.4.0
abc2bc
abc2bc
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-7
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
abc2bc
abc2bc
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-6
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
abc2bc
abc2bc
* Mon Oct 10 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.3.0-5
abc2bc
- Don't use legacy Ant artifact coordinates
abc2bc
abc2bc
* Mon Oct 10 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.3.0-4
abc2bc
- Allow conditional builds without Ant tasks
abc2bc
abc2bc
* Mon Oct 10 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.3.0-3
abc2bc
- Allow conditional builds without Maven plugin
abc2bc
abc2bc
* Thu Oct 06 2016 Michael Simacek <msimacek@redhat.com> - 3.3.0-2
abc2bc
- Fix ant.d classpath
abc2bc
abc2bc
* Thu Sep 29 2016 Michael Simacek <msimacek@redhat.com> - 3.3.0-1
abc2bc
- Update to upstream version 3.3.0
abc2bc
- Build against osgi-{core,compendium}
abc2bc
abc2bc
* Tue Sep 27 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.0-5
abc2bc
- Add felix-scr-annotations to classpath
abc2bc
abc2bc
* Mon Sep 26 2016 Michael Simacek <msimacek@redhat.com> - 3.2.0-4
abc2bc
- Use felix-annotations
abc2bc
abc2bc
* Wed Sep 14 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.0-3
abc2bc
- Build and install Maven plugins
abc2bc
- Resolves: rhbz#1375904
abc2bc
abc2bc
* Wed Jun  1 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.0-2
abc2bc
- Install ant.d config files
abc2bc
abc2bc
* Tue May 24 2016 Michael Simacek <msimacek@redhat.com> - 3.2.0-1
abc2bc
- Update to upstream version 3.2.0
abc2bc
abc2bc
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-3
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
abc2bc
abc2bc
* Fri Jul 17 2015 Michael Simacek <msimacek@redhat.com> - 2.4.1-2
abc2bc
- Fix Tool header generation
abc2bc
abc2bc
* Wed Jul 08 2015 Michael Simacek <msimacek@redhat.com> - 2.4.1-1
abc2bc
- Update to upstream version 2.4.1
abc2bc
abc2bc
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.363-16
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
abc2bc
abc2bc
* Thu May 14 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.0.363-15
abc2bc
- Disable javadoc doclint
abc2bc
abc2bc
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.363-14
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
abc2bc
abc2bc
* Thu May 29 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.0.363-13
abc2bc
- Use .mfiles generated during build
abc2bc
abc2bc
* Fri May 09 2014 Jaromir Capik <jcapik@redhat.com> - 0.0.363-12
abc2bc
- Fixing ambiguous base64 class
abc2bc
abc2bc
* Fri May 09 2014 Gil Cattaneo <puntogil@libero.it> 0.0.363-11
abc2bc
- fix rhbz#991985
abc2bc
- add source compatibility with ant 1.9
abc2bc
- remove and rebuild from source aQute.runtime.jar
abc2bc
- update to current packaging guidelines
abc2bc
abc2bc
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.0.363-10
abc2bc
- Use Requires: java-headless rebuild (#1067528)
abc2bc
abc2bc
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.363-9
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
abc2bc
abc2bc
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.363-8
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
abc2bc
abc2bc
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.363-7
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
abc2bc
abc2bc
* Wed Apr 25 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.0.363-6
abc2bc
- Get rid of unusable eclipse plugins to simplify dependencies
abc2bc
abc2bc
* Fri Mar 02 2012 Jaromir Capik <jcapik@redhat.com> - 0.0.363-5
abc2bc
- Fixing build failures on f16 and later
abc2bc
abc2bc
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.363-4
abc2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
abc2bc
abc2bc
* Thu Sep 22 2011 Jaromir Capik <jcapik@redhat.com> - 0.0.363-3
abc2bc
- Resurrection of bundled non-class files
abc2bc
abc2bc
* Thu Sep 22 2011 Jaromir Capik <jcapik@redhat.com> - 0.0.363-2
abc2bc
- Bundled classes removed
abc2bc
- jpackage-utils dependency added to the javadoc subpackage
abc2bc
abc2bc
* Wed Sep 21 2011 Jaromir Capik <jcapik@redhat.com> - 0.0.363-1
abc2bc
- Initial version (cloned from aqute-bndlib 0.0.363)