Blame SPECS/aqute-bnd.spec

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