ALT Linux repos
Group :: Development/Java
RPM: maven-surefire
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
BuildRequires: /proc
BuildRequires: jpackage-1.4-compat
%define version 1.5.3
%define name maven-surefire
# 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.
#
# If you don't want to build with maven, and use straight ant instead,
# give rpmbuild option '--without maven'
%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}
%define maven_settings_file %{_builddir}/%{name}/settings.xml
Name: maven-surefire
Version: 1.5.3
Release: alt2_2jpp1.7
Epoch: 0
Summary: Surefire is a test framework project.
License: Apache Software License
Group: Development/Java
URL: http://maven.apache.org/surefire/
Source0: %{name}-%{version}.tar.gz
Source1: %{name}-booter-%{version}.tar.gz
# svn export http://svn.apache.org/repos/asf/maven/surefire/tags/surefire-1.5.3/ surefire
# svn export http://svn.apache.org/repos/asf/maven/surefire/tags/surefire-booter-1.5.3/ surefire-booter
Source2: %{name}-build.xml
Source3: %{name}-booter-build.xml
Source4: %{name}-jpp-depmap.xml
BuildArch: noarch
BuildRequires: jpackage-utils >= 0:1.7.2
BuildRequires: ant ant-nodeps
BuildRequires: classworlds
BuildRequires: junit >= 3.8.2
BuildRequires: plexus-utils
%if %{with_maven}
BuildRequires: maven2-plugins >= 2.0.4
BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-surefire
%endif
Requires: classworlds
Requires: plexus-utils
Requires: junit
Requires(post): jpackage-utils >= 0:1.7.2
Requires(postun): jpackage-utils >= 0:1.7.2
%description
Surefire is a test framework project.
%package booter
Summary: Booter for %{name}
Group: Development/Java
Requires: maven-surefire = %{epoch}:%{version}-%{release}
%description booter
Surefire is a test framework project.
%if %{with_maven}
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
%description javadoc
Javadoc for %{name}.
%package booter-javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
%description booter-javadoc
Javadoc for %{name}.
%endif
%prep
%setup -q -c -n %{name}
tar xzf %{SOURCE1}
cp %{SOURCE2} surefire/build.xml
cp %{SOURCE3} surefire-booter/build.xml
sed -i -e s:"static private void failSame(":"static public void failSame(":g surefire/src/main/java/org/apache/maven/surefire/battery/assertion/BatteryAssert.java
sed -i -e s:"static private void failNotSame(":"static public void failNotSame(":g surefire/src/main/java/org/apache/maven/surefire/battery/assertion/BatteryAssert.java
sed -i -e s:"static private void failNotEquals(":"static public void failNotEquals(":g surefire/src/main/java/org/apache/maven/surefire/battery/assertion/BatteryAssert.java
%build
%if %{with_maven}
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
%else
mkdir -p lib
build-jar-repository -s -p lib classworlds junit plexus/utils
%endif
for project in surefire surefire-booter; do
pushd $project
%if %{with_maven}
mvn-jpp \
-e \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven2.jpp.depmap.file=%{SOURCE4} \
install javadoc:javadoc
%else
ant -Dmaven.mode.offline=true
cp target/*jar ../lib/$project.jar
%endif
popd
done
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/maven-surefire
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
for p in surefire \
surefire-booter; do
installname=`echo $p | sed -e s:^surefire-::g`
install -pm 644 $p/target/$p-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/maven-surefire/$installname-%{version}.jar
%add_to_maven_depmap org.apache.maven.surefire $p 1.5.3 JPP/maven-surefire $installname
install -pm 644 $p/pom.xml \
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-$installname.pom
done
(cd $RPM_BUILD_ROOT%{_javadir}/maven-surefire && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
%if %{with_maven}
# javadoc
for p in surefire \
surefire-booter; do
project=`basename $p | sed -e s:surefire-::g`
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/maven-$p-%{version}
cp -pr $p/target/site/apidocs/* \
$RPM_BUILD_ROOT%{_javadocdir}/maven-$p-%{version}/
ln -s maven-$p-%{version} $RPM_BUILD_ROOT%{_javadocdir}/maven-$p # ghost symlink
done
%endif
%post
%update_maven_depmap
%postun
%update_maven_depmap
%if %{with_maven}
%post javadoc
rm -f %{_javadocdir}/maven-surefire
ln -s maven-surefire-%{version} %{_javadocdir}/maven-surefire
%post booter-javadoc
rm -f %{_javadocdir}/maven-surefire-booter
ln -s maven-surefire-booter-%{version} %{_javadocdir}/maven-surefire-booter
%postun javadoc
if [ "$1" = "0" ]; then
rm -f %{_javadocdir}/maven-surefire
fi
%postun booter-javadoc
if [ "$1" = "0" ]; then
rm -f %{_javadocdir}/maven-surefire-booter
fi
%endif
%files
%dir %{_javadir}/maven-surefire
%{_javadir}/maven-surefire/surefire*
%dir %{_datadir}/maven2
%dir %{_datadir}/maven2/poms
%{_datadir}/maven2/poms/JPP.maven-surefire-surefire.pom
%{_mavendepmapfragdir}
%files booter
%{_javadir}/maven-surefire/booter*
%dir %{_datadir}/maven2
%dir %{_datadir}/maven2/poms
%{_datadir}/maven2/poms/JPP.maven-surefire-booter.pom
%if %{with_maven}
%files javadoc
%doc %{_javadocdir}/maven-surefire-%{version}
%ghost %doc %{_javadocdir}/maven-surefire
%files booter-javadoc
%doc %{_javadocdir}/maven-surefire-booter-%{version}
%ghost %doc %{_javadocdir}/maven-surefire-booter
%endif
%changelog
…
Full changelog you can see here
BuildRequires: jpackage-1.4-compat
%define version 1.5.3
%define name maven-surefire
# 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.
#
# If you don't want to build with maven, and use straight ant instead,
# give rpmbuild option '--without maven'
%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}
%define maven_settings_file %{_builddir}/%{name}/settings.xml
Name: maven-surefire
Version: 1.5.3
Release: alt2_2jpp1.7
Epoch: 0
Summary: Surefire is a test framework project.
License: Apache Software License
Group: Development/Java
URL: http://maven.apache.org/surefire/
Source0: %{name}-%{version}.tar.gz
Source1: %{name}-booter-%{version}.tar.gz
# svn export http://svn.apache.org/repos/asf/maven/surefire/tags/surefire-1.5.3/ surefire
# svn export http://svn.apache.org/repos/asf/maven/surefire/tags/surefire-booter-1.5.3/ surefire-booter
Source2: %{name}-build.xml
Source3: %{name}-booter-build.xml
Source4: %{name}-jpp-depmap.xml
BuildArch: noarch
BuildRequires: jpackage-utils >= 0:1.7.2
BuildRequires: ant ant-nodeps
BuildRequires: classworlds
BuildRequires: junit >= 3.8.2
BuildRequires: plexus-utils
%if %{with_maven}
BuildRequires: maven2-plugins >= 2.0.4
BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-surefire
%endif
Requires: classworlds
Requires: plexus-utils
Requires: junit
Requires(post): jpackage-utils >= 0:1.7.2
Requires(postun): jpackage-utils >= 0:1.7.2
%description
Surefire is a test framework project.
%package booter
Summary: Booter for %{name}
Group: Development/Java
Requires: maven-surefire = %{epoch}:%{version}-%{release}
%description booter
Surefire is a test framework project.
%if %{with_maven}
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
%description javadoc
Javadoc for %{name}.
%package booter-javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
%description booter-javadoc
Javadoc for %{name}.
%endif
%prep
%setup -q -c -n %{name}
tar xzf %{SOURCE1}
cp %{SOURCE2} surefire/build.xml
cp %{SOURCE3} surefire-booter/build.xml
sed -i -e s:"static private void failSame(":"static public void failSame(":g surefire/src/main/java/org/apache/maven/surefire/battery/assertion/BatteryAssert.java
sed -i -e s:"static private void failNotSame(":"static public void failNotSame(":g surefire/src/main/java/org/apache/maven/surefire/battery/assertion/BatteryAssert.java
sed -i -e s:"static private void failNotEquals(":"static public void failNotEquals(":g surefire/src/main/java/org/apache/maven/surefire/battery/assertion/BatteryAssert.java
%build
%if %{with_maven}
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
%else
mkdir -p lib
build-jar-repository -s -p lib classworlds junit plexus/utils
%endif
for project in surefire surefire-booter; do
pushd $project
%if %{with_maven}
mvn-jpp \
-e \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven2.jpp.depmap.file=%{SOURCE4} \
install javadoc:javadoc
%else
ant -Dmaven.mode.offline=true
cp target/*jar ../lib/$project.jar
%endif
popd
done
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/maven-surefire
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
for p in surefire \
surefire-booter; do
installname=`echo $p | sed -e s:^surefire-::g`
install -pm 644 $p/target/$p-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/maven-surefire/$installname-%{version}.jar
%add_to_maven_depmap org.apache.maven.surefire $p 1.5.3 JPP/maven-surefire $installname
install -pm 644 $p/pom.xml \
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-$installname.pom
done
(cd $RPM_BUILD_ROOT%{_javadir}/maven-surefire && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
%if %{with_maven}
# javadoc
for p in surefire \
surefire-booter; do
project=`basename $p | sed -e s:surefire-::g`
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/maven-$p-%{version}
cp -pr $p/target/site/apidocs/* \
$RPM_BUILD_ROOT%{_javadocdir}/maven-$p-%{version}/
ln -s maven-$p-%{version} $RPM_BUILD_ROOT%{_javadocdir}/maven-$p # ghost symlink
done
%endif
%post
%update_maven_depmap
%postun
%update_maven_depmap
%if %{with_maven}
%post javadoc
rm -f %{_javadocdir}/maven-surefire
ln -s maven-surefire-%{version} %{_javadocdir}/maven-surefire
%post booter-javadoc
rm -f %{_javadocdir}/maven-surefire-booter
ln -s maven-surefire-booter-%{version} %{_javadocdir}/maven-surefire-booter
%postun javadoc
if [ "$1" = "0" ]; then
rm -f %{_javadocdir}/maven-surefire
fi
%postun booter-javadoc
if [ "$1" = "0" ]; then
rm -f %{_javadocdir}/maven-surefire-booter
fi
%endif
%files
%dir %{_javadir}/maven-surefire
%{_javadir}/maven-surefire/surefire*
%dir %{_datadir}/maven2
%dir %{_datadir}/maven2/poms
%{_datadir}/maven2/poms/JPP.maven-surefire-surefire.pom
%{_mavendepmapfragdir}
%files booter
%{_javadir}/maven-surefire/booter*
%dir %{_datadir}/maven2
%dir %{_datadir}/maven2/poms
%{_datadir}/maven2/poms/JPP.maven-surefire-booter.pom
%if %{with_maven}
%files javadoc
%doc %{_javadocdir}/maven-surefire-%{version}
%ghost %doc %{_javadocdir}/maven-surefire
%files booter-javadoc
%doc %{_javadocdir}/maven-surefire-booter-%{version}
%ghost %doc %{_javadocdir}/maven-surefire-booter
%endif
%changelog
…
Full changelog you can see here