Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37887836
en ru br
ALT Linux repos
5.0: 1.0-alt1_0.rc3.1jpp5

Group :: Development/Java
RPM: gmaven

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Packager: Igor Vlasenko <viy at altlinux.ru>
BuildRequires: /proc
BuildRequires: jpackage-compat
# 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 0

%define named_version 1.0-rc-3

Summary:        Groovy Maven Integration
Name:           gmaven
Version:        1.0
Release:        alt1_0.rc3.1jpp5
Epoch:          0
Group:          Development/Java
License:        ASL 2.0
URL:            http://groovy.codehaus.org/GMaven
Source0:        %{name}-%{named_version}.tar.gz
# svn export https://svn.codehaus.org/groovy/gmaven/tags/gmaven-1.0-rc-3

Source1:        %{name}-jpp-depmap.xml
Source2:        %{name}-settings.xml
Source3:        apache-jar-resource-bundle-1.3.jar

Patch0:         gmaven-support-slf4j-gossip-pom.patch
Patch1:         gmaven-feature-api-pom.patch
Patch2:         gmaven-packaging-pom.patch
Patch3:         gmaven-plugin-pom.patch
Patch4:         gmaven-pom.patch

BuildRequires: jpackage-utils >= 0:1.7.5
BuildRequires: junit
BuildRequires: maven2 >= 0:2.0.7
BuildRequires: maven2-plugin-antrun
BuildRequires: maven2-plugin-assembly
BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-dependency
#BuildRequires:  maven2-plugin-enforcer
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven2-plugin-plugin
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-source
BuildRequires: maven-archetype2
BuildRequires: maven-surefire-plugin
BuildRequires: mojo-maven2-plugin-build-helper
BuildRequires: mojo-maven2-plugin-cobertura
BuildRequires: mojo-maven2-plugin-shitty
BuildRequires: plexus-maven-plugin

BuildRequires: ant
BuildRequires: groovy
BuildRequires: groovy11
BuildRequires: jakarta-commons-lang
BuildRequires: jline
BuildRequires: junit
BuildRequires: maven-shared-file-management
BuildRequires: maven-shared-reporting-impl
BuildRequires: plexus-container-default
BuildRequires: plexus-digest
BuildRequires: plexus-utils
BuildRequires: qdox
BuildRequires: slf4j


Requires: ant
Requires: groovy
Requires: jakarta-commons-lang
Requires: jline
Requires: junit
Requires: maven-shared-file-management
Requires: maven-shared-reporting-impl
Requires: plexus-container-default
Requires: plexus-digest
Requires: plexus-utils
Requires: qdox
Requires: slf4j
Provides:       mojo-maven2-groovy = 1:17
Obsoletes:      mojo-maven2-groovy < 0:17

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

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

%description
GMaven provides integration of the Groovy language into Maven.
With GMaven you can:
* Build Groovy Projects
* Execute Groovy Code
* Run Groovy Tools
* Implement Maven Plugins
Advanced:
* Groovy Runtime
* Advanced Configuration

%package runtime-1.0
Group:          Development/Java
Summary:        Groovy 1.0 Runtime for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: groovy
Provides:       mojo-maven2-groovy-runtime10 = 1:17
Obsoletes:      mojo-maven2-groovy-runtime10 < 0:17
Provides:       mojo-maven2-groovy-runtime11 = 1:17
Obsoletes:      mojo-maven2-groovy-runtime11 < 0:17

%description runtime-1.0
%{summary}.

%package runtime-1.5
Group:          Development/Java
Summary:        Groovy 1.5 Runtime for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: groovy15

%description runtime-1.5
%{summary}.

%package runtime-1.6
Group:          Development/Java
Summary:        Groovy 1.6 Runtime for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: groovy15

%description runtime-1.6
%{summary}.

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

%description javadoc
%{summary}.

