diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..203043c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +gant_src-1.9.1.tgz +/gant_src-1.9.8.tgz diff --git a/Makefile b/Makefile deleted file mode 100644 index b2ecfe8..0000000 --- a/Makefile +++ /dev/null @@ -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) diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..4ddbba7 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +This package was retired on 2012-08-06 due to failure to build for multiple releases. diff --git a/gant-1.9.8-Fix-tests.patch b/gant-1.9.8-Fix-tests.patch new file mode 100644 index 0000000..394d026 --- /dev/null +++ b/gant-1.9.8-Fix-tests.patch @@ -0,0 +1,33 @@ +diff -Nru gant-1.9.8/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy gant-1.9.8-gil/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy +--- gant-1.9.8/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy 2012-03-19 00:25:13.000000000 +0100 ++++ gant-1.9.8-gil/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy 2012-10-04 19:01:02.312035443 +0200 +@@ -73,7 +73,7 @@ + 1 error + ''' ) ) + } +- ++/* + void test_GANT_34_originalIvycachePathProblemFixed ( ) { + script = ''' + includeTool << gant.tools.Ivy +@@ -90,7 +90,7 @@ + // same on all platforms: it contains the Ivy jar version number and some timings. + assertEquals ( '' , error ) + } +- ++*/ + void test_GANT_49_builderBug ( ) { + // + // NB Codehaus Bamboo execution is not in a context such that +diff -Nru gant-1.9.8/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy gant-1.9.8-gil/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy +--- gant-1.9.8/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy 2012-03-19 00:25:13.000000000 +0100 ++++ gant-1.9.8-gil/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy 2012-10-04 19:02:02.190672824 +0200 +@@ -77,7 +77,7 @@ + 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 + '*' ) + } + } + ////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/gant-1.9.8-Set-includeantruntime.patch b/gant-1.9.8-Set-includeantruntime.patch new file mode 100644 index 0000000..45ed656 --- /dev/null +++ b/gant-1.9.8-Set-includeantruntime.patch @@ -0,0 +1,11 @@ +--- src/main/groovy/gant/targets/Maven.groovy 2012-03-19 00:25:13.000000000 +0100 ++++ src/main/groovy/gant/targets/Maven.groovy-gil 2012-10-04 18:49:32.869679956 +0200 +@@ -38,7 +38,7 @@ + testCompilePath : '' , // Defaults to standard Maven 2 convention. Set in constructor since it uses a GString dependent on a value in the map. + testReportPath : '' , // Defaults to standard Maven 2 convention. Set in constructor since it uses a GString dependent on a value in the map. + metadataPath : '' , // Defaults to standard Maven 2 convention. Set in constructor since it uses a GString dependent on a value in the map. +- javaCompileProperties : [ source : '1.5' , target : '1.5' , debug : 'false' ] , ++ javaCompileProperties : [ includeantruntime : 'false' , source : '1.5' , target : '1.5' , debug : 'false' ] , + groovyCompileProperties : [ : ] , + nestedJavacCompilerArgs : [ ] , + compileClasspath : [ ] , diff --git a/gant-1.9.8-build.patch b/gant-1.9.8-build.patch new file mode 100644 index 0000000..43097b2 --- /dev/null +++ b/gant-1.9.8-build.patch @@ -0,0 +1,141 @@ +--- build.gradle 2012-06-28 15:31:51.000000000 +0200 ++++ build.gradle-gil 2012-10-04 15:29:07.776096569 +0200 +@@ -52,7 +52,7 @@ + + // Nominate for each supported series of Groovy, exactly which version to use. + +-final groovyArtefactName = 'groovy-all' ++final groovyArtefactName = 'groovy' + + ext.groovyVersions = [ + '1.8' : '1.8.6' , +@@ -95,7 +95,7 @@ + + // Try the lightweight HTTP wagon. + +-final webdavWagonName = 'org.apache.maven.wagon:wagon-http-lightweight:2.0' ++//final webdavWagonName = 'org.apache.maven.wagon:wagon-http-lightweight:2.0' + + // In creating distributions which include jar files for the source, javadoc, and groovydoc, it is + // imperative to ensure that they do not get located into the library directory for jars containing +@@ -158,9 +158,10 @@ + } + } + repositories { +- if ( project.hasProperty ( 'gant_useMavenLocal' ) && gant_useMavenLocal ) { mavenLocal ( ) } +- mavenCentral ( ) +- maven { url 'http://repository.codehaus.org/' } ++ ivy { ++ artifactPattern "/usr/share/java/[module]-[revision].[ext]" ++ artifactPattern "/usr/share/java/[module].[ext]" ++ } + } + dependencies { + compile ( +@@ -169,7 +170,7 @@ + ) + testCompile 'junit:junit:4.10' + testRuntime 'org.apache.ivy:ivy:2.2.0' +- deployJars webdavWagonName ++ //deployJars webdavWagonName + } + compileGroovy.options.compilerArgs = [ '-Xlint' ] + [ compileGroovy , compileTestGroovy ]*.options*.encoding = 'UTF-8' +@@ -198,7 +199,6 @@ + final copyrightString = 'Copyright © 2006–12 The Codehaus. All Rights Reserved.' + javadoc { + options { +- overview 'overview.html' + showAll ( ) + encoding 'UTF-8' + setUse true +@@ -214,7 +214,6 @@ + javadoc.options.docTitle = javadoc.title + } + groovydoc { +- overview = 'overview.html' + includePrivate = false + use = true + windowTitle = packageTitle +@@ -346,7 +345,7 @@ + forEachDistributionVersion { projectName-> + final groovyVersion = groovyVersions[ projectName.replace ( artifact + mavenNameExtension , '' ) ] + project ( projectName ) { +- apply plugin : 'maven' ++// apply plugin : 'maven' + dependencies { groovy ( group : 'org.codehaus.groovy' , name : groovyArtefactName , version : groovyVersion ) } + compileGroovy.doFirst { println ( '\n\tUsing Groovy version ' + groovyVersion + '\n' ) } + final buildPath = [ System.properties.'user.dir' , projectName , 'build' , 'classes' ] +@@ -359,7 +358,7 @@ + gradleClasspathString : classPath.join ( System.properties.'path.separator' ) + ] ) + +- install.repositories.mavenInstaller { pom pomSpecification } ++// install.repositories.mavenInstaller { pom pomSpecification } + gradle.taskGraph.whenReady { taskGraph -> + if ( taskGraph.hasTask ( uploadArchives ) ) { + if ( ! project.hasProperty ( 'gant_experimentalMavenRepository' ) && ! ( project.hasProperty ( 'codehausUsername') && project.hasProperty ( 'codehausPassword' ) ) ) { +@@ -368,24 +367,24 @@ + if ( ! signingPropertiesAreSet ( ) ) { + throw new RuntimeException ( 'Must define signing.keyId, signing.password, and signing.secretKeyRingFile' ) + } +- uploadArchives.repositories.mavenDeployer { +- uniqueVersion = false +- configuration = configurations.deployJars +- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } +- if ( project.hasProperty ( 'gant_experimentalMavenRepository' ) ) { +- repository url : "file://${rootProject.buildDir}/${gant_experimentalMavenRepository}" +- } else { ++// uploadArchives.repositories.mavenDeployer { ++// uniqueVersion = false ++// configuration = configurations.deployJars ++// beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } ++// if ( project.hasProperty ( 'gant_experimentalMavenRepository' ) ) { ++// repository url : "file://${rootProject.buildDir}/${gant_experimentalMavenRepository}" ++// } else { + //repository ( url : 'dav:https://dav.codehaus.org/repository/gant/' ) { +- repository ( url : 'https://dav.codehaus.org/repository/gant/' ) { +- authentication userName : codehausUsername , password : codehausPassword +- } ++// repository ( url : 'https://dav.codehaus.org/repository/gant/' ) { ++// authentication userName : codehausUsername , password : codehausPassword ++// } + //snapshotRepository ( url : 'dav:https://dav.codehaus.org/snapshots.repository/gant/' ) { +- snapshotRepository ( url : 'https://dav.codehaus.org/snapshots.repository/gant/' ) { +- authentication userName: codehausUsername , password : codehausPassword +- } +- } +- pom pomSpecification +- } ++// snapshotRepository ( url : 'https://dav.codehaus.org/snapshots.repository/gant/' ) { ++// authentication userName: codehausUsername , password : codehausPassword ++// } ++// } ++// pom pomSpecification ++// } + } + } + final binCopySpec = copySpec { +@@ -603,7 +602,7 @@ + } + + dependencies { +- distribution ( webdavWagonName ) ++ //distribution ( webdavWagonName ) + } + + task buildDistribution ( dependsOn : distributionTasks , description : 'Build all the uploadable distribution archives.' ) +@@ -661,11 +660,11 @@ + // http://markmail.org/thread/niseybxbjynckr2c#query:+page:1+mid:5dntrp2cwfoodxjx+state:results + + artifacts { +- new org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact ( 'gant-standalone' , 'deb' , 'deb' , null , new Date ( ) , file ( debsDirectory.absolutePath + '/' + createdDebFileName ) ) ++ //new org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact ( 'gant-standalone' , 'deb' , 'deb' , null , new Date ( ) , file ( debsDirectory.absolutePath + '/' + createdDebFileName ) ) + } + + dependencies { +- debs webdavWagonName ++ //debs webdavWagonName + } + + task buildDebs ( dependsOn : debTasks , description : 'Build all the uploadable debs.' ) diff --git a/gant-1.9.8-disable-groovy2.patch b/gant-1.9.8-disable-groovy2.patch new file mode 100644 index 0000000..ce30da0 --- /dev/null +++ b/gant-1.9.8-disable-groovy2.patch @@ -0,0 +1,29 @@ +diff -Nru gant-1.9.8/build.gradle gant-1.9.8-gil/build.gradle +--- gant-1.9.8/build.gradle 2012-10-04 15:30:28.793359719 +0200 ++++ gant-1.9.8-gil/build.gradle 2012-10-04 15:31:16.150584006 +0200 +@@ -55,14 +55,13 @@ + final groovyArtefactName = 'groovy' + + ext.groovyVersions = [ +- '1.8' : '1.8.6' , +- '2.0' : '2.0.0' ++ '1.8' : '1.8.6' + ] + + // One series of Groovy needs using for the standalone distribution. This version of Groovy will be packaged with + // the "standalone" distribution of Gant. It will generally be the latest widely available released version of Groovy. + +-final groovyStandaloneSeries = '2.0' ++final groovyStandaloneSeries = '1.8' + + // Organize the build using subprojects. There is a subproject gant which is for the build using the + // locally installed Groovy and there is one for each version of Groovy obtained from the Maven repository +diff -Nru gant-1.9.8/settings.gradle gant-1.9.8-gil/settings.gradle +--- gant-1.9.8/settings.gradle 2012-05-03 14:59:23.000000000 +0200 ++++ gant-1.9.8-gil/settings.gradle 2012-10-04 15:18:19.258357738 +0200 +@@ -14,4 +14,4 @@ + // + // Author : Russel Winder + +-include 'gant' , 'gant_groovy1.8' , 'gant_groovy2.0' ++include 'gant' , 'gant_groovy1.8' diff --git a/gant-1.9.8-groovy-libaries.patch b/gant-1.9.8-groovy-libaries.patch new file mode 100644 index 0000000..97857fe --- /dev/null +++ b/gant-1.9.8-groovy-libaries.patch @@ -0,0 +1,41 @@ +--- build.gradle 2012-10-04 15:31:16.150584006 +0200 ++++ build.gradle-gil 2012-10-04 16:49:03.029105123 +0200 +@@ -162,11 +162,20 @@ + artifactPattern "/usr/share/java/[module].[ext]" + } + } ++ + dependencies { + compile ( + 'commons-cli:commons-cli:1.2' , + 'org.apache.ant:ant:1.8.4' + ) ++ libraries = [ ++ groovy: [ ++ 'org.codehaus.groovy:groovy:1.8.6@jar', ++ 'asm:objectweb-asm/asm-all:3.3.1@jar', ++ 'antlr:antlr:2.7.7@jar', ++ 'commons-cli:commons-cli:1.2@jar' ++ ] ++ ] + testCompile 'junit:junit:4.10' + testRuntime 'org.apache.ivy:ivy:2.2.0' + //deployJars webdavWagonName +@@ -272,7 +281,7 @@ + groovyVersion = groovyVersions[groovyStandaloneSeries] + versionMessage = 'Using Groovy version ' + groovyVersion + } +- dependencies { groovy ( group : 'org.codehaus.groovy' , name : groovyArtefactName , version : groovyVersion ) } ++ dependencies { groovy libraries.groovy } + compileGroovy.doFirst { println ( '\n\t' + versionMessage +'\n' ) } + final buildPath = [ System.properties.'user.dir' , 'gant' , 'build' , 'classes' ] + final classPath = [ ] +@@ -345,7 +354,7 @@ + final groovyVersion = groovyVersions[ projectName.replace ( artifact + mavenNameExtension , '' ) ] + project ( projectName ) { + // apply plugin : 'maven' +- dependencies { groovy ( group : 'org.codehaus.groovy' , name : groovyArtefactName , version : groovyVersion ) } ++ dependencies { groovy libraries.groovy } + compileGroovy.doFirst { println ( '\n\tUsing Groovy version ' + groovyVersion + '\n' ) } + final buildPath = [ System.properties.'user.dir' , projectName , 'build' , 'classes' ] + final classPath = [ ] diff --git a/gant-script b/gant-script new file mode 100644 index 0000000..b21c541 --- /dev/null +++ b/gant-script @@ -0,0 +1,12 @@ +#!/bin/sh +# +# Gant startup script +# Lubomir Rintel + +export GROOVY_CONF="/etc/gant-starter.conf" +ANT_HOME="/usr/share/ant" +BASE_JARS="$BASE_JARS gant" +BASE_JARS="$BASE_JARS ../../lib/jvm/java/lib/tools" +JAVA_OPTS="$JAVA_OPTS -Dant.home=$ANT_HOME" +CLASS=gant.Gant +. "$(dirname "$0")"/groovy \ No newline at end of file diff --git a/gant.spec b/gant.spec new file mode 100644 index 0000000..c2dc825 --- /dev/null +++ b/gant.spec @@ -0,0 +1,171 @@ +%global gmajver 1.8 + +Name: gant +Version: 1.9.8 +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/%{name}/distributions/%{name}_src-%{version}.tgz +# TODO remove these poms when gradle maven plugin work properly +# or change the pom file with proper groovy version +Source1: http://repo1.maven.org/maven2/org/codehaus/gant/gant_groovy%{gmajver}/%{version}/gant_groovy%{gmajver}-%{version}.pom +Source2: %{name}-script + +# use gradle ivy plugin, maven plugin isnt available +# remove wagon webdav references +# remove overview.html, break docs build +Patch0: %{name}-%{version}-build.patch +# groovy 2.x isnt available +Patch1: %{name}-%{version}-disable-groovy2.patch +# Gant uses groovy-all.jar which bundles all dependencies and +# this is NOT allowed in Fedora +# we need to use clean groovy.jar and point its dependencies +Patch2: %{name}-%{version}-groovy-libaries.patch +# lkundrak patches +Patch3: %{name}-%{version}-Set-includeantruntime.patch +Patch4: %{name}-%{version}-Fix-tests.patch + +BuildRequires: java-devel +BuildRequires: jpackage-utils + +BuildRequires: antlr-tool +BuildRequires: objectweb-asm +# main deps +BuildRequires: ant +BuildRequires: apache-commons-cli +BuildRequires: groovy + +BuildRequires: gradle + +# test deps +BuildRequires: apache-ivy +BuildRequires: junit + +Requires: ant +Requires: antlr-tool +Requires: apache-commons-cli +Requires: groovy +Requires: objectweb-asm + +Requires: java-devel +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. + +%package javadoc +Group: Documentation +Summary: Javadoc for %{name} +Requires: jpackage-utils + +%description javadoc +This package contains javadoc for %{name}. + +%prep +%setup -q +find . -name "*.bat" -delete +find . -name "*.class" -delete +find . -name "*.jar" -delete + +%patch0 -p0 +%patch1 -p1 +%patch2 -p0 +%patch3 -p0 +%patch4 -p1 + +%build + +export GRADLE_USER_HOME=$PWD +mkdir -p gradlehome +gradle jar groovydoc -g $PWD/gradlehome -b $PWD/build.gradle + +%install + +mkdir -p %{buildroot}%{_javadir} +install -pm 644 %{name}_groovy%{gmajver}/build/libs/%{name}_groovy%{gmajver}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar + +mkdir -p %{buildroot}%{_mavenpomdir} +# TODO use the poms files generated by gradle maven plugin +install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom + +# use also generic aId in depmap +%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.codehaus.%{name}:%{name}" + +mkdir -p %{buildroot}%{_javadocdir}/%{name} +cp -pr %{name}_groovy%{gmajver}/build/docs/groovydoc/* %{buildroot}%{_javadocdir}/%{name} + +mkdir -p %{buildroot}%{_mandir}/man1/ +install -pm 644 documentation/%{name}.1 %{buildroot}%{_mandir}/man1/ + +mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d +install -pm 644 scripts/bash_completion.d/%{name} %{buildroot}%{_sysconfdir}/bash_completion.d +install -pm 644 scripts/conf/%{name}-starter.conf %{buildroot}%{_sysconfdir}/ + +mkdir -p %{buildroot}%{_bindir} +install -pm 755 %{SOURCE2} %{buildroot}%{_bindir}/%{name} + +%check +# Gant_Test "failed to create task or type urn:maven-artifact-ant:dependencies" +rm -r src/test/groovy/org/codehaus/gant/ant/tests/Gant_Test.java +rm -f build/classes/test/org/codehaus/gant/ant/tests/Gant_Test.class + +# For GANT_33_Test +mkdir -p .gant/cache +# TODO: failures; get them fixed and remove || : +gradle integTest Test -g $PWD/gradlehome -b $PWD/build.gradle || : + +%files +%{_javadir}/%{name}.jar +%{_bindir}/%{name} +%{_mandir}/man1/* +%config(noreplace) %{_sysconfdir}/bash_completion.d/%{name} +%config(noreplace) %{_sysconfdir}/%{name}-starter.conf +%{_mavenpomdir}/JPP-%{name}.pom +%{_mavendepmapfragdir}/%{name} +%doc LICENCE.txt README_Install.txt releaseNotes.txt + +%files javadoc +%{_javadocdir}/%{name} +%doc LICENCE.txt + +%changelog +* Thu Oct 04 2012 gil cattaneo 1.9.8-1 +- update to 1.9.8 +- built with groovy 1.8.x support +- added maven pom +- adapted to current guideline +- added new sub package: javadoc + +* Thu Jul 19 2012 Fedora Release Engineering - 1.8.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 1.8.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 1.8.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sat Dec 11 2010 Lubomir Rintel - 1.8.1-5 +- Fix tests run + +* Fri Mar 5 2010 Lubomir Rintel - 1.8.1-4 +- Include JDK tools in classpath + +* Thu Mar 4 2010 Lubomir Rintel - 1.8.1-3 +- Fix build with Groovy 1.7 + +* Thu Dec 24 2009 Lubomir Rintel - 1.8.1-2 +- Add manual +- Add bash completion configuration +- Add startup script +* Mon Nov 23 2009 Lubomir Rintel - 1.8.1-1 +- Initial packaging \ No newline at end of file diff --git a/gant_groovy1.8-1.9.8.pom b/gant_groovy1.8-1.9.8.pom new file mode 100644 index 0000000..2ec1757 --- /dev/null +++ b/gant_groovy1.8-1.9.8.pom @@ -0,0 +1,54 @@ + + + 4.0.0 + org.codehaus.gant + gant_groovy1.8 + 1.9.8 + Gant + A framework for programming dependencies. + http://gant.codehaus.org.uk + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + Russel Winder + + + + scm:git@github.com:Gant/Gant.git + scm:git@github.com:Gant/Gant.git + scm:git@github.com:Gant/Gant.git + + + + org.apache.ivy + ivy + 2.2.0 + test + + + org.apache.ant + ant + 1.8.4 + compile + + + commons-cli + commons-cli + 1.2 + compile + + + junit + junit + 4.10 + test + + + diff --git a/sources b/sources index e69de29..8067181 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +2d5e90753395819dc6faac21ff948cc3 gant_src-1.9.8.tgz