[Jpackage-commits] dist/stringtemplate/devel .cvsignore, 1.1, 1.2 sources, 1.1, 1.2 stringtemplate-2.2-LICENSE.txt, NONE, 1.1 stringtemplate-2.2-build.xml, NONE, 1.1 stringtemplate-2.2.pom, NONE, 1.1 stringtemplate.spec, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Wed May 28 21:50:04 CEST 2008


Update of /home/projects/jpackage/cvs/dist/stringtemplate/devel
In directory ryu.zarb.org:/tmp/cvs-serv26052/devel

Modified Files:
	.cvsignore sources 
Added Files:
	stringtemplate-2.2-LICENSE.txt stringtemplate-2.2-build.xml 
	stringtemplate-2.2.pom stringtemplate.spec 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/stringtemplate/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 19:49:44 -0000	1.1
--- .cvsignore	28 May 2008 19:50:02 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ stringtemplate-2.2.tar.gz

--- NEW FILE: stringtemplate-2.2-LICENSE.txt ---
[The "BSD licence"]
Copyright (c) 2003-2008 Terence Parr
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. The name of the author may not be used to endorse or promote products
    derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.

--- NEW FILE: stringtemplate-2.2.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>antlr</groupId>
  <artifactId>stringtemplate</artifactId>
  <name>StringTemplate</name>
  <version>2.2</version>
  <dependencies>
    <dependency>
      <groupId>antlr</groupId>
      <artifactId>antlr</artifactId>
      <version>2.7.2</version>
    </dependency>
  </dependencies>
</project>
--- NEW FILE: stringtemplate.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.
#

%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}

Name:           stringtemplate
Version:        2.2
Release:        1jpp
Epoch:          0
Summary:        StringTemplate Template Engine
License:        BSD
Url:            http://www.stringtemplate.org/
Group:          Development/Tools
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
Source0:        http://www.stringtemplate.org/download/stringtemplate-2.2.tar.gz
Source1:        stringtemplate-2.2.pom
Source2:        stringtemplate-2.2-build.xml
Source3:        stringtemplate-2.2-LICENSE.txt

BuildRequires:  jpackage-utils >= 0:1.7.4
BuildRequires:  java-devel = 0:1.5.0
BuildRequires:  ant >= 0:1.6.5
BuildRequires:  ant-antlr
BuildRequires:  antlr >= 0:2.7.2
Requires:  java >= 0:1.5.0
Requires:  antlr >= 0:2.7.2
%if ! %{gcj_support}
Buildarch:     noarch
%endif
Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%if %{gcj_support}
BuildRequires:          java-gcj-compat-devel
Requires(post):         java-gcj-compat
Requires(postun):       java-gcj-compat
%endif

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

%description
StringTemplate is a java template engine (with ports for C#
and Python) for generating source code, web pages, emails, 
or any other formatted text output. StringTemplate is 
particularly good at multi-targeted code generators, multiple 
site skins, and internationalization/localization. It evolved 
over years of effort developing jGuru.com. StringTemplate 
also generates this website and powers the ANTLR v3 code 
generator. Its distinguishing characteristic is that it 
strictly enforces model-view separation unlike other engines.

%package javadoc
Group:          Development/Documentation
Summary:        Javadoc for %{name}
Requires(post):   /bin/rm,/bin/ln
Requires(postun): /bin/rm

%description javadoc
%{summary}.

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

%description manual
%{summary}.

%prep
%setup -q 
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done
ln -sf $(build-classpath antlr) lib/
cp %{SOURCE2} build.xml
cp %{SOURCE3} LICENSE.txt

%build
export JAVA_HOME=%{_jvmdir}/java-1.5.0
ant -Dversion=2.2 '-Dbuild.packages=org.antlr.stringtemplate.*' -Djavadocs.additionalparam= release

%install
rm -rf $RPM_BUILD_ROOT
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap antlr %{name} %{version} JPP %{name}

install -m 644 build/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar

pushd $RPM_BUILD_ROOT%{_javadir}
for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done
popd

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}

# manual
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
install -m 644 LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr doc $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/

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


%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

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

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