%prep
%setup -q -n %{name}-%{named_version}
mkdir -p gmaven-feature/gmaven-feature-api/src/test/resources
%patch0 -b .sav0
%patch1 -b .sav1
%patch2 -b .sav2
%patch3 -b .sav3
%patch4 -b .sav4
rm gmaven-support/slf4j-gossip/src/test/java/org/codehaus/groovy/maven/gossip/config/ColorRendererTest.java

%build
cp %{SOURCE2} maven2-settings.xml

sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" maven2-settings.xml
sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" maven2-settings.xml

mkdir external_repo
ln -s %{_javadir} external_repo/JPP

export JAVA_HOME=%{_jvmdir}/java-1.5.0


export M2SETTINGS=$(pwd)/maven2-settings.xml
export MAVEN_REPO_LOCAL=`pwd`/m2_repo/repository

mkdir -p $MAVEN_REPO_LOCAL/org.apache
cp %{SOURCE3} $MAVEN_REPO_LOCAL/org.apache/apache-jar-resource-bundle.jar

export MAVEN_OPTS="-Xmx512m"

mvn-jpp -e \
       -s ${M2SETTINGS} \
       -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
       -Dmaven2.jpp.depmap.file=%{SOURCE1} \
       install

mvn-jpp -e \
       -s ${M2SETTINGS} \
       -Daggregate=true \
       -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
       -Dmaven2.jpp.depmap.file=%{SOURCE1} \
       javadoc:javadoc

%install

# jars

install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms

#BUILD/gmaven-1.0-rc-3/pom.xml

install -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-gmaven.pom
%add_to_maven_depmap org.codehaus.groovy.maven gmaven %{named_version} JPP/%{name} gmaven

#BUILD/gmaven-1.0-rc-3/gmaven-archetypes/pom.xml

install -m 644 gmaven-archetypes/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-archetypes.pom
%add_to_maven_depmap org.codehaus.groovy.maven.archetypes gmaven-archetypes %{named_version} JPP/%{name} archetypes

#BUILD/gmaven-1.0-rc-3/gmaven-archetypes/gmaven-archetype-basic/pom.xml

install -m 644 gmaven-archetypes/gmaven-archetype-basic/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-archetype-basic.pom
%add_to_maven_depmap org.codehaus.groovy.maven.archetypes gmaven-archetype-basic %{named_version} JPP/%{name} archetype-basic
#BUILD/gmaven-1.0-rc-3/gmaven-archetypes/gmaven-archetype-basic/target/gmaven-archetype-basic-1.0-rc-3.jar
install -m 644 gmaven-archetypes/gmaven-archetype-basic/target/gmaven-archetype-basic-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/archetype-basic-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-archetypes/gmaven-archetype-mojo/pom.xml

install -m 644 gmaven-archetypes/gmaven-archetype-mojo/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-archetype-mojo.pom
%add_to_maven_depmap org.codehaus.groovy.maven.archetypes gmaven-archetype-mojo %{named_version} JPP/%{name} archetype-mojo
#BUILD/gmaven-1.0-rc-3/gmaven-archetypes/gmaven-archetype-mojo/target/gmaven-archetype-mojo-1.0-rc-3.jar
install -m 644 gmaven-archetypes/gmaven-archetype-mojo/target/gmaven-archetype-mojo-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/archetype-mojo-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-common/pom.xml

install -m 644 gmaven-common/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-common.pom
%add_to_maven_depmap org.codehaus.groovy.maven gmaven-common %{named_version} JPP/%{name} common
#BUILD/gmaven-1.0-rc-3/gmaven-common/target/gmaven-common-1.0-rc-3.jar
install -m 644 gmaven-common/target/gmaven-common-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/common-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-examples/pom.xml

install -m 644 gmaven-examples/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-examples.pom
%add_to_maven_depmap org.codehaus.groovy.maven.examples gmaven-examples %{named_version} JPP/%{name} examples

#BUILD/gmaven-1.0-rc-3/gmaven-examples/clean-maven-plugin/pom.xml

