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