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