install -m 644 gmaven-examples/clean-maven-plugin/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-clean-maven-plugin.pom
%add_to_maven_depmap org.codehaus.groovy.maven.examples clean-maven-plugin %{named_version} JPP/%{name} clean-maven-plugin
#BUILD/gmaven-1.0-rc-3/gmaven-examples/clean-maven-plugin/target/clean-maven-plugin-1.0-rc-3.jar
install -m 644 gmaven-examples/clean-maven-plugin/target/clean-maven-plugin-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/clean-maven-plugin-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-examples/install-maven-plugin/pom.xml

install -m 644 gmaven-examples/install-maven-plugin/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-install-maven-plugin.pom
%add_to_maven_depmap org.codehaus.groovy.maven.examples install-maven-plugin %{named_version} JPP/%{name} install-maven-plugin
#BUILD/gmaven-1.0-rc-3/gmaven-examples/install-maven-plugin/target/install-maven-plugin-1.0-rc-3.jar
install -m 644 gmaven-examples/install-maven-plugin/target/install-maven-plugin-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/install-maven-plugin-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-feature/pom.xml

install -m 644 gmaven-feature/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-feature.pom
%add_to_maven_depmap org.codehaus.groovy.maven.feature gmaven-feature %{named_version} JPP/%{name} feature

#BUILD/gmaven-1.0-rc-3/gmaven-feature/gmaven-feature-api/pom.xml

install -m 644 gmaven-feature/gmaven-feature-api/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-feature-api.pom
%add_to_maven_depmap org.codehaus.groovy.maven.feature gmaven-feature-api %{named_version} JPP/%{name} feature-api
#BUILD/gmaven-1.0-rc-3/gmaven-feature/gmaven-feature-api/target/gmaven-feature-api-1.0-rc-3.jar
install -m 644 gmaven-feature/gmaven-feature-api/target/gmaven-feature-api-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/feature-api-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-feature/gmaven-feature-support/pom.xml

install -m 644 gmaven-feature/gmaven-feature-support/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-feature-support.pom
%add_to_maven_depmap org.codehaus.groovy.maven.feature gmaven-feature-support %{named_version} JPP/%{name} feature-support
#BUILD/gmaven-1.0-rc-3/gmaven-feature/gmaven-feature-support/target/gmaven-feature-support-1.0-rc-3.jar
install -m 644 gmaven-feature/gmaven-feature-support/target/gmaven-feature-support-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/feature-support-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-legacy/pom.xml

install -m 644 gmaven-legacy/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-legacy.pom
%add_to_maven_depmap org.codehaus.groovy.maven gmaven-legacy %{named_version} JPP/%{name} legacy

#BUILD/gmaven-1.0-rc-3/gmaven-legacy/groovy-maven-plugin/pom.xml

install -m 644 gmaven-legacy/groovy-maven-plugin/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-groovy-maven-plugin.pom
%add_to_maven_depmap org.codehaus.mojo groovy-maven-plugin %{named_version} JPP/%{name} groovy-maven-plugin
#BUILD/gmaven-1.0-rc-3/gmaven-legacy/groovy-maven-plugin/target/groovy-maven-plugin-1.0-rc-3.jar
install -m 644 gmaven-legacy/groovy-maven-plugin/target/groovy-maven-plugin-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/groovy-maven-plugin-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-legacy/groovy-plexus-factory/pom.xml

install -m 644 gmaven-legacy/groovy-plexus-factory/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-groovy-plexus-factory.pom
%add_to_maven_depmap org.codehaus.groovy.maven groovy-plexus-factory %{named_version} JPP/%{name} groovy-plexus-factory
#BUILD/gmaven-1.0-rc-3/gmaven-legacy/groovy-plexus-factory/target/groovy-plexus-factory-1.0-rc-3.jar
install -m 644 gmaven-legacy/groovy-plexus-factory/target/groovy-plexus-factory-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/groovy-plexus-factory-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-mojo/pom.xml

install -m 644 gmaven-mojo/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-mojo.pom
%add_to_maven_depmap org.codehaus.groovy.maven gmaven-mojo %{named_version} JPP/%{name} mojo
#BUILD/gmaven-1.0-rc-3/gmaven-mojo/target/gmaven-mojo-1.0-rc-3.jar
install -m 644 gmaven-mojo/target/gmaven-mojo-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/mojo-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-mojo-support/pom.xml

