Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37838089
en ru br
Репозитории ALT
5.1: 1.1.1-alt2_3jpp5
4.1: 1.0.1-alt1_0jpp1.7
4.0: 1.0.1-alt1_0jpp1.7
www.altlinux.org/Changes

Группа :: Разработка/Java
Пакет: jruby

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

BuildRequires: /proc
BuildRequires: jpackage-1.5-compat
%define version 1.0.1
%define name jruby
# Copyright (c) 2000-2007, 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 appdir %{_datadir}/%{name}

Name:           jruby
Version:        1.0.1
Release:        alt1_0jpp1.7
Epoch:          0
Summary:        Pure Java implementation of the Ruby interpreter
License:        GPL/LGPL
URL:            http://jruby.codehaus.org
Group:          Development/Java
Source0:        http://dist.codehaus.org/jruby/jruby-src-%version.tar.gz
Source1:        jruby-1.0.pom
Patch0:         jruby-1.0-build_xml.patch
Patch1:         jruby-1.0-YAMLLoadTest.patch
Requires: asm2 >= 0:2.2.3
Requires: backport-util-concurrent
Requires: bsf
Requires: jline >= 0:0.9.9.1
Requires: jpackage-utils >= 0:1.7.2
BuildRequires: ant >= 0:1.6
BuildRequires: asm2 >= 0:2.2.3
BuildRequires: backport-util-concurrent
BuildRequires: bsf
BuildRequires: emma
BuildRequires: jarjar >= 0:0.6
BuildRequires: jline >= 0:0.9.9.1
BuildRequires: jpackage-utils >= 0:1.7.2
BuildRequires: junit
Requires(post): jpackage-utils >= 0:1.7.2
Requires(postun): jpackage-utils >= 0:1.7.2
%if %{gcj_support}
BuildRequires: gnu-crypto
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%if ! %{gcj_support}
BuildArch:      noarch
%endif

%description
JRuby is an 100%% pure-Java implementation of the Ruby
programming language.
Features:
- A 1.8.5 compatible Ruby interpreter written in 100%% pure Java
- Most builtin Ruby classes provided
- Support for interacting with and defining java classes from within ruby
- Bean Scripting Framework (BSF) support
- Distributed under a tri-license (CPL/GPL/LGPL)


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

%description    javadoc
%{summary}.

%package        manual
Summary:        Documents for %{name}
Group:          Development/Documentation

%description    manual
%{summary}.

%package        demo
Summary:        Samples for %{name}
Group:          Development/Java
Requires: %{name} = %{epoch}:%{version}-%{release}

%description    demo
%{summary}.

%prep
%setup -q
for j in $(find . -name "*.jar" -a ! -name requireTest.jar -a ! -name RubyInitTest.jar); do
   mv $j $j.no
done
#perl -p -i -e 's|haltonfailure="false"|haltonfailure="true"|' build.xml
%patch0 -b .sav
#%patch1 -b .sav
pushd lib
#asm-2.2.3.jar.no
ln -sf $(build-classpath asm2/asm2)
#asm-commons-2.2.3.jar.no
ln -sf $(build-classpath asm2/asm2-commons)
#backport-util-concurrent.jar.no
ln -sf $(build-classpath backport-util-concurrent)
#bsf.jar.no
ln -sf $(build-classpath bsf)
#emma_ant.jar.no
ln -sf $(build-classpath emma_ant)
#emma.jar.no
ln -sf $(build-classpath emma)
#jarjar-0.7.jar.no
ln -sf $(build-classpath jarjar)
#jline-0.9.91.jar.no
ln -sf $(build-classpath jline)
#junit.jar.no
ln -sf $(build-classpath junit)
popd
%build
export JAVA_HOME=%{_jvmdir}/java-1.4.2
export ANT_OPTS="-Xmx256m"
#ant emma jar jar-console jar-complete test create-apidocs
ant  -Dant.build.javac.source=1.4 -Dant.build.javac.target=1.4 jar jar-console jar-complete test create-apidocs

#Main targets:

