[Jpackage-commits] dist/joda-time/devel .cvsignore, 1.1, 1.2 joda-time-1.5.2-jpp-depmap.xml, NONE, 1.1 joda-time.spec, NONE, 1.1 pom-maven2jpp-depcat.xsl, NONE, 1.1 pom-maven2jpp-mapdeps.xsl, NONE, 1.1 pom-maven2jpp-newdepmap.xsl, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed May 28 20:58:19 CEST 2008


Update of /home/projects/jpackage/cvs/dist/joda-time/devel
In directory ryu.zarb.org:/tmp/cvs-serv23105/devel

Modified Files:
	.cvsignore sources 
Added Files:
	joda-time-1.5.2-jpp-depmap.xml joda-time.spec 
	pom-maven2jpp-depcat.xsl pom-maven2jpp-mapdeps.xsl 
	pom-maven2jpp-newdepmap.xsl 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/joda-time/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 18:57:58 -0000	1.1
--- .cvsignore	28 May 2008 18:58:17 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ joda-time-1.5.2-src.tar.gz

--- NEW FILE: pom-maven2jpp-depcat.xsl ---
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="*[name() != 'dependencies']|*/text()">
     <xsl:apply-templates/>
 </xsl:template>
 <xsl:template match="//dependencies">
  <xsl:for-each select="./dependency">
   <xsl:element name="dependency">
    <xsl:element name="maven">
     <xsl:choose>
      <xsl:when test="./groupId">
       <xsl:copy-of select="./groupId"/>
       <xsl:copy-of select="./artifactId"/>
      </xsl:when>
      <xsl:when test="./id">
       <xsl:choose>
        <xsl:when test="substring-before(./id/text(),':') != ''">
         <xsl:element name="groupId">
          <xsl:value-of select="substring-before(./id/text(),':')"/>
         </xsl:element>
         <xsl:element name="artifactId">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:element>
        </xsl:when>
        <xsl:otherwise>
         <xsl:element name="groupId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
         <xsl:element name="artifactId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
        </xsl:otherwise>
       </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
ERROR
      </xsl:otherwise>
     </xsl:choose>
     <xsl:for-each select="./*">
      <xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
       <xsl:copy-of select="."/>
      </xsl:if>
     </xsl:for-each>
    </xsl:element>
    <xsl:element name="jpp">
     <xsl:element name="groupId">JPP</xsl:element>
     <xsl:choose>
      <xsl:when test="./artifactId">
       <xsl:copy-of select="./artifactId"/>
      </xsl:when>
      <xsl:when test="./id">
       <xsl:choose>
        <xsl:when test="substring-after(./id/text(),':') != ''">
         <xsl:element name="artifactId">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:element>
        </xsl:when>
        <xsl:otherwise>
         <xsl:element name="artifactId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
        </xsl:otherwise>
       </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
ERROR
      </xsl:otherwise>
     </xsl:choose>
     <xsl:element name="jar">
      <xsl:choose>
       <xsl:when test="./artifactId">
        <xsl:value-of select="./artifactId/text()"/>
       </xsl:when>
       <xsl:when test="./id">
        <xsl:choose>
         <xsl:when test="substring-after(./id/text(),':') != ''">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:when>
         <xsl:otherwise>
          <xsl:value-of select="./id/text()"/>
         </xsl:otherwise>
        </xsl:choose>
       </xsl:when>
       <xsl:otherwise>
ERROR
       </xsl:otherwise>
      </xsl:choose>
      <xsl:choose>
       <xsl:when test="./type">
        <xsl:choose>
         <xsl:when test="./type/text() = 'plugin'">.jar</xsl:when>
         <xsl:otherwise>.<xsl:value-of select="./type/text()"/></xsl:otherwise>
        </xsl:choose>
       </xsl:when>
       <xsl:otherwise>.jar</xsl:otherwise>
      </xsl:choose>
     </xsl:element>
     <xsl:for-each select="./*">
      <xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
       <xsl:copy-of select="."/>
      </xsl:if>
     </xsl:for-each>
    </xsl:element>
   </xsl:element>
  </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>

--- NEW FILE: pom-maven2jpp-newdepmap.xsl ---
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:saxon="http://icl.com/saxon"
	extension-element-prefixes="saxon">
 <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="/" >
  <xsl:element name="depset">
   <saxon:group select="//dependency" group-by="./maven/artifactId">
    <xsl:sort select="./maven/artifactId"/>
    <xsl:element name="dependency">
     <xsl:element name="maven">
      <xsl:copy-of select="./maven/*[name() != 'properties']"/>
     </xsl:element>
     <xsl:element name="jpp">
      <xsl:copy-of select="./jpp/*[name() != 'properties']"/>
     </xsl:element>
    </xsl:element>
    <saxon:item/>
   </saxon:group>
  </xsl:element>
 </xsl:template>
</xsl:stylesheet>

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/joda-time/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 18:57:58 -0000	1.1
--- sources	28 May 2008 18:58:17 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 56408d4f4328556d897f8dc06ae3bdcf  joda-time-1.5.2-src.tar.gz

--- NEW FILE: pom-maven2jpp-mapdeps.xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:param name="map" /> 
 <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="/project" >
  <xsl:element name="project">
   <xsl:copy-of select="child::*[not(self::dependencies)]"/>
   <xsl:if test="not(./dependencies)">
    <xsl:element name="dependencies">
     <xsl:for-each select="document($map)//add/dependency">
       <xsl:copy-of select="."/>
     </xsl:for-each>
    </xsl:element>
   </xsl:if>
   <xsl:apply-templates select="dependencies"/>
  </xsl:element>
 </xsl:template>
 <xsl:template match="dependencies" >
  <xsl:element name="dependencies">
   <xsl:for-each select="dependency">
    <xsl:if test="./artifactId">
     <xsl:call-template name="replace">
      <xsl:with-param name="artifact" select="./artifactId/text()"/>
     </xsl:call-template>
    </xsl:if>
    <xsl:if test="./id">
     <xsl:choose>
      <xsl:when test="substring-after(./id/text(),':') != ''">
       <xsl:call-template name="replace">
        <xsl:with-param name="artifact" select="substring-after(./id/text(),':')"/>
       </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
       <xsl:call-template name="replace">
        <xsl:with-param name="artifact" select="./id/text()"/>
       </xsl:call-template>
      </xsl:otherwise>
     </xsl:choose>
    </xsl:if>
   </xsl:for-each>
   <xsl:for-each select="document($map)//add/dependency">
    <xsl:copy-of select="."/>
   </xsl:for-each>
  </xsl:element>
 </xsl:template>
 <xsl:template name="replace">
  <xsl:param name="artifact"/>
  <xsl:variable name="this" select="."/>
  <xsl:element name="dependency">
   <xsl:choose>
    <xsl:when test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
     <xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
      <xsl:copy-of select="../jpp/*"/>
      <xsl:copy-of select="$this/properties"/>
     </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
     <xsl:copy-of select="./*"/>
    </xsl:otherwise>
   </xsl:choose>
  </xsl:element>
  <xsl:if test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
   <xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
    <xsl:for-each select="../add/dependency">
     <xsl:element name="dependency">
      <xsl:copy-of select="./*"/>
      <xsl:copy-of select="$this/properties"/>
     </xsl:element>
    </xsl:for-each>
   </xsl:for-each>
  </xsl:if>
 </xsl:template>
</xsl:stylesheet>

--- NEW FILE: joda-time.spec ---
# Copyright (c) 2000-2008, 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 section   free

Name:           joda-time
Version:        1.5.2
Release:        1jpp
Epoch:          0
Summary:        Java date and time API

Group:          Development/Libraries/Java
License:        Apache License 2.0
URL:            http://www.joda.org/
Source0:        http://prdownloads.sourceforge.net/joda-time/joda-time-1.5.2-src.tar.gz
Source1:        pom-maven2jpp-depcat.xsl
Source2:        pom-maven2jpp-newdepmap.xsl
Source3:        pom-maven2jpp-mapdeps.xsl
Source4:        %{name}-%{version}-jpp-depmap.xml

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Distribution:   JPackage
Vendor:         JPackage Project

