|
|
2fc3991 |
# Copyright (c) 2000-2005, JPackage Project
|
|
|
2fc3991 |
# All rights reserved.
|
|
|
2fc3991 |
#
|
|
|
2fc3991 |
# Redistribution and use in source and binary forms, with or without
|
|
|
2fc3991 |
# modification, are permitted provided that the following conditions
|
|
|
2fc3991 |
# are met:
|
|
|
2fc3991 |
#
|
|
|
2fc3991 |
# 1. Redistributions of source code must retain the above copyright
|
|
|
2fc3991 |
# notice, this list of conditions and the following disclaimer.
|
|
|
2fc3991 |
# 2. Redistributions in binary form must reproduce the above copyright
|
|
|
2fc3991 |
# notice, this list of conditions and the following disclaimer in the
|
|
|
2fc3991 |
# documentation and/or other materials provided with the
|
|
|
2fc3991 |
# distribution.
|
|
|
2fc3991 |
# 3. Neither the name of the JPackage Project nor the names of its
|
|
|
2fc3991 |
# contributors may be used to endorse or promote products derived
|
|
|
2fc3991 |
# from this software without specific prior written permission.
|
|
|
2fc3991 |
#
|
|
|
2fc3991 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
2fc3991 |
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
2fc3991 |
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
2fc3991 |
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
2fc3991 |
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
2fc3991 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
2fc3991 |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
2fc3991 |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
2fc3991 |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
2fc3991 |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
2fc3991 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
2fc3991 |
#
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%define _with_gcj_support 1
|
|
|
2fc3991 |
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
|
|
|
2fc3991 |
|
|
|
2fc3991 |
# If you don't want to build with maven, and use straight ant instead,
|
|
|
2fc3991 |
# give rpmbuild option '--without maven'
|
|
|
2fc3991 |
%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
|
|
|
2fc3991 |
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%define namedversion 1.0-alpha-7
|
|
|
2fc3991 |
|
|
|
2fc3991 |
Name: maven-doxia
|
|
|
2fc3991 |
Version: 1.0
|
|
|
7c9b7af |
Release: 0.1.a7.3jpp.3%{?dist}
|
|
|
2fc3991 |
Epoch: 0
|
|
|
2fc3991 |
Summary: Content generation framework
|
|
|
2fc3991 |
License: Apache Software License
|
|
|
2fc3991 |
Group: Development/Java
|
|
|
2fc3991 |
URL: http://maven.apache.org/doxia/
|
|
|
2fc3991 |
|
|
|
2fc3991 |
# svn export http://svn.apache.org/repos/asf/maven/doxia/tags/doxia-1.0-alpha-7/
|
|
|
2fc3991 |
# maven-doxia/
|
|
|
2fc3991 |
# tar czf maven-doxia-1.0.a7-src.tar.gz maven-doxia/
|
|
|
2fc3991 |
Source0: %{name}-%{version}a7.tar.gz
|
|
|
2fc3991 |
|
|
|
2fc3991 |
Source1: %{name}-decoration-model-build.xml
|
|
|
2fc3991 |
Source2: %{name}-core-build.xml
|
|
|
2fc3991 |
Source3: %{name}-sink-api-build.xml
|
|
|
2fc3991 |
Source4: %{name}-site-renderer-build.xml
|
|
|
b7e1c10 |
|
|
|
b7e1c10 |
# These files are taken from the doxia build itself, done with maven2
|
|
|
b7e1c10 |
# To regenerate, build above tarball with upstream maven
|
|
|
2fc3991 |
Source5: %{name}-autogenerated-files.tar.gz
|
|
|
2fc3991 |
|
|
|
2fc3991 |
Patch0: %{name}-1.4compile.patch
|
|
|
2fc3991 |
|
|
|
2fc3991 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%if ! %{gcj_support}
|
|
|
2fc3991 |
BuildArch: noarch
|
|
|
2fc3991 |
%endif
|
|
|
2fc3991 |
|
|
|
2fc3991 |
BuildRequires: jpackage-utils >= 0:1.7.2
|
|
|
2fc3991 |
BuildRequires: ant, ant-nodeps
|
|
|
2fc3991 |
%if %{with_maven}
|
|
|
2fc3991 |
BuildRequires: maven2 >= 0:2.0.4-9
|
|
|
2fc3991 |
BuildRequires: maven2-plugin-compiler
|
|
|
2fc3991 |
BuildRequires: maven2-plugin-install
|
|
|
2fc3991 |
BuildRequires: maven2-plugin-jar
|
|
|
2fc3991 |
BuildRequires: maven2-plugin-javadoc
|
|
|
2fc3991 |
BuildRequires: maven2-plugin-resources
|
|
|
2fc3991 |
BuildRequires: maven2-plugin-site
|
|
|
2fc3991 |
BuildRequires: maven2-plugin-surefire
|
|
|
2fc3991 |
BuildRequires: plexus-maven-plugin >= 0:1.2-2
|
|
|
2fc3991 |
BuildRequires: modello-maven-plugin >= 0:1.0-0.a8.3
|
|
|
2fc3991 |
BuildRequires: plexus-xmlrpc >= 0:1.0-0.b4.3
|
|
|
2fc3991 |
%endif
|
|
|
2fc3991 |
BuildRequires: classworlds
|
|
|
2fc3991 |
BuildRequires: jakarta-commons-collections
|
|
|
2fc3991 |
BuildRequires: jakarta-commons-logging
|
|
|
2fc3991 |
BuildRequires: jakarta-commons-validator
|
|
|
2fc3991 |
BuildRequires: junit
|
|
|
2fc3991 |
BuildRequires: oro
|
|
|
2fc3991 |
BuildRequires: plexus-container-default
|
|
|
2fc3991 |
BuildRequires: plexus-i18n
|
|
|
2fc3991 |
BuildRequires: plexus-utils
|
|
|
2fc3991 |
BuildRequires: plexus-velocity
|
|
|
2fc3991 |
BuildRequires: velocity
|
|
|
2fc3991 |
|
|
|
2fc3991 |
Requires: classworlds
|
|
|
2fc3991 |
Requires: jakarta-commons-collections
|
|
|
2fc3991 |
Requires: jakarta-commons-logging
|
|
|
2fc3991 |
Requires: jakarta-commons-validator
|
|
|
2fc3991 |
Requires: junit
|
|
|
2fc3991 |
Requires: oro
|
|
|
2fc3991 |
Requires: plexus-container-default
|
|
|
2fc3991 |
Requires: plexus-i18n
|
|
|
2fc3991 |
Requires: plexus-utils
|
|
|
2fc3991 |
Requires: plexus-velocity
|
|
|
2fc3991 |
Requires: velocity
|
|
|
2fc3991 |
|
|
|
2fc3991 |
Requires(post): jpackage-utils >= 0:1.7.2
|
|
|
2fc3991 |
Requires(postun): jpackage-utils >= 0:1.7.2
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%if %{gcj_support}
|
|
|
2fc3991 |
BuildRequires: java-gcj-compat-devel
|
|
|
2fc3991 |
Requires(post): java-gcj-compat
|
|
|
2fc3991 |
Requires(postun): java-gcj-compat
|
|
|
2fc3991 |
%endif
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%description
|
|
|
2fc3991 |
Doxia is a content generation framework which aims to provide its
|
|
|
2fc3991 |
users with powerful techniques for generating static and dynamic
|
|
|
2fc3991 |
content. Doxia can be used to generate static sites in addition to
|
|
|
2fc3991 |
being incorporated into dynamic content generation systems like blogs,
|
|
|
2fc3991 |
wikis and content management systems.
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%if %{with_maven}
|
|
|
2fc3991 |
%package javadoc
|
|
|
2fc3991 |
Summary: Javadoc for %{name}
|
|
|
2fc3991 |
Group: Development/Documentation
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%description javadoc
|
|
|
2fc3991 |
Javadoc for %{name}.
|
|
|
2fc3991 |
%endif
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%prep
|
|
|
2fc3991 |
%setup -q -n %{name}
|
|
|
2fc3991 |
cp -p %{SOURCE1} doxia-decoration-model/build.xml
|
|
|
2fc3991 |
cp -p %{SOURCE2} doxia-core/build.xml
|
|
|
2fc3991 |
cp -p %{SOURCE3} doxia-sink-api/build.xml
|
|
|
2fc3991 |
cp -p %{SOURCE4} doxia-site-renderer/build.xml
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%patch0 -b .sav
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%build
|
|
|
2fc3991 |
|
|
|
2fc3991 |
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
|
|
2fc3991 |
mkdir -p $MAVEN_REPO_LOCAL
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%if %{with_maven}
|
|
|
2fc3991 |
|
|
|
2fc3991 |
mvn-jpp \
|
|
|
2fc3991 |
-e \
|
|
|
2fc3991 |
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
|
7c9b7af |
-Dmaven.test.failure.ignore=true \
|
|
|
2fc3991 |
install javadoc:javadoc
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%else
|
|
|
2fc3991 |
|
|
|
2fc3991 |
mkdir lib
|
|
|
2fc3991 |
build-jar-repository -s -p lib/ \
|
|
|
2fc3991 |
commons-collections \
|
|
|
2fc3991 |
commons-logging-api \
|
|
|
2fc3991 |
classworlds \
|
|
|
2fc3991 |
junit \
|
|
|
2fc3991 |
oro \
|
|
|
2fc3991 |
plexus/container-default \
|
|
|
2fc3991 |
plexus/i18n \
|
|
|
2fc3991 |
plexus/utils \
|
|
|
2fc3991 |
plexus/velocity \
|
|
|
2fc3991 |
velocity
|
|
|
2fc3991 |
|
|
|
2fc3991 |
# Extract autogenerated (by maven) files
|
|
|
2fc3991 |
tar xzf %{SOURCE5}
|
|
|
2fc3991 |
|
|
|
2fc3991 |
for project in doxia-decoration-model \
|
|
|
2fc3991 |
doxia-sink-api \
|
|
|
2fc3991 |
doxia-core \
|
|
|
2fc3991 |
doxia-site-renderer; do
|
|
|
2fc3991 |
|
|
|
2fc3991 |
pushd $project
|
|
|
2fc3991 |
|
|
|
2fc3991 |
ant -Dmaven.mode.offline=true -Dmaven.repo.local=$MAVEN_REPO_LOCAL
|
|
|
2fc3991 |
|
|
|
2fc3991 |
# Copy over the jar
|
|
|
2fc3991 |
cp -p target/*jar ../lib/$project.jar
|
|
|
2fc3991 |
popd
|
|
|
2fc3991 |
done
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%endif
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%install
|
|
|
2fc3991 |
rm -rf $RPM_BUILD_ROOT
|
|
|
2fc3991 |
# jars/poms
|
|
|
2fc3991 |
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
|
|
|
2fc3991 |
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
|
|
|
2fc3991 |
|
|
|
2fc3991 |
for project in decoration-model \
|
|
|
2fc3991 |
sink-api \
|
|
|
2fc3991 |
core \
|
|
|
2fc3991 |
site-renderer \
|
|
|
2fc3991 |
module-twiki; do
|
|
|
2fc3991 |
|
|
|
2fc3991 |
if [ -f doxia-$project/target/doxia-$project-%{namedversion}.jar ]; then install -pm 644 \
|
|
|
2fc3991 |
doxia-$project/target/doxia-$project-%{namedversion}.jar \
|
|
|
2fc3991 |
$RPM_BUILD_ROOT%{_javadir}/%{name}/$project-%{namedversion}.jar
|
|
|
2fc3991 |
%add_to_maven_depmap org.apache.maven.doxia doxia-$project %{namedversion} JPP/maven-doxia $project
|
|
|
2fc3991 |
|
|
|
2fc3991 |
fi
|
|
|
2fc3991 |
|
|
|
2fc3991 |
# Install pom to groupid-artifactid
|
|
|
2fc3991 |
install -pm 644 doxia-$project/pom.xml \
|
|
|
2fc3991 |
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.maven-doxia-$project.pom
|
|
|
2fc3991 |
done
|
|
|
2fc3991 |
|
|
|
2fc3991 |
install -pm 644 pom.xml \
|
|
|
2fc3991 |
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.maven-doxia-doxia.pom
|
|
|
2fc3991 |
%add_to_maven_depmap org.apache.maven.doxia doxia %{namedversion} JPP/maven-doxia doxia
|
|
|
2fc3991 |
|
|
|
2fc3991 |
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{namedversion}*; \
|
|
|
2fc3991 |
do ln -sf ${jar} `echo $jar| sed "s|-%{namedversion}||g"`; done)
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%if %{with_maven}
|
|
|
2fc3991 |
# javadoc
|
|
|
2fc3991 |
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
|
2fc3991 |
|
|
|
2fc3991 |
for p in doxia-decoration-model \
|
|
|
2fc3991 |
doxia-sink-api \
|
|
|
2fc3991 |
doxia-core \
|
|
|
2fc3991 |
doxia-site-renderer; do
|
|
|
2fc3991 |
|
|
|
2fc3991 |
project=`basename $p`
|
|
|
2fc3991 |
install -d -m 755 \
|
|
|
2fc3991 |
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/$project
|
|
|
2fc3991 |
cp -pr $project/target/site/apidocs/* \
|
|
|
2fc3991 |
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/$project
|
|
|
2fc3991 |
|
|
|
2fc3991 |
done
|
|
|
2fc3991 |
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
|
2fc3991 |
%endif
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%if %{gcj_support}
|
|
|
2fc3991 |
%{_bindir}/aot-compile-rpm
|
|
|
2fc3991 |
%endif
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%clean
|
|
|
2fc3991 |
rm -rf $RPM_BUILD_ROOT
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%if %{gcj_support}
|
|
|
2fc3991 |
%postun
|
|
|
2fc3991 |
if [ -x %{_bindir}/rebuild-gcj-db ]
|
|
|
2fc3991 |
then
|
|
|
2fc3991 |
%{_bindir}/rebuild-gcj-db
|
|
|
2fc3991 |
fi
|
|
|
2fc3991 |
%endif
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%files
|
|
|
2fc3991 |
%defattr(-,root,root,-)
|
|
|
2fc3991 |
%{_javadir}/%{name}
|
|
|
2fc3991 |
%{_datadir}/maven2
|
|
|
2fc3991 |
%{_mavendepmapfragdir}
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%if %{gcj_support}
|
|
|
2fc3991 |
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
|
|
|
2fc3991 |
%attr(-,root,root) %{_libdir}/gcj/%{name}/core-1.0-alpha-7.jar.*
|
|
|
2fc3991 |
%attr(-,root,root) %{_libdir}/gcj/%{name}/decoration-model-1.0-alpha-7.jar.*
|
|
|
2fc3991 |
%attr(-,root,root) %{_libdir}/gcj/%{name}/sink-api-1.0-alpha-7.jar.*
|
|
|
2fc3991 |
%attr(-,root,root) %{_libdir}/gcj/%{name}/site-renderer-1.0-alpha-7.jar.*
|
|
|
2fc3991 |
%endif
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%if %{with_maven}
|
|
|
2fc3991 |
%files javadoc
|
|
|
2fc3991 |
%defattr(-,root,root,-)
|
|
|
2fc3991 |
%doc %{_javadocdir}/*
|
|
|
2fc3991 |
%endif
|
|
|
2fc3991 |
|
|
|
2fc3991 |
%changelog
|
|
|
7c9b7af |
* Tue Mar 20 2007 Deepak Bhole <dbhole@redhat.com> 0:1.0-0.1.a7.3jpp.3
|
|
|
7c9b7af |
- Added switch to ignore failures for the time being
|
|
|
7c9b7af |
|
|
|
725d436 |
* Tue Mar 20 2007 Deepak Bhole <dbhole@redhat.com> 0:1.0-0.1.a7.3jpp.2
|
|
|
725d436 |
- Build with maven
|
|
|
725d436 |
|
|
|
2fc3991 |
* Tue Feb 27 2007 Tania Bento <tbento@redhat.com> 0:1.0-0.1.a7.3jpp.1
|
|
|
2fc3991 |
- Fixed %%Release.
|
|
|
2fc3991 |
- Fixed %%BuildRoot.
|
|
|
2fc3991 |
- Removed %%Vendor.
|
|
|
2fc3991 |
- Removed %%Distribution.
|
|
|
2fc3991 |
- Removed %%post and %%postun sections for javadoc.
|
|
|
2fc3991 |
- Fixed instructios on how to generate source drop.
|
|
|
2fc3991 |
- Fixed %%Summary.
|
|
|
2fc3991 |
- Added gcj support option.
|
|
|
2fc3991 |
- Marked configuration file as %%config(noreplace) in %%files section.
|
|
|
2fc3991 |
|
|
|
2fc3991 |
* Tue Oct 17 2006 Deepak Bhole <dbhole@redhat.com> 1.0-0.a7.3jpp
|
|
|
2fc3991 |
- Update for maven2 9jpp
|
|
|
2fc3991 |
|
|
|
2fc3991 |
* Fri Jun 23 2006 Deepak Bhole <dbhole@redhat.com> - 0:1.0-0.a7.2jpp
|
|
|
2fc3991 |
- Fix versions in the depmap
|
|
|
2fc3991 |
|
|
|
2fc3991 |
* Wed Mar 15 2006 Deepak Bhole <dbhole@redhat.com> - 0:1.0-0.a7.1jpp
|
|
|
2fc3991 |
- Initial build
|
|
|
2fc3991 |
|