#
# check-for-optional-java4-packages  check if specific libs and versions are avaiable
# check-for-optional-packages        check if specific libs and versions are avaiable
# clean                              clean almost everything
# compile                            Compile the source files for the project.
# compile-test                       Compile the unit tests
# compile.tasks                      Builds the Ant tasks that we need later on in the build
# copy-test-files                    Make tests fails available as resources
# create-apidocs                     Creates the Java API docs
# emma                               turns on EMMA instrumentation/reporting
# init                               initialize the build
# jar                                Create the jruby.jar file
# jar-complete                       Create the 'complete' JRuby jar. Pass 'mainclass' and 'filename' to adjust.
# jar-console                        Create the jruby graphical console jar
# jar-light                          Create the 'light' JRuby jar. Pass 'mainclass' and 'filename' to adjust.
# jar.standalone                     Create a standalone jruby.jar file using libraries from RUBY_HOME/lib/ruby/1.8
# prepare                            Creates the directories needed for building
# profile-gem-install-rake           Profile a local gem installation of Rake
# profile-rails-server               Profile a local gem installation of Rake
# ragel                              Standalone target that generates all our ragel based source files. Requires ragel and rlgen-java to be on the classpath
# run-junit-compiled                 runs junit tests
# run-junit-interpreted              runs junit tests
#Default target: jar

%install

# jars

install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 lib/%{name}.jar \
         $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -m 644 lib/%{name}-console.jar \
         $RPM_BUILD_ROOT%{_javadir}/%{name}-console-%{version}.jar
install -m 644 lib/%{name}-complete.jar \
         $RPM_BUILD_ROOT%{_javadir}/%{name}-complete-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do \
ln -sf ${jar} ${jar/-%{version}/}; done)
%add_to_maven_depmap org.jruby jruby %{version} JPP %{name}

# pom

install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -pm 644 %{SOURCE1} \
   $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}.pom

# data

install -p -d -m 755 $RPM_BUILD_ROOT%{appdir}
install -p -d -m 755 $RPM_BUILD_ROOT%{appdir}/bin
cp -p bin/* $RPM_BUILD_ROOT%{appdir}/bin
rm $RPM_BUILD_ROOT%{appdir}/bin/*.bat
chmod a+x $RPM_BUILD_ROOT%{appdir}/bin/*
install -p -d -m 755 $RPM_BUILD_ROOT%{appdir}/lib
pushd $RPM_BUILD_ROOT%{appdir}/lib
ln -sf $(build-classpath asm2/asm2-commons)
ln -sf $(build-classpath asm2/asm2)
ln -sf $(build-classpath backport-util-concurrent)
ln -sf $(build-classpath bsf)
ln -sf $(build-classpath jline)
# bootstrap; can't rely on itself
#ln -sf $(build-classpath jruby)
ln -sf $(relative %_javadir/jruby.jar %{appdir}/lib/) .
popd
install -p -d -m 755 $RPM_BUILD_ROOT%{appdir}/samples
perl -p -i -e \
's|filename = "./samples/java2.rb"|filename = "%{appdir}/samples/java2.rb"|' \
samples/java2.rb
cp -a samples/* $RPM_BUILD_ROOT%{appdir}/samples

## scripts

#install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
#cp -p bin/* $RPM_BUILD_ROOT%{_bindir}/
#rm $RPM_BUILD_ROOT%{_bindir}/*.bat
#rm $RPM_BUILD_ROOT%{_bindir}/*.rb
#rm $RPM_BUILD_ROOT%{_bindir}/spec*

# javadoc

install -p -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -a docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
rm -rf docs/api

# manual

install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p COPYING COPYING.CPL COPYING.GPL COPYING.LGPL README \
       $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr docs $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ $1 -eq 0 ]; then
 rm -f %{_javadocdir}/%{name}
fi

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%doc %{_docdir}/%{name}-%{version}/COPYING*
%doc %{_docdir}/%{name}-%{version}/README
#%attr(0755,root,root) %{_bindir}/*
%{_javadir}/*.jar
%dir %{appdir}
%dir %{appdir}/bin
%attr(0755,root,root) %{appdir}/bin/*
%{appdir}/lib
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/%{name}-*%{version}.jar.*
%endif

%files javadoc
%dir %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}-%{version}/*
%ghost %dir %{_javadocdir}/%{name}

%files manual
%doc %{_docdir}/%{name}-%{version}/docs

%files demo
%{appdir}/samples

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin