Andrew Overholt dfa8221
# Copyright (c) 2000-2007, JPackage Project
Matt Wringe 4c56714
# All rights reserved.
Matt Wringe 4c56714
#
Matt Wringe 4c56714
# Redistribution and use in source and binary forms, with or without
Matt Wringe 4c56714
# modification, are permitted provided that the following conditions
Matt Wringe 4c56714
# are met:
Matt Wringe 4c56714
#
Matt Wringe 4c56714
# 1. Redistributions of source code must retain the above copyright
Matt Wringe 4c56714
#    notice, this list of conditions and the following disclaimer.
Matt Wringe 4c56714
# 2. Redistributions in binary form must reproduce the above copyright
Matt Wringe 4c56714
#    notice, this list of conditions and the following disclaimer in the
Matt Wringe 4c56714
#    documentation and/or other materials provided with the
Matt Wringe 4c56714
#    distribution.
Matt Wringe 4c56714
# 3. Neither the name of the JPackage Project nor the names of its
Matt Wringe 4c56714
#    contributors may be used to endorse or promote products derived
Matt Wringe 4c56714
#    from this software without specific prior written permission.
Matt Wringe 4c56714
#
Matt Wringe 4c56714
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Matt Wringe 4c56714
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Matt Wringe 4c56714
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Matt Wringe 4c56714
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Matt Wringe 4c56714
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Matt Wringe 4c56714
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Matt Wringe 4c56714
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Matt Wringe 4c56714
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Matt Wringe 4c56714
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Matt Wringe 4c56714
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Matt Wringe 4c56714
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Matt Wringe 4c56714
#
Matt Wringe 4c56714
Andrew Overholt dfa8221
%define with_maven 0
Matt Wringe 4c56714
Andrew Overholt dfa8221
%define parent plexus
Andrew Overholt dfa8221
%define subname utils
Matt Wringe 4c56714
Matt Wringe 4c56714
Name:           plexus-utils
Andrew Overholt dfa8221
Version:        1.4.5
Andrew Overholt dfa8221
Release:        1.2%{?dist}
Matt Wringe 4c56714
Summary:        Plexus Common Utilities
ffc0282
License:        ASL 1.1 and ASL 2.0 and MIT
Andrew Overholt dfa8221
Group:          Development/Libraries
Matt Wringe 4c56714
URL:            http://plexus.codehaus.org/
Andrew Overholt dfa8221
Source0:        plexus-utils-%{version}.tar.gz
Andrew Overholt dfa8221
# svn export http://svn.codehaus.org/plexus/plexus-utils/tags/plexus-utils-1.4.5/
Andrew Overholt dfa8221
Source1:        plexus-utils-1.4.5-build.xml
Matt Wringe 4c56714
Matt Wringe 4c56714
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Matt Wringe 4c56714
Matt Wringe 4c56714
BuildArch:      noarch
Matt Wringe 4c56714
BuildRequires:  ant
Matt Wringe 4c56714
BuildRequires:  jpackage-utils >= 0:1.6
Matt Wringe 4c56714
Requires:       jpackage-utils
Matt Wringe 4c56714
Requires(postun): jpackage-utils
Matt Wringe 4c56714
%if %{with_maven}
Andrew Overholt dfa8221
BuildRequires:  maven2 >= 0:2.0.4
Andrew Overholt dfa8221
BuildRequires:  maven2-plugin-surefire
Matt Wringe 4c56714
%endif
Matt Wringe 4c56714
Andrew Overholt dfa8221
Requires(post):    jpackage-utils >= 0:1.7.2
Andrew Overholt dfa8221
Requires(postun):  jpackage-utils >= 0:1.7.2
Andrew Overholt dfa8221
Matt Wringe 4c56714
%description
Andrew Overholt dfa8221
The Plexus project seeks to create end-to-end developer tools for
Andrew Overholt dfa8221
writing applications. At the core is the container, which can be
Andrew Overholt dfa8221
embedded or for a full scale application server. There are many
Andrew Overholt dfa8221
reusable components for hibernate, form processing, jndi, i18n,
Andrew Overholt dfa8221
velocity, etc. Plexus also includes an application server which
Matt Wringe 4c56714
is like a J2EE application server, without all the baggage.
Matt Wringe 4c56714
Matt Wringe 4c56714
%package javadoc
Matt Wringe 4c56714
Summary:          Javadoc for %{name}
Matt Wringe 4c56714
Group:            Documentation
Matt Wringe 4c56714
Requires:         jpackage-utils
Matt Wringe 4c56714
Requires(postun): jpackage-utils
Matt Wringe 4c56714
Matt Wringe 4c56714
%description javadoc
Matt Wringe 4c56714
Javadoc for %{name}.
Matt Wringe 4c56714
Matt Wringe 4c56714
%prep
Andrew Overholt dfa8221
%setup -q -n %{name}-%{version}
Matt Wringe 4c56714
cp %{SOURCE1} build.xml
Matt Wringe 4c56714
Matt Wringe 4c56714
# Disable file utils test cases. See:
Matt Wringe 4c56714
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=228419
Matt Wringe 4c56714
rm -f src/test/java/org/codehaus/plexus/util/FileUtilsTest.java
Matt Wringe 4c56714
Matt Wringe 4c56714
# TODO: Find out why this test keeps freezing
Matt Wringe 4c56714
rm -f src/test/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolatorTest.java
Matt Wringe 4c56714
Matt Wringe 4c56714
%build
Matt Wringe 4c56714
%if %{with_maven}
Andrew Overholt dfa8221
export MAVEN_REPO_LOCAL=`pwd`/.m2/repository
Matt Wringe 4c56714
Andrew Overholt dfa8221
mvn-jpp -e \
Andrew Overholt dfa8221
    -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
