Andrew Overholt 4ab0050
# Copyright (c) 2000-2005, JPackage Project
Andrew Overholt 4ab0050
# All rights reserved.
Andrew Overholt 4ab0050
#
Andrew Overholt 4ab0050
# Redistribution and use in source and binary forms, with or without
Andrew Overholt 4ab0050
# modification, are permitted provided that the following conditions
Andrew Overholt 4ab0050
# are met:
Andrew Overholt 4ab0050
#
Andrew Overholt 4ab0050
# 1. Redistributions of source code must retain the above copyright
Andrew Overholt 4ab0050
#    notice, this list of conditions and the following disclaimer.
Andrew Overholt 4ab0050
# 2. Redistributions in binary form must reproduce the above copyright
Andrew Overholt 4ab0050
#    notice, this list of conditions and the following disclaimer in the
Andrew Overholt 4ab0050
#    documentation and/or other materials provided with the
Andrew Overholt 4ab0050
#    distribution.
Andrew Overholt 4ab0050
# 3. Neither the name of the JPackage Project nor the names of its
Andrew Overholt 4ab0050
#    contributors may be used to endorse or promote products derived
Andrew Overholt 4ab0050
#    from this software without specific prior written permission.
Andrew Overholt 4ab0050
#
Andrew Overholt 4ab0050
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Andrew Overholt 4ab0050
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Andrew Overholt 4ab0050
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Andrew Overholt 4ab0050
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Andrew Overholt 4ab0050
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Andrew Overholt 4ab0050
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Andrew Overholt 4ab0050
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Andrew Overholt 4ab0050
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Andrew Overholt 4ab0050
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Andrew Overholt 4ab0050
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Andrew Overholt 4ab0050
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Andrew Overholt 4ab0050
#
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%define parent maven-doxia
Andrew Overholt 4ab0050
%define subproj sitetools
Andrew Overholt 4ab0050
%define namedversion 1.0-alpha-10
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
Name:           %{parent}-%{subproj}
Andrew Overholt 4ab0050
Version:        1.0
30e6eee
Release:        0.2.a10.2%{?dist}
Andrew Overholt 4ab0050
Summary:        Doxia content generation framework
Andrew Overholt 4ab0050
License:        ASL 2.0
Andrew Overholt 4ab0050
Group:          Development/Tools
Andrew Overholt 4ab0050
URL:            http://maven.apache.org/doxia/
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
# svn export \
Andrew Overholt 4ab0050
#  http://svn.apache.org/repos/asf/maven/doxia/doxia-sitetools/tags/doxia-sitetools-1.0-alpha-10/ \
Andrew Overholt 4ab0050
#  maven-doxia-sitetools
Andrew Overholt 4ab0050
# tar czf maven-doxia-sitetools-1.0-alpha10-src.tar.gz maven-doxia-sitetools/
Andrew Overholt 4ab0050
Source0:        %{name}-1.0-alpha10-src.tar.gz
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
Patch0:         %{name}-disablehtmlunit.patch
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Andrew Overholt 4ab0050
Andrew Overholt 36a25b4
BuildRequires:  itext >= 2.1.7
Andrew Overholt 4ab0050
BuildRequires:  jpackage-utils >= 0:1.7.2
Andrew Overholt 4ab0050
BuildRequires:  maven2 >= 0:2.0.4-9
Andrew Overholt 4ab0050
BuildRequires:  maven2-plugin-compiler
Andrew Overholt 4ab0050
BuildRequires:  maven2-plugin-install
Andrew Overholt 4ab0050
BuildRequires:  maven2-plugin-jar
Andrew Overholt 4ab0050
BuildRequires:  maven2-plugin-javadoc
Andrew Overholt 4ab0050
BuildRequires:  maven2-plugin-resources
Andrew Overholt 4ab0050
BuildRequires:  maven2-plugin-site
Andrew Overholt 4ab0050
BuildRequires:  maven2-plugin-surefire
30e6eee
BuildRequires:  maven-surefire-provider-junit
Andrew Overholt 4ab0050
BuildRequires:  maven-doxia >= 1.0-0.3.a10 
Andrew Overholt 4ab0050
BuildRequires:  plexus-maven-plugin >= 0:1.2-2
Andrew Overholt 4ab0050
BuildRequires:  modello-maven-plugin >= 0:1.0-0.a8.3
Andrew Overholt 4ab0050
BuildRequires:  plexus-xmlrpc >= 0:1.0-0.b4.3
Andrew Overholt 4ab0050
BuildRequires:  classworlds
Andrew Overholt 4ab0050
BuildRequires:  jakarta-commons-collections
Andrew Overholt 4ab0050
BuildRequires:  jakarta-commons-logging
Andrew Overholt 4ab0050
BuildRequires:  jakarta-commons-validator
Andrew Overholt 4ab0050
BuildRequires:  junit
Andrew Overholt 4ab0050
BuildRequires:  oro
Andrew Overholt 4ab0050
BuildRequires:  plexus-container-default
Andrew Overholt 4ab0050
BuildRequires:  plexus-i18n
Andrew Overholt 4ab0050
BuildRequires:  plexus-utils
Andrew Overholt 4ab0050
BuildRequires:  plexus-velocity
Andrew Overholt 36a25b4
BuildRequires:  tomcat5
Andrew Overholt 36a25b4
BuildRequires:  tomcat5-servlet-2.4-api
Andrew Overholt 4ab0050
BuildRequires:  velocity
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
Requires:       classworlds
Andrew Overholt 4ab0050
Requires:       jakarta-commons-collections
Andrew Overholt 4ab0050
Requires:       jakarta-commons-logging
Andrew Overholt 4ab0050
Requires:       jakarta-commons-validator
Andrew Overholt 4ab0050
Requires:       junit
Andrew Overholt 4ab0050
Requires:       maven-doxia
Andrew Overholt 4ab0050
Requires:       oro
Andrew Overholt 4ab0050
Requires:       plexus-container-default
Andrew Overholt 4ab0050
Requires:       plexus-i18n
Andrew Overholt 4ab0050
Requires:       plexus-utils
Andrew Overholt 4ab0050
Requires:       plexus-velocity
Andrew Overholt 4ab0050
Requires:       velocity
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
Requires:       java >= 1:1.6.0
Andrew Overholt 4ab0050
Requires:       jpackage-utils >= 0:1.7.2
Andrew Overholt 4ab0050
Requires(post):   jpackage-utils >= 0:1.7.2
Andrew Overholt 4ab0050
Requires(postun): jpackage-utils >= 0:1.7.2
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
BuildArch:      noarch
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%description
Andrew Overholt 4ab0050
Doxia is a content generation framework which aims to provide its
Andrew Overholt 4ab0050
users with powerful techniques for generating static and dynamic
Andrew Overholt 4ab0050
content. Doxia can be used to generate static sites in addition to
Andrew Overholt 4ab0050
being incorporated into dynamic content generation systems like blogs,
Andrew Overholt 4ab0050
wikis and content management systems.
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%package javadoc
Andrew Overholt 4ab0050
Summary:        Javadoc for %{name}
Andrew Overholt 4ab0050
Group:          Documentation
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%description javadoc
Andrew Overholt 4ab0050
API documentation for %{name}.
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%prep
Andrew Overholt 4ab0050
%setup -q -n %{name}
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%patch0
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
# Disable test that needs htmlunit, until we get it in Fedora
Andrew Overholt 4ab0050
rm -f doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/DefaultSiteRendererTest.java
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%build
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
Andrew Overholt 4ab0050
mkdir -p $MAVEN_REPO_LOCAL
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
mvn-jpp \
Andrew Overholt 4ab0050
      -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
