Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37741996
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 

Packager: Igor Vlasenko <viy at altlinux.ru>
BuildRequires: /proc
BuildRequires: jpackage-compat
%define version 1.1.1
%define name jruby
# 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 appdir %{_datadir}/%{name}

Name:           jruby
Version:        1.1.1
Release: alt2_3jpp5
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-1.1.1.tar.gz
Source1:        http://repo1.maven.org/maven2/org/jruby/shared/1.1.1/shared-1.1.1.pom
Source2:        http://repo1.maven.org/maven2/org/jruby/jruby/1.1.1/jruby-1.1.1.pom
Source3:        http://repo1.maven.org/maven2/org/jruby/jruby-complete/1.1.1/jruby-complete-1.1.1.pom
Patch0:         jruby-1.1.1-build.patch
BuildRequires: jpackage-utils >= 0:1.7.4
BuildRequires: ant >= 0:1.7
BuildRequires: ant-junit
BuildRequires: ant-trax
BuildRequires: emma
BuildRequires: jarjar >= 0:0.6
BuildRequires: junit
BuildRequires: xalan-j2

BuildRequires: objectweb-asm >= 0:3.0
BuildRequires: backport-util-concurrent
BuildRequires: bsf
BuildRequires: jakarta-commons-logging
BuildRequires: jline >= 0:0.9.9.1
BuildRequires: jna
BuildRequires: jna-posix
BuildRequires: joda-time >= 0:1.5.1
BuildRequires: joni
BuildRequires: jruby-bytelist
BuildRequires: jvyamlb
BuildRequires: retroweaver
Requires: objectweb-asm >= 0:3.0
Requires: backport-util-concurrent
Requires: bsf
Requires: jline >= 0:0.9.9.1
Requires: jpackage-utils >= 0:1.7.4
Requires(post): jpackage-utils >= 0:1.7.4
Requires(postun): jpackage-utils >= 0:1.7.4
%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
%add_findreq_skiplist /usr/share/jruby/lib/ruby

%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
%patch0 -b .sav0

for j in $(find lib -name "*.jar"); do
   mv $j $j.no
done
pushd lib
ln -sf $(build-classpath bsf)
popd

for j in $(find build_lib -name "*.jar"); do
   mv $j $j.no
done
pushd build_lib
ln -sf $(build-classpath objectweb-asm/asm)
ln -sf $(build-classpath objectweb-asm/asm-analysis)
ln -sf $(build-classpath objectweb-asm/asm-commons)
ln -sf $(build-classpath objectweb-asm/asm-tree)
ln -sf $(build-classpath objectweb-asm/asm-util)
ln -sf $(build-classpath backport-util-concurrent)
ln -sf $(build-classpath jruby-bytelist) bytelist.jar
ln -sf $(build-classpath emma_ant)
ln -sf $(build-classpath emma)
ln -sf $(build-classpath jarjar)
ln -sf $(build-classpath jline)
ln -sf $(build-classpath jna)
ln -sf $(build-classpath jna-posix)
ln -sf $(build-classpath joda-time)
ln -sf $(build-classpath joni)
ln -sf $(build-classpath junit)
ln -sf $(build-classpath jvyamlb)
ln -sf $(build-classpath retroweaver)
ln -sf $(build-classpath retroweaver-rt)

ln -sf $(build-classpath commons-logging)
popd

%build
export ANT_OPTS="-Xmx256m"
export JAVA_HOME=%{_jvmdir}/java-1.5.0
export OPT_JAR_LIST="ant/ant-trax ant/ant-junit junit xalan-j2-serializer"
ant emma jar jar-console jar-complete test create-apidocs

%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)

# pom

install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 644 %{SOURCE1} \
   $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}-shared.pom
%add_to_maven_depmap org.jruby shared %{version} JPP %{name}-shared
install -m 644 %{SOURCE2} \
   $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap org.jruby jruby %{version} JPP %{name}
install -m 644 %{SOURCE3} \
   $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}-complete.pom
%add_to_maven_depmap org.jruby jruby-complete %{version} JPP %{name}-complete

# 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
ln -sf /usr/lib/ruby $RPM_BUILD_ROOT%{appdir}/lib
pushd $RPM_BUILD_ROOT%{appdir}/lib
ln -sf $(build-classpath objectweb-asm/asm)
ln -sf $(build-classpath objectweb-asm/asm-analysis)
ln -sf $(build-classpath objectweb-asm/asm-commons)
ln -sf $(build-classpath objectweb-asm/asm-tree)
ln -sf $(build-classpath objectweb-asm/asm-util)
ln -sf $(build-classpath backport-util-concurrent)
ln -sf $(build-classpath bsf)
ln -sf $(relative %_javadir/jruby.jar %{appdir}/lib/-bytelist) bytelist.jar
ln -sf $(build-classpath jline)
ln -sf %{_javadir}/jruby.jar jruby.jar
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

%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
# hack; explicitly added docdir if not owned
%doc %dir %{_docdir}/%{name}-%{version}

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

%files manual
%doc %{_docdir}/%{name}-%{version}/docs
# hack; explicitly added docdir if not owned
%doc %dir %{_docdir}/%{name}-%{version}

%files demo
%{appdir}/samples

%changelog

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

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