Andrew Overholt dfa8221
    install javadoc:javadoc
Matt Wringe 4c56714
Matt Wringe 4c56714
%else
Andrew Overholt dfa8221
export CLASSPATH=target/classes:target/test-classes
Andrew Overholt dfa8221
ant -Dbuild.sysclasspath=only jar javadoc
Matt Wringe 4c56714
%endif
Matt Wringe 4c56714
Matt Wringe 4c56714
%install
Matt Wringe 4c56714
rm -rf $RPM_BUILD_ROOT
Matt Wringe 4c56714
# jars
Matt Wringe 4c56714
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/plexus
Matt Wringe 4c56714
install -pm 644 target/%{name}-%{version}.jar \
Matt Wringe 4c56714
  $RPM_BUILD_ROOT%{_javadir}/plexus/utils-%{version}.jar
Andrew Overholt dfa8221
%add_to_maven_depmap org.codehaus.plexus %{name} %{version} JPP/%{parent} %{subname}
Matt Wringe 4c56714
(cd $RPM_BUILD_ROOT%{_javadir}/plexus && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
Andrew Overholt dfa8221
Andrew Overholt dfa8221
# pom
Andrew Overholt dfa8221
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
Andrew Overholt dfa8221
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{parent}-%{subname}.pom
Andrew Overholt dfa8221
Matt Wringe 4c56714
# javadoc
Matt Wringe 4c56714
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
Andrew Overholt dfa8221
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
Matt Wringe 4c56714
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
Matt Wringe 4c56714
Matt Wringe 4c56714
%clean
Matt Wringe 4c56714
rm -rf $RPM_BUILD_ROOT
Matt Wringe 4c56714
Andrew Overholt dfa8221
%post
Andrew Overholt dfa8221
%update_maven_depmap
Andrew Overholt dfa8221
Andrew Overholt dfa8221
%postun
Andrew Overholt dfa8221
%update_maven_depmap
Andrew Overholt dfa8221
Matt Wringe 4c56714
%files
Matt Wringe 4c56714
%defattr(-,root,root,-)
Matt Wringe 4c56714
%{_javadir}/*
Andrew Overholt dfa8221
%{_datadir}/maven2
Andrew Overholt dfa8221
%{_mavendepmapfragdir}
Matt Wringe 4c56714
Matt Wringe 4c56714
%files javadoc
Matt Wringe 4c56714
%defattr(-,root,root,-)
Matt Wringe 4c56714
%doc %{_javadocdir}/%{name}-%{version}
Matt Wringe 4c56714
%doc %{_javadocdir}/%{name}
Matt Wringe 4c56714
Matt Wringe 4c56714
%changelog
Andrew Overholt dfa8221
* Wed Aug 19 2009 Andrew Overholt <overholt@redhat.com> 1.4.5-1.2
Andrew Overholt dfa8221
- Update to 1.4.5 from JPackage and Deepak Bhole
Andrew Overholt dfa8221
- Remove gcj bits
Andrew Overholt dfa8221
9fb0601
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2-4.2
9fb0601
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
9fb0601
a13eb81
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2-3.2
a13eb81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a13eb81
ffc0282
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.2-2.2
ffc0282
- fix license tag
ffc0282
- drop repotag
ffc0282
Andrew Overholt dfa8221
* Thu Aug 23 2007 Ralph Apel <r.apel@r-apel.de> - 0:1.4.5-1jpp
Andrew Overholt dfa8221
- Upgrade to 1.4.5
Andrew Overholt dfa8221
- Now build with maven2 by default
Andrew Overholt dfa8221
Andrew Overholt dfa8221
* Wed Mar 21 2007 Ralph Apel <r.apel@r-apel.de> - 0:1.2-2jpp
Andrew Overholt dfa8221
- Fix build classpath
Andrew Overholt dfa8221
- Optionally build with maven2
Andrew Overholt dfa8221
- Add gcj_support option
Andrew Overholt dfa8221
Matt Wringe 4c56714
* Mon Feb 20 2007 Deepak Bhole <dbhole@redhat.com> - 0:1.2-2jpp.1.fc7
Matt Wringe 4c56714
- Fix spec per Fedora guidelines
Matt Wringe 4c56714
Matt Wringe 4c56714
* Fri Jun 16 2006 Ralph Apel <r.apel@r-apel.de> - 0:1.2-1jpp
Matt Wringe 4c56714
- Upgrade to 1.2
Matt Wringe 4c56714
Matt Wringe 4c56714
* Wed Jan 04 2006 Fernando Nasser <fnasser@redhat.com> - 0:1.0.4-2jpp
Matt Wringe 4c56714
- First JPP 1.7 build
Matt Wringe 4c56714
Matt Wringe 4c56714
* Mon Nov 07 2005 Ralph Apel <r.apel at r-apel.de> - 0:1.0.4-1jpp
Matt Wringe 4c56714
- First JPackage build