Sophie

Sophie

distrib > Altlinux > 4.1 > i586 > by-pkgid > e57eca263524dab57f85e74e7ce0bb7f > files > 12

portals-pluto-1.0.1-alt1_1jpp1.7.src.rpm

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.
#

%define gcj_support 0

%define bname		pluto

Name:		portals-%{bname}
Version:	1.0.1
Release:	alt1_1jpp1.7
Epoch:		0
Summary:	Portlet Reference Implementation
License:	Apache Software License 2.0
Url:		http://portals.apache.org/pluto/
Group:		Development/Java
Source0:	portals-pluto-1.0.1.tar.gz
# svn export http://svn.apache.org/repos/asf/portals/pluto/tags/release-1.0.1/ portals-pluto-1.0.1

Source1:        pom-maven2jpp-depcat.xsl
Source2:        pom-maven2jpp-newdepmap.xsl
Source3:        pom-maven2jpp-mapdeps.xsl
Source4:        pluto-1.0.1-jpp-depmap.xml
Patch0:         pluto-1.0.1-project_xml.patch
Patch1:         pluto-1.0.1-container-project_xml.patch
Patch2:         pluto-1.0.1-portal-project_xml.patch
Patch3:         pluto-1.0.1-api-project_xml.patch
Patch4:         pluto-1.0.1-descriptors-project_xml.patch

Requires: portlet-1.0-api
Requires: castor
Requires: jakarta-commons-beanutils
Requires: jakarta-commons-digester
Requires: jakarta-commons-fileupload
Requires: jakarta-commons-logging
Requires: jakarta-taglibs-standard
Requires: servletapi4
Requires: xerces-j2
Requires: xml-commons-apis

BuildRequires: maven-plugins >= 0:1.1
BuildRequires: saxon
BuildRequires: saxon-scripts
BuildRequires: junit
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: ant >= 0:1.6
BuildRequires: portlet-1.0-api
BuildRequires: castor

BuildRequires: jakarta-commons-beanutils
BuildRequires: jakarta-commons-digester
BuildRequires: jakarta-commons-fileupload
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-taglibs-standard
BuildRequires: servletapi4
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis

%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%if ! %{gcj_support}
BuildArch:      noarch
%endif
Patch33: portals-pluto-1.0.1-alt-deploy-project-xml.patch

%description
Pluto is the Reference Implementation of the Java Portlet 
Specfication. The current version of this specification 
is JSR 168. 
Portlets are designed to run in the context of a portal. 
They are written to the Portlet API which are similar to 
the Servlet API.
A portlet container provides a runtime environment for 
portlets implemented according to the Portlet API. In 
this environment portlets can be instantiated, used and 
finally destroyed. The portlet container is not a 
stand-alone container like the servlet container; instead 
it is implemented as a thin layer on top of the servlet 
container and reuses the functionality provided by the 
servlet container. 
Pluto serves as portlet container that implements the 
Portlet API and offers developers a working example 
platform from which they can test their portlets. 


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

%description javadoc
%{summary}.

%package manual
Summary:        Documents for %{name}
Group:          Development/Documentation

%description manual
%{summary}.

%prep
%setup -q -n %{name}-%{version}
# remove all binary libs
#find . -name "*.jar" -exec rm -f {} \;
for j in $(find . -name "*.jar"); do
	mv $j $j.no
done

%patch0 -b .sav
%patch1 -b .sav
%patch2 -b .sav
%patch3 -b .sav
%patch4 -b .sav
%patch33 -p1

%build
cp container/maven.xml descriptors
export DEPCAT=$(pwd)/pluto-1.0.1-depcat.new.xml
echo '<?xml version="1.0" standalone="yes"?>' > $DEPCAT
echo '<depset>' >> $DEPCAT
for p in $(find . -name project.xml); do
    pushd $(dirname $p)
    /usr/bin/saxon project.xml %{SOURCE1} >> $DEPCAT
    popd
done
echo >> $DEPCAT
echo '</depset>' >> $DEPCAT
/usr/bin/saxon $DEPCAT %{SOURCE2} > pluto-1.0.1-depmap.new.xml
for p in $(find . -name project.xml); do
    pushd $(dirname $p)
    cp project.xml project.xml.orig
    /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE3} map=%{SOURCE4}
    popd
done

export MAVEN_HOME_LOCAL=$(pwd)/.maven

maven \
	-Dmaven.repo.remote=file:/usr/share/maven-1.0/repository \
	-Dmaven.home.local=$MAVEN_HOME_LOCAL \
	-Dgoal=jar:install,javadoc,test:test \
	multiproject:goal xdoc:transform

%install
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -m 644 container/target/%{bname}-%{version}.jar \
	$RPM_BUILD_ROOT%{_javadir}/%{name}/%{bname}-%{version}.jar
install -m 644 deploy/target/%{bname}-deploy-%{version}.jar \
	$RPM_BUILD_ROOT%{_javadir}/%{name}/%{bname}-deploy-%{version}.jar
install -m 644 portal/target/%{bname}-portal-%{version}.jar \
	$RPM_BUILD_ROOT%{_javadir}/%{name}/%{bname}-portal-%{version}.jar
install -m 644 descriptors/target/%{bname}-descriptors-%{version}.jar \
	$RPM_BUILD_ROOT%{_javadir}/%{name}/%{bname}-descriptors-%{version}.jar
install -m 644 testsuite/target/testsuite-%{version}.jar \
	$RPM_BUILD_ROOT%{_javadir}/%{name}/testsuite-%{version}.jar

# create unversioned symlinks
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)

install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/container
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/deploy
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/descriptors
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/portal
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/testsuite
cp -pr container/target/docs/apidocs/* \
	$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/container
cp -pr deploy/target/docs/apidocs/* \
	$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/deploy
cp -pr descriptors/target/docs/apidocs/* \
	$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/descriptors
cp -pr portal/target/docs/apidocs/* \
	$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/portal
cp -pr testsuite/target/docs/apidocs/* \
	$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/testsuite
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp LICENSE.TXT $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr target/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

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

%if %{gcj_support}
%post
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%if %{gcj_support}
%postun
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%files 
%defattr(0644,root,root,0755)
%doc %{_docdir}/%{name}-%{version}/LICENSE.TXT
%{_javadir}/%{name}/*.jar
%if %{gcj_support}
%attr(-,root,root) %dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{bname}*%{version}.jar.*
%attr(-,root,root) %{_libdir}/gcj/%{name}/testsuite-%{version}.jar.*
%endif


%files manual
%doc %{_docdir}/%{name}-%{version}

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

%changelog
* Thu Nov 22 2007 Igor Vlasenko <viy@altlinux.ru> 0:1.0.1-alt1_1jpp1.7
- converted from JPackage by jppimport script