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