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