Andrew Overholt 4ab0050
      -Dmaven.test.failure.ignore=true \
Andrew Overholt 4ab0050
      install
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
for dir in doxia*; do
Andrew Overholt 4ab0050
    pushd $dir
Andrew Overholt 4ab0050
        mvn-jpp \
Andrew Overholt 4ab0050
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
Andrew Overholt 4ab0050
        javadoc:javadoc
Andrew Overholt 4ab0050
    popd
Andrew Overholt 4ab0050
done
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%post
Andrew Overholt 4ab0050
%update_maven_depmap
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%postun
Andrew Overholt 4ab0050
%update_maven_depmap
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%install
Andrew Overholt 4ab0050
rm -rf $RPM_BUILD_ROOT
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
# jars/poms
Andrew Overholt 4ab0050
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
install -m 644 -p pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{parent}-sitetools.pom
Andrew Overholt 4ab0050
install -m 644 -p doxia-decoration-model/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{parent}-decoration-model.pom
Andrew Overholt 4ab0050
install -m 644 -p doxia-site-renderer/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{parent}-site-renderer.pom
Andrew Overholt 4ab0050
install -m 644 -p doxia-doc-renderer/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{parent}-doc-renderer.pom
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%add_to_maven_depmap org.apache.maven.doxia doxia-sitetools %{namedversion} JPP/%{parent} sitetools
Andrew Overholt 4ab0050
%add_to_maven_depmap org.apache.maven.doxia doxia-decoration-model %{namedversion} JPP/%{parent} decoration-model
Andrew Overholt 4ab0050
%add_to_maven_depmap org.apache.maven.doxia doxia-site-renderer %{namedversion} JPP/%{parent} site-renderer
Andrew Overholt 4ab0050
%add_to_maven_depmap org.apache.maven.doxia doxia-doc-renderer %{namedversion} JPP/%{parent} doc-renderer
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
install -dm 755 $RPM_BUILD_ROOT%{_javadir}/%{parent}
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
install -m 644 -p doxia-decoration-model/target/doxia-decoration-model-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{parent}/decoration-model-%{namedversion}.jar
Andrew Overholt 4ab0050
install -m 644 -p doxia-site-renderer/target/doxia-site-renderer-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{parent}/site-renderer-%{namedversion}.jar
Andrew Overholt 4ab0050
install -m 644 -p doxia-doc-renderer/target/doxia-doc-renderer-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{parent}/doc-renderer-%{namedversion}.jar
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
(cd $RPM_BUILD_ROOT%{_javadir}/%{parent} && for jar in *-%{namedversion}*; \
Andrew Overholt 4ab0050
  do ln -sf ${jar} `echo $jar| sed  "s|-%{namedversion}||g"`; done)
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
# javadoc (all javadocs are contained in the main module docs dir used below)
Andrew Overholt 4ab0050
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}/decoration-model
Andrew Overholt 4ab0050
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}/site-renderer
Andrew Overholt 4ab0050
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}/doc-renderer
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
cp -pr doxia-decoration-model/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/decoration-model/
Andrew Overholt 4ab0050
cp -pr doxia-site-renderer/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/site-renderer/
Andrew Overholt 4ab0050
cp -pr doxia-doc-renderer/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/doc-renderer/
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%clean
Andrew Overholt 4ab0050
rm -rf $RPM_BUILD_ROOT
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%files
Andrew Overholt 4ab0050
%defattr(-,root,root,-)
Andrew Overholt 4ab0050
%{_javadir}/%{parent}
Andrew Overholt 4ab0050
%{_datadir}/maven2/poms/JPP.%{parent}-sitetools.pom
Andrew Overholt 4ab0050
%{_datadir}/maven2/poms/JPP.%{parent}-decoration-model.pom
Andrew Overholt 4ab0050
%{_datadir}/maven2/poms/JPP.%{parent}-site-renderer.pom
Andrew Overholt 4ab0050
%{_datadir}/maven2/poms/JPP.%{parent}-doc-renderer.pom
Andrew Overholt 4ab0050
%{_mavendepmapfragdir}/%{name}
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%files javadoc
Andrew Overholt 4ab0050
%defattr(-,root,root,-)
Andrew Overholt 4ab0050
%doc %{_javadocdir}/*
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
%changelog
30e6eee
* Mon Dec 21 2009 Alexander Kurtakov <akurtako@redhat.com> 1.0-0.2.a10.2
30e6eee
- BR maven-surefire-provider-junit.
30e6eee
Andrew Overholt 36a25b4
* Tue Sep 01 2009 Andrew Overholt <overholt@redhat.com> 1.0-0.2.a10.1
Andrew Overholt 36a25b4
- Add itext, tomcat5, and tomcat5-servlet-2.4-api BRs
Andrew Overholt 36a25b4
Andrew Overholt 4ab0050
* Fri Aug 28 2009 Andrew Overholt <overholt@redhat.com> 1.0-0.2.a10
Andrew Overholt 4ab0050
- First Fedora build
Andrew Overholt 4ab0050
Andrew Overholt 4ab0050
* Fri Jun 20 2000 Deepak Bhole <dbhole@redhat.com> 1.0-0.1.a10.0jpp.1
Andrew Overholt 4ab0050
- Initial build