Sophie

Sophie

distrib > Altlinux > 4.1 > i586 > media > core-src > by-pkgid > be4606379378f26fe56913e7d1b61353 > files > 5

maven2-default-skin-1.0-alt1_1jpp1.7.src.rpm

BuildRequires: /proc
BuildRequires: jpackage-1.4-compat
# Copyright (c) 2000-2005, 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 bname           maven-default-skin

Summary:        A Maven site skin
Name:           maven2-default-skin
Version:        1.0
Release:        alt1_1jpp1.7
Epoch:		0
Group:          Development/Documentation
License:        Apache 2.0 License
URL:            http://maven.apache.org
BuildArch:      noarch
Source0:        %{bname}-%{version}.tar.gz
# svn export http://svn.apache.org/repos/asf/maven/skins/tags/maven-default-skin-1.0

Source1:        maven-skins.pom
Source2:        %{name}-settings.xml

Patch0:		maven2-default-skin-pom_xml.patch

BuildRequires: jpackage-utils >= 0:1.7.1
BuildRequires: maven2-plugins >= 0:2.0.4
BuildRequires: saxon
BuildRequires: saxon-scripts
Requires: maven2 >= 0:2.0.4

%description
Maven site default skin.

%prep
%setup -q -n %{bname}-%{version}

%patch0 -b .sav

%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 -p m2_repo/repository/JPP/maven2/default_poms
cp %{SOURCE1} m2_repo/repository/JPP/maven2/default_poms/org.apache.maven.skins-maven-skins.pom

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

MVN=/usr/bin/mvn
export M2SETTINGS=$(pwd)/maven2-settings.xml
export MAVEN_REPO_LOCAL=`pwd`/m2_repo/repository
export MAVEN_OPTS="-Dmaven.repo.local=$MAVEN_REPO_LOCAL -Dmaven2.jpp.mode=true -Dmaven.test.failure.ignore=true -Djava.awt.headless=true"
${MVN} -s ${M2SETTINGS} ${MAVEN_OPTS} install

%install

# jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/maven2
install -m 0644 target/default-skin-%{version}.jar \
	$RPM_BUILD_ROOT%{_javadir}/maven2/default-skin-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}/maven2
   ln -fs default-skin-%{version}.jar default-skin.jar
popd
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 0644 pom.xml \
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/org.apache.maven.skins-maven-default-skin.pom

%files
%{_javadir}/maven2/*
%{_datadir}/maven2/poms/*

%changelog
* Wed Nov 14 2007 Igor Vlasenko <viy@altlinux.ru> 0:1.0-alt1_1jpp1.7
- converted from JPackage by jppimport script