Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2ef7cd7a6 | ||
|
|
4c44faf56e | ||
|
|
a3b1555f0e | ||
|
|
5a7f50b6eb | ||
|
|
7d7169cc7c |
7 changed files with 210 additions and 21 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
gant_src-1.8.1.tgz
|
||||
48
0001-Fix-tests.patch
Normal file
48
0001-Fix-tests.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
From 256fc691f79ac3086d72b95504c39993fe10b87c Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Tue, 24 Nov 2009 00:46:35 +0100
|
||||
Subject: [PATCH] Fix tests
|
||||
|
||||
Disable a test that needs internet connection, make other test not need
|
||||
a home directory.
|
||||
---
|
||||
.../codehaus/gant/tests/bugs/Assorted_Test.groovy | 2 ++
|
||||
.../codehaus/gant/tests/bugs/GANT_33_Test.groovy | 2 +-
|
||||
2 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy b/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy
|
||||
index 0e9ab9b..f79b831 100644
|
||||
--- a/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy
|
||||
+++ b/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy
|
||||
@@ -74,6 +74,7 @@ def foo { badvariable }
|
||||
''' ) )
|
||||
}
|
||||
|
||||
+/*
|
||||
void test_GANT_34_originalIvycachePathProblemFixed ( ) {
|
||||
script = '''
|
||||
includeTool << gant.tools.Ivy
|
||||
@@ -90,6 +91,7 @@ target ( 'default' : '' ) {
|
||||
// same on all platforms: it contains the Ivy jar version number and some timings.
|
||||
assertEquals ( '' , error )
|
||||
}
|
||||
+*/
|
||||
|
||||
void test_GANT_49_builderBug ( ) {
|
||||
//
|
||||
diff --git a/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy b/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy
|
||||
index 9cc4e69..4a3d317 100644
|
||||
--- a/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy
|
||||
+++ b/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy
|
||||
@@ -77,7 +77,7 @@ private fileNameSuffix = '_GANT_33_Test'
|
||||
buildScriptFile.delete ( )
|
||||
// Need to ensure that this cache directory actually is the real cache directory as listed in gant.Gant.
|
||||
( new AntBuilder ( ) ).delete {
|
||||
- fileset ( dir : [ System.properties.'user.home' , '.gant' , 'cache' ].join ( System.properties.'file.separator' ) , includes : fileNamePrefix + '*' + fileNameSuffix + '*' )
|
||||
+ fileset ( dir : [ System.properties.'user.dir' , '.gant' , 'cache' ].join ( System.properties.'file.separator' ) , includes : fileNamePrefix + '*' + fileNameSuffix + '*' )
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
--
|
||||
1.6.5.2
|
||||
|
||||
61
0001-Make-it-build-against-our-jars.patch
Normal file
61
0001-Make-it-build-against-our-jars.patch
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
From 3e388bc9d05e19029b673e5b9f8a91034cc830c9 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 23 Nov 2009 06:11:11 +0100
|
||||
Subject: [PATCH] Make it build against our jars
|
||||
|
||||
---
|
||||
build.xml | 26 +++++++++++++++++++++++---
|
||||
1 files changed, 23 insertions(+), 3 deletions(-)
|
||||
|
||||
diff -up gant-1.8.1/build.xml.build gant-1.8.1/build.xml
|
||||
--- gant-1.8.1/build.xml.build 2009-10-02 13:19:13.000000000 +0200
|
||||
+++ gant-1.8.1/build.xml 2009-11-23 23:41:25.896457653 +0100
|
||||
@@ -105,6 +105,27 @@ Author : Russel Winder <russel.winder@co
|
||||
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="mavenAntTaskJarPathId"/>
|
||||
</target>
|
||||
|
||||
+ <target name="-initializeFedora">
|
||||
+ <echo message="Building with Fedora Groovy installation."/>
|
||||
+ <path id="compileJarSetPathId">
|
||||
+ <pathelement location="${groovyJar}"/>
|
||||
+ <pathelement location="${commons-cliJar}"/>
|
||||
+ <pathelement location="${asm2Jar}"/>
|
||||
+ <pathelement location="${antlrJar}"/>
|
||||
+ <pathelement location="${antJar}"/>
|
||||
+ </path>
|
||||
+ <path id="testJarSetPathId">
|
||||
+ <path refid="compileJarSetPathId"/>
|
||||
+ <pathelement location="${junitJar}"/>
|
||||
+ <pathelement location="${ant-junitJar}"/>
|
||||
+ <pathelement location="${ant-launcherJar}"/>
|
||||
+ </path>
|
||||
+ <path id="ivyJarPathId">
|
||||
+ <pathelement location="${ivyJar}"/>
|
||||
+ </path>
|
||||
+ <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="compileJarSetPathId" />
|
||||
+ </target>
|
||||
+
|
||||
<target name="-initializeWithGroovyHome" if="groovyHomeIsSet">
|
||||
<echo message="Building with the Groovy installation at $GROOVY_HOME (${environment.GROOVY_HOME})."/>
|
||||
<path id="groovyJarPathId">
|
||||
@@ -190,9 +211,9 @@ Author : Russel Winder <russel.winder@co
|
||||
<mkdir dir="${buildTestReportsDirectory}"/>
|
||||
<!-- Only need this file if GROOVY_HOME is not set but write it anyway to save the hassle of decision making. -->
|
||||
<echo file="groovyAntTaskTestVersion.properties" message="groovyAntTaskTestVersion = ${groovyVersion}"/>
|
||||
- <artifact:dependencies pathId="ivyJarPathId">
|
||||
+ <!--artifact:dependencies pathId="ivyJarPathId">
|
||||
<dependency groupId="org.apache.ivy" artifactId="ivy" version="${ivyVersion}"/>
|
||||
- </artifact:dependencies>
|
||||
+ </artifact:dependencies-->
|
||||
<path id="testClasspathPathId">
|
||||
<pathelement location="${buildTestClassesDirectory}"/>
|
||||
<path refid="mavenAntTaskJarPathId"/>
|
||||
@@ -275,7 +296,7 @@ Author : Russel Winder <russel.winder@co
|
||||
<echo message="Property installDirectory is not set, so cannot uninstall. Set installDirectory in file local.build.properties."/>
|
||||
</target>
|
||||
|
||||
- <target name="-commandLineDependencies" depends="-checkGroovyHome,-initializeWithGroovyHome,-initializeNoGroovyHome"/>
|
||||
+ <target name="-commandLineDependencies" depends="-initializeFedora"/>
|
||||
|
||||
<!--
|
||||
The targets usable from the command line.
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: gant
|
||||
# $Id$
|
||||
NAME := gant
|
||||
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 $$d/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)
|
||||
99
gant.spec
Normal file
99
gant.spec
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
%global build_jars \\\
|
||||
-DgroovyJar=%( build-classpath groovy ) \\\
|
||||
-Dcommons-cliJar=%( build-classpath commons-cli ) \\\
|
||||
-Dasm2Jar=%( build-classpath asm2/asm2 ) \\\
|
||||
-DantlrJar=%( build-classpath antlr ) \\\
|
||||
-DantJar=%( build-classpath ant ) \\\
|
||||
-DjunitJar=%( build-classpath junit ) \\\
|
||||
-Dant-junitJar=%( build-classpath ant/ant-junit ) \\\
|
||||
-Dant-launcherJar=%( build-classpath ant-launcher ) \\\
|
||||
-DivyJar=%( build-classpath ivy )
|
||||
|
||||
Name: gant
|
||||
Version: 1.8.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Groovy-based build system that uses Ant tasks
|
||||
|
||||
Group: Development/Tools
|
||||
License: ASL 2.0
|
||||
URL: http://gant.codehaus.org/
|
||||
Source0: http://dist.codehaus.org/gant/distributions/gant_src-%{version}.tgz
|
||||
Patch0: 0001-Make-it-build-against-our-jars.patch
|
||||
Patch1: 0001-Fix-tests.patch
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
BuildRequires: groovy
|
||||
BuildRequires: jakarta-commons-cli
|
||||
BuildRequires: asm2
|
||||
BuildRequires: antlr
|
||||
BuildRequires: ant
|
||||
BuildRequires: junit
|
||||
BuildRequires: ant-junit
|
||||
BuildRequires: ivy
|
||||
BuildRequires: jpackage-utils
|
||||
Requires: jpackage-utils
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Gant is a tool for scripting Ant tasks using Groovy instead of XML to
|
||||
specify the logic. A Gant specification is a Groovy script and so can bring
|
||||
all the power of Groovy to bear directly, something not possible with Ant
|
||||
scripts. Whilst it might be seen as a competitor to Ant, Gant uses Ant tasks
|
||||
for many of the actions, so Gant is really an alternative way of doing
|
||||
things using Ant, but using a programming language rather than XML to
|
||||
specify the rules.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .build
|
||||
%patch1 -p1 -b .tests
|
||||
|
||||
|
||||
%build
|
||||
find . -name '*.jar' -delete
|
||||
ant %{build_jars} package
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
install -d $RPM_BUILD_ROOT%{_javadir}
|
||||
install -p -m0644 target_gant/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}
|
||||
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||
|
||||
|
||||
%check
|
||||
|
||||
# Gant_Test "failed to create task or type urn:maven-artifact-ant:dependencies"
|
||||
rm -f src/test/groovy/org/codehaus/gant/ant/tests/Gant_Test.java
|
||||
rm -f target_gant/test-classes/org/codehaus/gant/ant/tests/Gant_Test.class
|
||||
|
||||
# For GANT_33_Test
|
||||
mkdir -p .gant/cache
|
||||
|
||||
# Run the test suite
|
||||
ant %{build_jars} test
|
||||
|
||||
# Ant always returns success, let us look at the test reports ourselves
|
||||
if FAILED=$(egrep -l 'errors="[^0]"|failures="[^0]"' \
|
||||
target_gant/test-reports/*.xml)
|
||||
then
|
||||
echo $FAILED |sed 's/\.xml/.txt/' |xargs cat
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadir}/*.jar
|
||||
%doc README_Install.txt LICENCE.txt releaseNotes.txt
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Nov 23 2009 Lubomir Rintel <lkundrak@v3.sk> - 1.8.1-1
|
||||
- Initial packaging
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
1067d000816883c072819a802fb00d81 gant_src-1.8.1.tgz
|
||||
Reference in a new issue