install -m 644 gmaven-mojo-support/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-mojo-support.pom
%add_to_maven_depmap org.codehaus.groovy.maven gmaven-mojo-support %{named_version} JPP/%{name} mojo-support
#BUILD/gmaven-1.0-rc-3/gmaven-mojo-support/target/gmaven-mojo-support-1.0-rc-3.jar
install -m 644 gmaven-mojo-support/target/gmaven-mojo-support-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/mojo-support-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-packaging/pom.xml

install -m 644 gmaven-packaging/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-packaging.pom
%add_to_maven_depmap org.codehaus.groovy.maven gmaven-packaging %{named_version} JPP/%{name} packaging
#BUILD/gmaven-1.0-rc-3/gmaven-packaging/target/gmaven-packaging-1.0-rc-3.jar
install -m 644 gmaven-packaging/target/gmaven-packaging-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/packaging-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-plugin/pom.xml

install -m 644 gmaven-plugin/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-plugin.pom
%add_to_maven_depmap org.codehaus.groovy.maven gmaven-plugin %{named_version} JPP/%{name} plugin
#BUILD/gmaven-1.0-rc-3/gmaven-plugin/target/gmaven-plugin-1.0-rc-3.jar
install -m 644 gmaven-plugin/target/gmaven-plugin-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/plugin-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-runtime/pom.xml

install -m 644 gmaven-runtime/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-runtime.pom
%add_to_maven_depmap org.codehaus.groovy.maven.runtime gmaven-runtime %{named_version} JPP/%{name} runtime

#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-1.0/pom.xml

install -m 644 gmaven-runtime/gmaven-runtime-1.0/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-runtime-1.0.pom
%add_to_maven_depmap org.codehaus.groovy.maven.runtime gmaven-runtime-1.0 %{named_version} JPP/%{name} runtime-1.0
#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-1.0/target/gmaven-runtime-1.0-1.0-rc-3.jar
install -m 644 gmaven-runtime/gmaven-runtime-1.0/target/gmaven-runtime-1.0-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/runtime-1.0-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-1.5/pom.xml

install -m 644 gmaven-runtime/gmaven-runtime-1.5/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-runtime-1.5.pom
%add_to_maven_depmap org.codehaus.groovy.maven.runtime gmaven-runtime-1.5 %{named_version} JPP/%{name} runtime-1.5
#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-1.5/target/gmaven-runtime-1.5-1.0-rc-3.jar
install -m 644 gmaven-runtime/gmaven-runtime-1.5/target/gmaven-runtime-1.5-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/runtime-1.5-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-1.6/pom.xml

install -m 644 gmaven-runtime/gmaven-runtime-1.6/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-runtime-1.6.pom
%add_to_maven_depmap org.codehaus.groovy.maven.runtime gmaven-runtime-1.6 %{named_version} JPP/%{name} runtime-1.6
#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-1.6/target/gmaven-runtime-1.6-1.0-rc-3.jar
install -m 644 gmaven-runtime/gmaven-runtime-1.6/target/gmaven-runtime-1.6-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/runtime-1.6-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-api/pom.xml

install -m 644 gmaven-runtime/gmaven-runtime-api/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-runtime-api.pom
%add_to_maven_depmap org.codehaus.groovy.maven.runtime gmaven-runtime-api %{named_version} JPP/%{name} runtime-api
#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-api/target/gmaven-runtime-api-1.0-rc-3.jar
install -m 644 gmaven-runtime/gmaven-runtime-api/target/gmaven-runtime-api-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/runtime-api-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-default/pom.xml

install -m 644 gmaven-runtime/gmaven-runtime-default/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-runtime-default.pom
%add_to_maven_depmap org.codehaus.groovy.maven.runtime gmaven-runtime-default %{named_version} JPP/%{name} runtime-default
#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-default/target/gmaven-runtime-default-1.0-rc-3.jar
install -m 644 gmaven-runtime/gmaven-runtime-default/target/gmaven-runtime-default-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/runtime-default-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-loader/pom.xml