%files
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}/LICENSE.txt
%{_javadir}/*
%{_datadir}/maven2
%{_mavendepmapfragdir}
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif

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

%files manual
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}/doc

%changelog
* Tue Feb 26 2008 Ralph Apel <r.apel at r-apel.de> - 0:2.2-1jpp
- First release


Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/stringtemplate/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 19:49:44 -0000	1.1
--- sources	28 May 2008 19:50:02 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 0192907eab75df1cb5abe1f7b279e82b  stringtemplate-2.2.tar.gz

--- NEW FILE: stringtemplate-2.2-build.xml ---
<?xml version="1.0"?>

<!-- ===================================================================== -->
<!-- StringTemplate build file (contributed by Dieter Wimberger)           -->
<!-- Terence says: I have no idea whether this does anything useful.       -->
<!-- Somebody can fix it; seems to be almost right                         -->
<!-- ===================================================================== -->
<project name="stringtemplate" default="compile" basedir=".">

  <target name="init">
    <tstamp>
      <format property="src.timestamp" pattern="dd/MM/yyyy"/>
      <format property="year" pattern="2006-yyyy"/>
    </tstamp>

    <!-- Allow any user specific values to override the defaults -->
    <property file="./build.properties"/>

    <property name="language.dir"
       value="${basedir}${file.separator}src${file.separator}org${file.separator}antlr${file.separator}stringtemplate${file.separator}language"/>

    <property name="action.g" value="${language.dir}/action.g" />
    <property name="angle.bracket.template.g" value="${language.dir}/angle.bracket.template.g" />
    <property name="eval.g" value="${language.dir}/eval.g" />
    <property name="group.g" value="${language.dir}/group.g" />
    <property name="interface.g" value="${language.dir}/interface.g" />
    <property name="template.g" value="${language.dir}/template.g" />

    <property name="Name" value="stringtemplate"/>
    <property name="name" value="stringtemplate"/>
    <property name="copyright" value="${year} Terence Parr"/>

    <!-- Filters -->
    <filter token="date" value="${src.timestamp}"/>
    <filter token="version" value="${version}"/>
    <filter token="copyright" value="${copyright}"/>

    <!-- Source related properties -->
    <property name="src.dir" value="${basedir}${file.separator}src"/>
    <property name="src.java" value="${src.dir}"/>
    <property name="lib.dir" value="${basedir}${file.separator}lib${file.separator}"/>
    <property name="src.excludes" value=""/>

    <!-- Build related properties -->
    <property name="build.dir" value="${basedir}${file.separator}build"/>
    <property name="build.src" value="${build.dir}${file.separator}src"/>
    <property name="build.classes" value="${build.dir}${file.separator}classes"/>
    <property name="build.javadocs" value="${basedir}${file.separator}docs${file.separator}api"/>
    <property name="build.jar" value="${build.dir}${file.separator}${name}.jar"/>

    <path id="build.classpath">
        <pathelement location="${antlr2.jar}"/>
    </path>

<!--
    <path id="build.classpath">
        <fileset dir="${lib.dir}">
          <include name="**/*.jar" />
        </fileset>
    </path>
-->

    <property name="build.dist" value="${build.dir}${file.separator}${name}-${version}"/>

    <property name="dist.basedir" value="${build.dir}"/>
    <property name="dist.includes" value="${name}${file.separator}**"/>
    <property name="dist.excludes"
      value="**/prj/**,
            **/dist/**,
             **/test/**,
             **/model/**,
             **/build/**,
             **/.DS_Store"
      />
    <property name="packages" value="${build.packages}"/>
    <property name="library.includes" value="${bundle.includes}"/>

  </target>


  <!-- =================================================================== -->
  <!-- Basic build targets                                                 -->
  <!-- =================================================================== -->
  <target name="prepare-sources" depends="init">
    <mkdir dir="${build.dir}"/>
    <mkdir dir="${build.src}"/>
    <!-- specific filters -->
    <filter token="commentstart" value="${line.separator}"/>
    <filter token="commentend" value=""/>

    <copy todir="${build.src}" filtering="true">
      <fileset dir="${src.java}" excludes="${src.excludes}"/>
    </copy>
  </target>


   <target name="generator">
        <antlr target="${action.g}" />
        <antlr target="${template.g}" />
        <antlr target="${angle.bracket.template.g}" />
        <antlr target="${eval.g}" />
        <antlr target="${group.g}" />
<!--
        <antlr target="${interface.g}" />
