[Jpackage-commits] dist/stringtemplate/JPP-6 Makefile, NONE, 1.1 sources, NONE, 1.1 stringtemplate-3.1-build-junit.patch, NONE, 1.1 stringtemplate.spec, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Sat Feb 20 17:36:19 CET 2010


Update of /home/projects/jpackage/cvs/dist/stringtemplate/JPP-6
In directory ryu.zarb.org:/tmp/cvs-serv27598/JPP-6

Added Files:
	Makefile sources stringtemplate-3.1-build-junit.patch 
	stringtemplate.spec 
Log Message:
Import stringtemplate into JPP-6

--- NEW FILE: sources ---
d2f24e500de36a7edb876c31bdc73e5c  stringtemplate-3.2.1.tar.gz

--- NEW FILE: stringtemplate-3.1-build-junit.patch ---
--- build.xml.orig	2009-09-22 23:00:17.000000000 +0200
+++ build.xml	2010-01-29 03:34:13.000000000 +0100
@@ -94,6 +94,7 @@
 
     <copy todir="${build.src}" filtering="true">
       <fileset dir="${src.java}" excludes="${src.excludes}"/>
+      <fileset dir="${basedir}${file.separator}test" excludes="${src.excludes}"/>
     </copy>
   </target>
 
@@ -110,7 +111,7 @@
   <!-- =================================================================== -->
   <!-- Compiles the source code                                            -->
   <!-- =================================================================== -->
-  <target name="compile" depends="init, prepare-sources, generator" description="Compiles the sources. (Default)">
+  <target name="compile" depends="init, generator, prepare-sources" description="Compiles the sources. (Default)">
     <!-- Echo compilation properties -->
     <echo level="info" message="Compiler    = ${build.compiler}"/>
     <echo level="info" message="Optimize    = ${compile.optimize}"/>
@@ -239,7 +240,22 @@
   <!-- =================================================================== -->
   <target name="clean-all" depends="clean-classes,clean-jars, clean-dist">
     <echo message="Cleaned all."/>
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- Unit tests                                                          -->
+  <!-- =================================================================== -->
+  <target name="test" depends="compile">
+    <junit printsummary="yes" fork="yes" haltonfailure="yes">
+      <classpath>
+        <pathelement location="${build.classes}"/>
+        <pathelement location="${build.src}"/>
+        <pathelement path="${java.class.path}"/>
+      </classpath>
+
+      <formatter type="plain"/>
+      <test name="org.antlr.stringtemplate.test.TestStringTemplate"/>
+    </junit>
   </target>
-
 </project>
 

--- NEW FILE: Makefile ---
# Makefile for source rpm: stringtemplate
# $Id: Makefile,v 1.1 2010/02/20 16:36:17 jpackage Exp $
NAME := stringtemplate
SPECFILE = $(firstword $(wildcard *.spec))

define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef

MAKEFILE_COMMON := $(shell $(find-makefile-common))

ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef

MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif

include $(MAKEFILE_COMMON)

--- NEW FILE: stringtemplate.spec ---
# Copyright (c) 2000-2010, 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:        3.2.1
Release:	1%{?dist}
Epoch:          0
Summary:        A Java Template Engine
License:        BSD
Url:            http://www.stringtemplate.org/
Group:          Development/Tools
Source0:        http://www.stringtemplate.org/download/stringtemplate-%{version}.tar.gz
# Build jUnit tests + make the antlr2 generated code before preparing sources
Patch0: stringtemplate-3.1-build-junit.patch

BuildRequires:  jpackage-utils >= 0:5.0.0
BuildRequires:  java-devel = 0:1.6.0
BuildRequires:  ant >= 0:1.6.5
BuildRequires:  ant-antlr
BuildRequires:  antlr >= 0:2.7.2
Requires:  java >= 0:1.6.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:5.0.0
Requires(postun):  jpackage-utils >= 0:5.0.0

%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}

%description javadoc
%{summary}.

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

%description manual
%{summary}.
%endif

%prep
%setup -q 
%patch0
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done
ln -sf $(build-classpath antlr) lib/

%build
ant jar
ant javadocs -Dpackages= -Djavadocs.additionalparam=

%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 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap org.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
%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}

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

%changelog
* Sat Feb 20 2010 Ralph Apel <r.apel at r-apel.de> 3.2.1-1
- 3.2.1
- without manual

* Mon Dec 08 2008 Will Tatam <will.tatam at red61.com> 2.2-2
- Auto rebuild for JPackage 5 in mock

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





More information about the JPackage-commits mailing list