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