Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37776686
en ru br
Репозитории ALT
S:1.9.1-alt1_3jpp11
5.1: 1.0-alt2_0.a10.4jpp5
4.1: 1.0-alt1_0.a7.3jpp1.7
4.0: 1.0-alt1_0.a7.3jpp1.7
www.altlinux.org/Changes

Группа :: Разработка/Java
Пакет: maven-doxia

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define _without_maven 1
BuildRequires: /proc
BuildRequires: jpackage-1.4-compat
# Copyright (c) 2000-2005, 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.
#


# If you don't want to build with maven, and use straight ant instead,

# give rpmbuild option '--without maven'

%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}

%define namedversion 1.0-alpha-7

%define maven_settings_file %{_builddir}/%{name}/settings.xml

Name:           maven-doxia
Version:        1.0
Release:        alt1_0.a7.3jpp1.7
Epoch:          0
Summary:        Doxia is a content generation framework
License:        Apache Software License
Group:          Development/Java
URL:            http://maven.apache.org/doxia/
Source0:        %{name}-%{version}a7.tar.gz
# svn export http://svn.apache.org/repos/asf/maven/doxia/tags/doxia-1.0-alpha-7/ maven-doxia

Source5: %{name}-jpp-depmap.xml

Source7: %{name}-decoration-model-build.xml
Source8: %{name}-core-build.xml
Source9: %{name}-sink-api-build.xml
Source10: %{name}-site-renderer-build.xml
Source11: %{name}-autogenerated-files.tar.gz

Patch0: %{name}-1.4compile.patch


BuildArch:      noarch
BuildRequires: jpackage-utils >= 0:1.7.2
BuildRequires: ant ant-nodeps
%if %{with_maven}
BuildRequires: maven2 >= 0:2.0.4-9
BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-site
BuildRequires: maven2-plugin-surefire
BuildRequires: plexus-maven-plugin >= 0:1.2-2
BuildRequires: modello-maven-plugin >= 0:1.0-0.a8.3
BuildRequires: plexus-xmlrpc >= 0:1.0-0.b4.3
%endif
BuildRequires: classworlds
BuildRequires: jakarta-commons-collections
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-commons-validator
BuildRequires: junit
BuildRequires: oro
BuildRequires: plexus-container-default
BuildRequires: plexus-i18n
BuildRequires: plexus-utils
BuildRequires: plexus-velocity
BuildRequires: velocity

Requires: classworlds
Requires: jakarta-commons-collections
Requires: jakarta-commons-logging
Requires: jakarta-commons-validator
Requires: junit
Requires: oro
Requires: plexus-container-default
Requires: plexus-i18n
Requires: plexus-utils
Requires: plexus-velocity
Requires: velocity

Requires(post): jpackage-utils >= 0:1.7.2
Requires(postun): jpackage-utils >= 0:1.7.2

%description
Doxia is a content generation framework which aims to provide its
users with powerful techniques for generating static and dynamic
content. Doxia can be used to generate static sites in addition to
being incorporated into dynamic content generation systems like blogs,
wikis and content management systems.

%if %{with_maven}
%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation

%description javadoc
Javadoc for %{name}.
%endif

%prep
%setup -q -n %{name}
cp %{SOURCE7} doxia-decoration-model/build.xml
cp %{SOURCE8} doxia-core/build.xml
cp %{SOURCE9} doxia-sink-api/build.xml
cp %{SOURCE10} doxia-site-renderer/build.xml

%patch0 -b .sav

%build

export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL

%if %{with_maven}

   mvn-jpp \
       -e \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
       install javadoc:javadoc

%else

mkdir lib
build-jar-repository -s -p lib/ \
commons-collections \
commons-logging-api \
classworlds \
junit \
oro \
plexus/container-default \
plexus/i18n \
plexus/utils \
plexus/velocity \
velocity

# Extract autogenerated (by maven) files

tar xzf %{SOURCE11}

for project in doxia-decoration-model \
doxia-sink-api \
doxia-core \
doxia-site-renderer; do

pushd $project

ant -Dmaven.mode.offline=true -Dmaven.repo.local=$MAVEN_REPO_LOCAL

# Copy over the jar

cp target/*jar ../lib/$project.jar
popd
done

%endif

%install
# jars/poms
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms

for project in decoration-model \
sink-api \
core \
site-renderer \
module-twiki; do

if [ -f doxia-$project/target/doxia-$project-%{namedversion}.jar ]; then
install -pm 644 doxia-$project/target/doxia-$project-%{namedversion}.jar \
 $RPM_BUILD_ROOT%{_javadir}/%{name}/$project-%{namedversion}.jar
%add_to_maven_depmap org.apache.maven.doxia doxia-$project %{namedversion} JPP/maven-doxia $project

fi

# Install pom to groupid-artifactid

install -pm 644 doxia-$project/pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.maven-doxia-$project.pom
done

install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.maven-doxia-doxia.pom
%add_to_maven_depmap org.apache.maven.doxia doxia %{namedversion} JPP/maven-doxia doxia

(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{namedversion}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{namedversion}||g"`; done)

%if %{with_maven}
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}

for p in doxia-decoration-model \
doxia-sink-api \
doxia-core \
doxia-site-renderer; do

project=`basename $p`
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/$project
cp -pr $project/target/site/apidocs/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/$project

done
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
%endif

%clean

%if %{with_maven}
%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{namedversion} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
 rm -f %{_javadocdir}/%{name}
fi
%endif

%files
%{_javadir}/%{name}
%{_datadir}/maven2
%{_mavendepmapfragdir}

%if %{with_maven}
%files javadoc
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}
%endif

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin