409410
# Copyright (c) 2000-2008, JPackage Project
409410
# All rights reserved.
409410
#
409410
# Redistribution and use in source and binary forms, with or without
409410
# modification, are permitted provided that the following conditions
409410
# are met:
409410
#
409410
# 1. Redistributions of source code must retain the above copyright
409410
#    notice, this list of conditions and the following disclaimer.
409410
# 2. Redistributions in binary form must reproduce the above copyright
409410
#    notice, this list of conditions and the following disclaimer in the
409410
#    documentation and/or other materials provided with the
409410
#    distribution.
409410
# 3. Neither the name of the JPackage Project nor the names of its
409410
#    contributors may be used to endorse or promote products derived
409410
#    from this software without specific prior written permission.
409410
#
409410
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
409410
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
409410
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
409410
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
409410
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
409410
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
409410
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
409410
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
409410
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
409410
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
409410
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
409410
#
409410
409410
Name:           aqute-bnd
409410
Version:        0.0.363
409410
Release:        11%{?dist}
409410
Summary:        BND Tool
409410
License:        ASL 2.0
409410
Group:          Development/Tools
409410
URL:            http://www.aQute.biz/Code/Bnd
409410
409410
# NOTE : sources for 0.0.363 are no longer available
409410
# The following links would work for 0.0.370-0.0.401 version range, but
409410
# we need to stay by 0.0.363 to minimize problems during the 1.43.0 introduction
409410
Source0:        http://www.aqute.biz/repo/biz/aQute/bnd/%{version}/bnd-%{version}.jar
409410
Source1:        http://www.aqute.biz/repo/biz/aQute/bnd/%{version}/bnd-%{version}.pom
409410
Source2:        aqute-service.tar.gz
409410
409410
Patch0:         0001-Port-to-Ant-1.9.patch
409410
409410
BuildArch:      noarch
409410
409410
BuildRequires:  jpackage-utils
409410
BuildRequires:  java-devel
409410
BuildRequires:  ant
409410
409410
Requires:       java
409410
409410
%description
409410
The bnd tool helps you create and diagnose OSGi R4 bundles.
409410
The key functions are:
409410
- Show the manifest and JAR contents of a bundle
409410
- Wrap a JAR so that it becomes a bundle
409410
- Create a Bundle from a specification and a class path
409410
- Verify the validity of the manifest entries
409410
The tool is capable of acting as:
409410
- Command line tool
409410
- File format
409410
- Directives
409410
- Use of macros
409410
409410
%package javadoc
409410
Requires:       jpackage-utils
409410
Summary:        Javadoc for %{name}
409410
Group:          Documentation
409410
409410
%description javadoc
409410
Javadoc for %{name}.
409410
409410
%prep
409410
%setup -q -c
409410
%patch0 -p1
409410
409410
mkdir -p target/site/apidocs/
409410
mkdir -p target/classes/
409410
mkdir -p src/main/
409410
mv OSGI-OPT/src src/main/java
409410
pushd src/main/java
409410
tar xfs %{SOURCE2}
409410
popd
409410
sed -i "s|import aQute.lib.filter.*;||g" src/main/java/aQute/bnd/make/ComponentDef.java
409410
sed -i "s|import aQute.lib.filter.*;||g" src/main/java/aQute/bnd/make/ServiceComponent.java
409410
409410
# get rid of eclipse plugins which are not usable anyway and complicate
409410
# things
409410
rm -rf src/main/java/aQute/bnd/annotation/Test.java \
409410
       src/main/java/aQute/bnd/{classpath,jareditor,junit,launch,plugin} \
409410
       aQute/bnd/classpath/messages.properties
409410
409410
# remove bundled stuff
409410
for f in $(find aQute/ -type f -name "*.class"); do
409410
    rm -f $f
409410
done
409410
409410
# Convert CR+LF to LF
409410
sed -i "s|\r||g" LICENSE
409410
409410
%build
409410
export LANG=en_US.utf8
409410
export OPT_JAR_LIST=:
409410
export CLASSPATH=$(build-classpath ant)
409410
409410
%{javac} -d target/classes -target 1.5 -source 1.5 $(find src/main/java -type f -name "*.java")
409410
%{javadoc} -d target/site/apidocs -sourcepath src/main/java aQute.lib.header aQute.lib.osgi aQute.lib.qtokens aQute.lib.filter
409410
cp -p LICENSE maven-dependencies.txt plugin.xml pom.xml target/classes
409410
for f in $(find aQute/ -type f -not -name "*.class"); do
409410
    cp -p $f target/classes/$f
409410
done
409410
pushd target/classes
409410
%{jar} cmf ../../META-INF/MANIFEST.MF ../%{name}-%{version}.jar *
409410
popd
409410
409410
%install
409410
# jars
409410
install -Dpm 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
409410
409410
# pom
409410
install -Dm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
409410
409410
# javadoc
409410
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
409410
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
409410
409410
%add_maven_depmap JPP-%{name}.pom %{name}.jar
409410
409410
%files
409410
%doc LICENSE
409410
%{_javadir}/%{name}.jar
409410
%{_mavenpomdir}/JPP-%{name}.pom
409410
%{_mavendepmapfragdir}/%{name}
409410
409410
%files javadoc
409410
%doc LICENSE
409410
%{_javadocdir}/%{name}
409410
409410
%changelog
409410
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.0.363-11
409410
- Mass rebuild 2013-12-27
409410
409410
* Thu Sep 19 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.0.363-10
409410
- Add patch for compatibility with Ant 1.9
409410
409410
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.0.363-9
409410
- Rebuild to regenerate API documentation
409410
- Resolves: CVE-2013-1571
409410
409410
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.363-8
409410
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
409410
409410
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.363-7
409410
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
409410
409410
* Wed Apr 25 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.0.363-6
409410
- Get rid of unusable eclipse plugins to simplify dependencies
409410
409410
* Fri Mar 02 2012 Jaromir Capik <jcapik@redhat.com> - 0.0.363-5
409410
- Fixing build failures on f16 and later
409410
409410
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.363-4
409410
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
409410
409410
* Thu Sep 22 2011 Jaromir Capik <jcapik@redhat.com> - 0.0.363-3
409410
- Resurrection of bundled non-class files
409410
409410
* Thu Sep 22 2011 Jaromir Capik <jcapik@redhat.com> - 0.0.363-2
409410
- Bundled classes removed
409410
- jpackage-utils dependency added to the javadoc subpackage
409410
409410
* Wed Sep 21 2011 Jaromir Capik <jcapik@redhat.com> - 0.0.363-1
409410
- Initial version (cloned from aqute-bndlib 0.0.363)