Blame SPECS/aqute-bnd.spec

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