BuildArch:      noarch
BuildRequires:  jpackage-utils >= 0:1.7.4
BuildRequires:  java-devel = 0:1.5.0
BuildRequires:  ant >= 0:1.6
BuildRequires:  ant-junit >= 0:1.6
BuildRequires:  junit
%if %{with_maven}
BuildRequires:  maven >= 0:1.1
BuildRequires:  maven-plugins-base
BuildRequires:  maven-plugin-changes
BuildRequires:  maven-plugin-changelog
BuildRequires:  maven-plugin-checkstyle
BuildRequires:  maven-plugin-developer-activity
BuildRequires:  maven-plugin-file-activity
BuildRequires:  maven-plugin-jcoverage
BuildRequires:  maven-plugin-jdiff
BuildRequires:  maven-plugin-jxr
BuildRequires:  maven-plugin-license
BuildRequires:  maven-plugin-linkcheck
BuildRequires:  maven-plugin-scm
BuildRequires:  maven-plugin-tasklist
BuildRequires:  maven-plugin-test
BuildRequires:  maven-plugin-xdoc
BuildRequires:  emma-maven-plugin
BuildRequires:  saxon
BuildRequires:  saxon-scripts
%endif
Requires:  java >= 0:1.5.0


%description
Joda-Time provides a quality replacement for the Java date 
and time classes. The design allows for multiple calendar 
systems, while still providing a simple API. The 'default' 
calendar is the ISO8601 standard which is used by XML. The 
Gregorian, Julian, Buddhist, Coptic and Ethiopic systems 
are also included, and we welcome further additions. 
Supporting classes include time zone, duration, format 
and parsing. 

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

%description    javadoc
%{summary}.

%if %{with_maven}
%package        manual
Summary:        Docs for %{name}
Group:          Development/Documentation

%description    manual
%{summary}.
%endif


%prep
%setup -q -n %{name}-%{version}-src
for j in $(find . -name "*.jar"); do
      mv $j $j.no
done

%build
%if %{with_maven}
export DEPCAT=$(pwd)/%{name}-%{version}-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} > %{name}-%{version}-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 -e \
        -Dmaven.test.failure.ignore=true \
        -Dmaven.repo.remote=file:/usr/share/maven/repository \
        -Dmaven.home.local=${MAVEN_HOME_LOCAL} \
        jar:jar javadoc:generate xdoc:transform
%else
mkdir lib
pushd lib
ln -sf $(build-classpath junit) junit-3.8.1.jar
popd
export OPT_JAR_LIST="ant/ant-junit junit"
export CLASSPATH=
ant jar javadoc test
%endif

%install
rm -rf $RPM_BUILD_ROOT
install -dm 755 $RPM_BUILD_ROOT%{_javadir}
%if %{with_maven}
install -pm 644 target/%{name}-%{version}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%else
install -pm 644 build/%{name}-%{version}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%endif
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
#
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%if %{with_maven}
cp -pr target/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
rm -rf target/docs/apidocs
%else
cp -pr build/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%endif
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
#
install -dm 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%if %{with_maven}
cp -pr target/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%endif
cp LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

%clean
rm -rf $RPM_BUILD_ROOT


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

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

%files
%defattr(-,root,root,-)
%{_docdir}/%{name}-%{version}/LICENSE.txt
%{_javadir}/*.jar

%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}

%if %{with_maven}
%files manual
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}
%endif


%changelog
* Tue May 27 2008 Ralph Apel <r.apel at r-apel.de> - 0:1.5.2-1jpp
- 1.5.2

* Mon Dec 17 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.2.1-2jpp
- Add BRs

* Mon May 22 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.2.1-1jpp
- First JPP-1.7 release


--- NEW FILE: joda-time-1.5.2-jpp-depmap.xml ---
<?xml version="1.0" encoding="utf-8"?>
<depset>
   <add>
      <dependency>
         <groupId>JPP</groupId>
         <artifactId>junit</artifactId>
         <jar>junit.jar</jar>
         <version>3.8</version>
      </dependency>
   </add>
</depset>




More information about the JPackage-commits mailing list