# Copyright (c) 2000-2008, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
Name: backport-util-concurrent
Summary: Backport of java.util.concurrent API, introduced in Java 5.0
Version: 3.1
Release: 9
URL: http://backport-jsr166.sourceforge.net
License: Public Domain
Group: Development/Libraries
Source0: http://downloads.sourceforge.net/backport-jsr166/%{name}-%{version}-src.tar.gz
Source1: http://repo1.maven.org/maven2/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.pom
BuildRequires: jpackage-utils >= 0:1.7.2
BuildRequires: java-devel = 0:1.5.0
BuildRequires: ant >= 0:1.6.5
BuildRequires: junit
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
Requires: java >= 0:1.5.0
Requires: jpackage-utils
Requires(post): jpackage-utils >= 0:1.7.2
Requires(postun): jpackage-utils >= 0:1.7.2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
This package is the backport of java.util.concurrent API, introduced in
Java 5.0, to Java 1.4. The backport is based on public-domain sources
from the JSR 166 CVS repository, and the dl.util.concurrent package.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n %{name}-%{version}-src
find . -name '*.?ar' | xargs rm -f
build-jar-repository -s -p external \
junit
%build
unset CLASSPATH
ant dist test
%install
rm -rf $RPM_BUILD_ROOT
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 backport-util-concurrent-dist/%{name}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -s %{name}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}.jar
# pom
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr backport-util-concurrent-dist/doc/api/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(-,root,root,-)
%doc license.html
%doc README.html
%{_javadir}/*.jar
%{_datadir}/maven2
%{_mavendepmapfragdir}/%{name}
%files javadoc
%defattr(-,root,root,-)
%doc license.html
%{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}
%changelog
* Tue Aug 21 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1-9
- Don't own _mavenfragdir
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Jul 12 2010 Andrew Overholt <overholt@redhat.com> 3.1-5
- Ensure license file is also in -javadoc sub-package.
* Thu Aug 27 2009 Andrew Overholt <overholt@redhat.com> 3.1-4
- Fix Source0 URL
* Mon Aug 24 2009 Andrew Overholt <overholt@redhat.com> 3.1-3
- Clarify Source0 URl
- Add jpackage-utils Requirement
- Fix %%files defattr
- Fix javadoc sub-package description
* Wed Aug 19 2009 Andrew Overholt <overholt@redhat.com> 3.1-2
- Update URL, Group, License
- Remove explicit "jpp" from Release
- Add doc files
- Remove javadoc ghost stuff
* Wed Mar 05 2008 Deepak Bhole <dbhole@redhat.com> 3.1-1jpp
- Import from JPackage + modify per Fedora requirements
* Fri Feb 08 2008 Ralph Apel <r.apel@r-apel.de> 0:3.1-1jpp
- Upgrade to 3.1
- Always test
* Wed Jun 14 2006 Ralph Apel <r.apel@r-apel.de> 0:2.1-1jpp
- Upgrade to 2.1 - no licensing issues any more
- Create option --with tests to optionally run tck
* Thu Jan 19 2006 Deepak Bhole <dbhole@redhat.com> 0:2.0.01-1jpp
- Initial build.