-->
   </target>

  <!-- =================================================================== -->
  <!-- Compiles the source code                                            -->
  <!-- =================================================================== -->
  <target name="compile" depends="init, prepare-sources, generator" description="Compiles the sources. (Default)">
    <!-- Echo compilation properties -->
    <echo level="info" message="Compiler    = ${build.compiler}"/>
    <echo level="info" message="Optimize    = ${compile.optimize}"/>
    <echo level="info" message="Deprecation = ${compile.deprecation}"/>
    <echo level="info" message="Debug       = ${compile.debug}"/>

    <mkdir dir="${build.classes}"/>
    <javac srcdir="${build.src}"
      destdir="${build.classes}"
      debug="${compile.debug}"
      optimize="${compile.optimize}"
      deprecation="${compile.deprecation}"
	  source="1.4"
	  target="1.4"
      >
      <classpath refid="build.classpath"/>
      </javac>
  </target>

  <!-- =================================================================== -->
  <!-- Creates the jar archive                                             -->
  <!-- =================================================================== -->
  <target name="jar" depends="init,compile" description="Builds the library (.jar).">
    <jar jarfile="${build.jar}"
      basedir="${build.classes}"
      includes="**/*.class">
    </jar>
  </target>

  <!-- =================================================================== -->
  <!-- Create gzipped tarball                                              -->
  <!-- =================================================================== -->
  <target name="dist" depends="init,compile,jar">
    <mkdir dir="${build.dist}"/>
    <tar tarfile="${build.dist}${file.separator}${name}${version}.tar"
      basedir="${dist.basedir}"
      includes="${dist.includes}"
      excludes="${dist.excludes}"
      />
    <gzip zipfile="${build.dist}${file.separator}${name}${version}.tar.gz" src="${build.dist}${file.separator}${name}${version}.tar"/>
    <delete file="${build.dist}${file.separator}${name}${version}.tar"/>

  </target>

  <!-- =================================================================== -->
  <!-- Create zip distribution                                             -->
  <!-- =================================================================== -->
  <target name="zipdist" depends="init,compile,jar">
    <mkdir dir="${build.dist}"/>
    <echo level="info" message="build.dist = ${build.dist}"/>
    <echo level="info" message="dist.includes = ${dist.includes}"/>

    <zip zipfile="${build.dist}${file.separator}${name}${version}.zip"
      basedir="${dist.basedir}"
      includes="${dist.includes}"
      excludes="${dist.excludes}"
      />
  </target>


  <!-- =================================================================== -->
  <!-- Create docs distribution                                            -->
  <!-- =================================================================== -->
  <target name="docsdist" depends="init,javadocs">
    <zip zipfile="${build.dist}${file.separator}${name}${version}_docs.zip"
      basedir="${basedir}"
      includes="docs/**"
      />
  </target>

  <!-- =================================================================== -->
  <!-- Generate release                                                    -->
  <!-- =================================================================== -->
  <target name="release" depends="clean-all,jar,javadocs,dist,zipdist">
    <echo message="Created release ${version}"/>
  </target>

  <!-- =================================================================== -->
  <!-- Creates the API documentation                                       -->
  <!-- =================================================================== -->
  <target name="javadocs" depends="init,prepare-sources">
    <mkdir dir="${build.javadocs}"/>
    <javadoc packagenames="${packages}"
      sourcepath="${build.src}"
      destdir="${build.javadocs}"
      author="true"
      version="true"
      windowtitle="${Name} API"
      doctitle="${Name} API Documentation"
      bottom="Copyright © ${copyright}"
      additionalparam="${javadocs.additionalparam}"
      />
  </target>

  <!-- =================================================================== -->
  <!-- Cleans up generated classes                                         -->
  <!-- =================================================================== -->
  <target name="clean-classes" depends="init">
    <delete dir="${build.classes}"/>
  </target>

  <!-- =================================================================== -->
  <!-- Cleans up generated javadocs                                        -->
  <!-- =================================================================== -->
  <target name="clean-docs" depends="init">
    <delete dir="${build.javadocs}"/>
  </target>

  <!-- =================================================================== -->
  <!-- Cleans up generated jars                                             -->
  <!-- =================================================================== -->
  <target name="clean-jars" depends="init">
    <delete file="${build.jar}"/>
  </target>


  <!-- =================================================================== -->
  <!-- Cleans up generated distributions                               -->
  <!-- =================================================================== -->
  <target name="clean-dist" depends="init">
    <delete dir="${build.dist}"/>
  </target>

  <!-- =================================================================== -->
  <!-- Cleans up all                                                       -->
  <!-- =================================================================== -->
  <target name="clean-all" depends="clean-classes,clean-jars, clean-dist">
    <echo message="Cleaned all."/>
  </target>

</project>





More information about the JPackage-commits mailing list