install -m 644 gmaven-runtime/gmaven-runtime-loader/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-runtime-loader.pom
%add_to_maven_depmap org.codehaus.groovy.maven.runtime gmaven-runtime-loader %{named_version} JPP/%{name} runtime-loader
#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-loader/target/gmaven-runtime-loader-1.0-rc-3.jar
install -m 644 gmaven-runtime/gmaven-runtime-loader/target/gmaven-runtime-loader-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/runtime-loader-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-support/pom.xml

install -m 644 gmaven-runtime/gmaven-runtime-support/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-runtime-support.pom
%add_to_maven_depmap org.codehaus.groovy.maven.runtime gmaven-runtime-support %{named_version} JPP/%{name} runtime-support
#BUILD/gmaven-1.0-rc-3/gmaven-runtime/gmaven-runtime-support/target/gmaven-runtime-support-1.0-rc-3.jar
install -m 644 gmaven-runtime/gmaven-runtime-support/target/gmaven-runtime-support-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/runtime-support-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-support/pom.xml

install -m 644 gmaven-support/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-support.pom
%add_to_maven_depmap org.codehaus.groovy.maven.support gmaven-support %{named_version} JPP/%{name} support

#BUILD/gmaven-1.0-rc-3/gmaven-support/slf4j-gossip/pom.xml

install -m 644 gmaven-support/slf4j-gossip/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-slf4j-gossip.pom
%add_to_maven_depmap org.codehaus.groovy.maven.support slf4j-gossip %{named_version} JPP/%{name} slf4j-gossip
#BUILD/gmaven-1.0-rc-3/gmaven-support/slf4j-gossip/target/slf4j-gossip-1.0-rc-3.jar
install -m 644 gmaven-support/slf4j-gossip/target/slf4j-gossip-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/slf4j-gossip-%{version}.jar

#BUILD/gmaven-1.0-rc-3/gmaven-testsuite/pom.xml

install -m 644 gmaven-testsuite/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-testsuite.pom
%add_to_maven_depmap org.codehaus.groovy.maven gmaven-testsuite %{named_version} JPP/%{name} testsuite
#BUILD/gmaven-1.0-rc-3/gmaven-testsuite/target/gmaven-testsuite-1.0-rc-3.jar
install -m 644 gmaven-testsuite/target/gmaven-testsuite-%{named_version}.jar \
              $RPM_BUILD_ROOT%{_javadir}/%{name}/testsuite-%{version}.jar

(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
mv $RPM_BUILD_ROOT%{_javadir}/%{name}/runtime.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/runtime-1.0.jar

# javadoc

install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

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

%files
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/archetype*.jar
%{_javadir}/%{name}/clean*.jar
%{_javadir}/%{name}/common*.jar
%{_javadir}/%{name}/feature*.jar
%{_javadir}/%{name}/groovy*.jar
%{_javadir}/%{name}/install*.jar
%{_javadir}/%{name}/mojo*.jar
%{_javadir}/%{name}/packaging*.jar
%{_javadir}/%{name}/plugin*.jar
%{_javadir}/%{name}/runtime-api*.jar
%{_javadir}/%{name}/runtime-default*.jar
%{_javadir}/%{name}/runtime-loader*.jar
%{_javadir}/%{name}/runtime-support*.jar
%{_javadir}/%{name}/slf4j-gossip*.jar
%{_javadir}/%{name}/testsuite*.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/*-%{version}.jar.*
%endif

%files runtime-1.0
%{_javadir}/%{name}/runtime-1.0*.jar

%files runtime-1.5
%{_javadir}/%{name}/runtime-1.5*.jar

%files runtime-1.6
%{_javadir}/%{name}/runtime-1.6*.jar

%files javadoc
%{_javadocdir}/%{name}-%{version}
%ghost %{_javadocdir}/%{name}

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin