Репозиторий Sisyphus
Последнее обновление: 21 августа 2019 | Пакетов: 17343 | Посещений: 14693889
en ru br
Репозитории ALT
S:2.5.5-alt3
5.1: 1.9.1-alt1.r26040.1
4.1: 1.8.7-alt0.M41.5
4.0: 1.8.6-alt2.M40.2
3.0: 1.8.2-alt7
www.altlinux.org/Changes

Группа :: Разработка/Ruby
Пакет: ruby

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

# hey Emacs, its -*- rpm-spec -*-
# vim: set ft=spec fdm=marker :

# {{{ Defines

%define name ruby
%define base_name ruby
%define version 1.9.1
%define release 1
%define svn r26040
%define subver %(echo %version |cut -d. -f1,2)
%define platform %(%_datadir/automake/config.sub %_target_platform | sed -e 's,-%_vendor,,')
%define rubylibdir_base %_datadir/%base_name
%define rubylibdir %rubylibdir_base/%subver
%define archdir_base %_libdir/%base_name
%define archdir %archdir_base/%subver/%platform
%define vendordir_base %_datadir/%base_name/vendor_ruby
%define vendordir %vendordir_base/%subver
%define vendorarchdir_base %_libdir/%base_name/vendor_ruby
%define vendorarchdir %vendorarchdir_base/%subver/%platform
%define rubyhdrdir %_includedir/%base_name/%subver
%define vendorhdrdir %rubyhdrdir/vendor_ruby
%define ruby_ri_dir %_datadir/ri/%subver

%def_without emacs

%set_verify_elf_method fhs=normal
# }}}

# {{{ General

Packager: Ruby Maintainers Team <ruby at packages.altlinux.org>

Name: %name
Version: %version
Release: alt%release.%svn.1
Summary: Interpreter of object-oriented scripting language Ruby %subver
License: Dual: GPL and Ruby
Url: http://www.ruby-lang.org/
Group: Development/Ruby

Requires: lib%name = %version-%release

Source: %base_name-%version-%release.tar

# Automatically added by buildreq on Mon Apr 20 2009 (-bi)

BuildRequires: groff-base libdb4-devel libgdbm-devel libncursesw-devel libreadline-devel libssl-devel rpm-build-ruby ruby-module-erb ruby-module-etc ruby-module-fileutils ruby-module-strscan tk-devel zlib-devel
# }}}

# {{{ Description

%description
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in perl). It is simple,
straight-forward, and extensible.

Interpreter of object-oriented scripting language Ruby %subver.
# }}}

# Subpackages {{{


%define obsolete() Obsoletes: %1\
Provides: %1 = %version-%release

# {{{ lib%name

%package -n lib%name
Summary: Libraries necessary to run the Ruby %subver
Group: System/Libraries
# enumerator.c:    rb_provide("enumerator.so");   /* for backward compatibility */
Provides: ruby(enumerator)
Provides: %archdir
Provides: %rubylibdir
Provides: %vendorarchdir
Provides: %vendordir
%obsolete %name-module-rubynode

%description -n lib%name
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in perl). It is simple,
straight-forward, and extensible.

This package includes the libruby, necessary to run Ruby %subver.
# }}}

# {{{ lib%name-devel

%package -n lib%name-devel
Summary: Header files for compiling extension modules for the Ruby %subver
Group: Development/Ruby
Requires: lib%name = %version-%release
Requires: rpm-build-%name
Requires: %name-tool-rdoc
Provides: %rubyhdrdir
Provides: %vendorhdrdir

%description -n lib%name-devel
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in perl). It is simple,
straight-forward, and extensible.

This package contains the header files, necessary to make extension
library for Ruby %subver.
# }}}

# {{{ lib%name-devel-static

%package -n lib%name-devel-static
Summary: Statically linked Ruby %subver library
Group: Development/Ruby
Requires: lib%name-devel = %version-%release

%description -n lib%name-devel-static
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in perl). It is simple,
straight-forward, and extensible.

This package includes statically linked Ruby %subver library needed for
embedding Ruby in other applications.
# }}}

# {{{ %name-doc-examples

%package -n %name-doc-examples
Summary: This package provides example programs about Ruby %subver
Group: Development/Ruby
Requires: lib%name = %version-%release

%description -n %name-doc-examples
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in perl). It is simple,
straight-forward, and extensible.
# }}}

# {{{ %name-doc-ri

%package -n %name-doc-ri
Summary: This package provides ri documentation for Ruby %subver
Group: Development/Ruby
Requires: lib%name = %version-%release
Requires: %name-tool-ri
Provides: %ruby_ri_dir/site

%description -n %name-doc-ri
This package provides ri documentation for Ruby %subver
# }}}

# {{{ %name-misc-elisp

%if_with emacs
%package -n %name-misc-elisp
Summary: ruby-mode for Emacsen
Group: Development/Ruby
Provides: emacs-ruby-mode
Requires: emacs-common

%description -n %name-misc-elisp
This package provides major-mode for editing Ruby scripts and some
emacs-lisp programs for Ruby programmers.
%endif
# }}}

# {{{ %name-tool-irb

%package -n %name-tool-irb
Summary: Interactive Ruby (for Ruby %subver)
Group: Development/Ruby
Requires: %name = %version-%release
Requires: lib%name = %version-%release

%description -n %name-tool-irb
The irb is acronym for Interactive RuBy. It evaluates Ruby expression from
the terminal.

This package provides the irb which uses Ruby %subver.
# }}}

# {{{ %name-tool-rdoc

%package -n %name-tool-rdoc
Summary: Generate documentation from Ruby source files (for Ruby %subver)
Group: Development/Ruby
Requires: %name = %version-%release
Requires: lib%name = %version-%release

%description -n %name-tool-rdoc
RDoc - Documentation from Ruby Source Files:

* Generates structured HTML and XML documentation from Ruby source
 and C extensions.
* Automatically extracts class, module, method, and attribute
 definitions. These can be annotated using inline comments.
* Analyzes method visibility.
* Handles aliasing.
* Uses non-intrusive and implicit markup in the comments. Readers of
 the original source needn't know that it is marked up at all.

This package provides the RDoc tool which uses Ruby %subver.
# }}}

# {{{ %name-tool-ri

%package -n %name-tool-ri
Summary: Ruby Interactive reference (for Ruby %subver)
Group: Development/Ruby
Requires: %name = %version-%release
Requires: %name-tool-rdoc
Requires: lib%name = %version-%release

%description -n %name-tool-ri
ri is a command line tool that displays descriptions of built-in Ruby
methods, classes, and modules. For methods, it shows you the calling
sequence and a description. For classes and modules, it shows a
synopsis along with a list of the methods the class or module
implements.

This package provides ri command and descriptions about Ruby %subver.
# }}}

# {{{ %name-stdlibs

%package -n %name-stdlibs
Summary: Standard Ruby %subver library
Group: Development/Ruby
Requires: lib%name = %version-%release
%obsolete %name-module-English
%obsolete %name-module-bigdecimal
%obsolete %name-module-cgi
%obsolete %name-module-curses
%obsolete %name-module-date-time
%obsolete %name-module-dbm
%obsolete %name-module-debug
%obsolete %name-module-digest
%obsolete %name-module-dl
%obsolete %name-module-drb
%obsolete %name-module-e2mmap
%obsolete %name-module-erb
%obsolete %name-module-etc
%obsolete %name-module-fcntl
%obsolete %name-module-fileutils
%obsolete %name-module-gdbm
%obsolete %name-module-iconv
%obsolete %name-module-math
%obsolete %name-module-misc
%obsolete %name-module-net
%obsolete %name-module-nkf
%obsolete %name-module-open3
%obsolete %name-module-openssl
%obsolete %name-module-optparse
%obsolete %name-module-patterns
%obsolete %name-module-pty
%obsolete %name-module-readline
%obsolete %name-module-rexml
%obsolete %name-module-rss
%obsolete %name-module-sdbm
%obsolete %name-module-shell
%obsolete %name-module-socket
%obsolete %name-module-stringio
%obsolete %name-module-strscan
%obsolete %name-module-syslog
%obsolete %name-module-thread
%obsolete %name-module-tracer
%obsolete %name-module-uri
%obsolete %name-module-wait
%obsolete %name-module-webrick
%obsolete %name-module-xmlrpc
%obsolete %name-module-yaml
%obsolete %name-module-zlib

%description -n %name-stdlibs
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in perl). It is simple,
straight-forward, and extensible.

This package contains standard Ruby %subver runtime library.
# }}}

# {{{ %name-stdlibs-tk

%package -n %name-stdlibs-tk
Summary: Ruby/Tk bindings
Group: Development/Ruby
Requires: lib%name = %version-%release
%obsolete %name-module-tk
%obsolete %name-module-tcltk

%description -n %name-stdlibs-tk
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in perl). It is simple,
straight-forward, and extensible.

This package contains Ruby/Tk bindings.
# }}}

# }}} Subpackges


# {{{ Prep

%prep
%setup -q -n %base_name-%version-%release
cp -pfv %_datadir/automake/config.{guess,sub} .

# Threaded tests doesn't play well under heavy load

rm -f bootstraptest/test_thread.rb
rm -f test/ruby/test_thread.rb
%ifarch %arm
rm -f test/rinda/test_rinda.rb
%endif
# }}}

# {{{ Build

%build

# {{{ Configure

autoconf

export optflags=' '
%configure \
--enable-frame-address \
--enable-shared \
--disable-rpath \
--enable-pthread \
--with-rubylibprefix=%rubylibdir_base \
--with-rubyarchprefix=%archdir_base \
--with-rubyhdrdir=%rubyhdrdir \
--with-sitedir=%_prefix/local/share/%base_name/site_ruby \
--with-sitearchdir=%_prefix/local/%_lib/%base_name/site_ruby \
--with-sitehdrdir=%_prefix/local/include/%base_name/%subver/site_ruby \
--with-vendordir=%vendordir_base \
--with-vendorarchdir=%vendorarchdir_base \
--with-vendorhdrdir=%vendorhdrdir \
--with-ruby-version=minor \
\
--enable-ipv6 \
--with-lookup-order-hack=INET \
#
# }}}

# SMP-incompatible

%make
%make rdoc

# {{{ ruby-elisp

%if_with emacs
for i in misc/*.el ; do
   emacs -batch --eval "(progn
           (setq load-path (append (list \".\") load-path))
           (byte-compile-file \"$i\"))"
done
%endif
# }}}
# }}}

# {{{ Test

%check
%make -k check
# }}}

# {{{ Install

%install
%make_install DESTDIR=%buildroot install do-install-doc

mkdir %buildroot/bin
ln -s ..%_bindir/%name  %buildroot/bin/%name

mkdir -p %buildroot%vendordir
mkdir -p %buildroot%vendorarchdir
mkdir -p %buildroot%vendorhdrdir
# compat with site*
ln -sf vendor_ruby %buildroot%rubyhdrdir/site_ruby

mkdir -p %buildroot%ruby_ri_dir/site

echo "VENDOR_SPECIFIC=true" > %buildroot%vendordir/vendor-specific.rb

# {{{ ruby-elisp

%if_with emacs
mkdir -p %buildroot/etc/emacs/site-start.d/
mkdir -p %buildroot%_emacslispdir/
install -m 644 ruby.el %buildroot/etc/emacs/site-start.d/
install -m 644 misc/*.el* %buildroot%_emacslispdir/
%endif
# }}}

# {{{ files.req stuff

mkdir -p %buildroot%_rpmlibdir
cat <<EOF >%buildroot%_rpmlibdir/%name-files.req.list
# ruby dirlist for %_rpmlibdir/files.req
%archdir lib%name
%rubylibdir lib%name
%vendorarchdir lib%name
%vendordir lib%name
%rubyhdrdir lib%name-devel
%vendorhdrdir lib%name-devel
%ruby_ri_dir/site %name-doc-ri
EOF
# }}}
# {{{ Leftovers of indeterminate origin

#Package ruby-stdlibs has an unmet dep:

# Depends: ruby(xmlscan/scanner)
# Used by rss/parser.rb:
#   unless const_defined? :AVAILABLE_PARSER_LIBRARIES
#     AVAILABLE_PARSER_LIBRARIES = [
#       ["rss/xmlparser", :XMLParserParser],
#       ["rss/xmlscanner", :XMLScanParser],
#       ["rss/rexmlparser", :REXMLParser],
#     ]
#   end
#
#   AVAILABLE_PARSERS = []
#
#   AVAILABLE_PARSER_LIBRARIES.each do |lib, parser|
#     begin
#       require lib
#       AVAILABLE_PARSERS.push(const_get(parser))
#     rescue LoadError
#     end
#   end
rm -rf %buildroot%rubylibdir/rss/xmlscanner.rb
# }}}

cat <<EOF >%buildroot/.%name.sh
#!/bin/sh

LD_LIBRARY_PATH="%buildroot%_libdir" \
exec \
%buildroot%_bindir/%name \
-I "%buildroot%vendordir:%buildroot%vendorarchdir:%buildroot%rubylibdir:%buildroot%archdir" \
"\$ at "
EOF
chmod +x %buildroot/.%name.sh

%define __ruby %buildroot/.%name.sh

# This is a hack but we really don't need to bytecompile

# Python comparison sample in the Ruby manual
unset RPM_PYTHON
# }}}

# {{{ Files


# {{{ %name

%files
%doc ChangeLog* COPYING* LEGAL README* ToDo
/bin/%name
%_bindir/%name
%_man1dir/%{name}*
# }}}

# {{{ lib%name

%files -n lib%name
%_libdir/lib%name.so.%subver
%_libdir/lib%name.so.%version
%_rpmlibdir/%name-files.req.list
%archdir/enc
%archdir/rbconfig.rb
%vendordir/vendor-specific.rb
%dir %_datadir/%base_name
%dir %_datadir/%base_name/%subver
%dir %_datadir/%base_name/vendor_ruby
%dir %_datadir/%base_name/vendor_ruby/%subver
%dir %_libdir/%base_name
%dir %_libdir/%base_name/%subver
%dir %_libdir/%base_name/%subver/%platform
%dir %_libdir/%base_name/vendor_ruby
%dir %_libdir/%base_name/vendor_ruby/%subver
%dir %_libdir/%base_name/vendor_ruby/%subver/%platform
# }}}

# {{{ lib%name-devel

%files -n lib%name-devel
%_libdir/lib%name.so
%_includedir/%base_name
%rubylibdir/mkmf.rb
# }}}

# {{{ lib%name-devel-static

%files -n lib%name-devel-static
%_libdir/lib%name-static.a
# }}}

# {{{ %name-doc-examples

#%files -n %name-doc-examples
#FIXME
# }}}

# {{{ %name-doc-ri

%files -n %name-doc-ri
%dir %_datadir/ri
%dir %ruby_ri_dir
%dir %ruby_ri_dir/site
%dir %ruby_ri_dir/system
%ruby_ri_dir/system/*
# }}}

# {{{ %name-misc-elisp

%if_with emacs
%files -n %name-misc-elisp
%_emacslispdir/*.el*
%_sysconfdir/emacs/site-start.d/ruby.el
%endif
# }}}

# {{{ %name-tool-irb

%files -n %name-tool-irb
%_bindir/irb
%_man1dir/irb.1*
%rubylibdir/irb.rb
%rubylibdir/irb
%doc doc/irb/
# }}}

# {{{ %name-tool-rdoc

%files -n %name-tool-rdoc
%_bindir/rdoc
%rubylibdir/rdoc.rb
%rubylibdir/rdoc
%doc lib/rdoc/README
# }}}

# {{{ %name-tool-ri

%files -n %name-tool-ri
%_bindir/ri
%_man1dir/ri.1*
# }}}

# {{{ %name-stdlibs

%files -n %name-stdlibs
%_bindir/erb
%_man1dir/erb.1*
%rubylibdir/English.rb
%rubylibdir/abbrev.rb
%rubylibdir/base64.rb
%rubylibdir/benchmark.rb
%rubylibdir/bigdecimal
%rubylibdir/cgi
%rubylibdir/cgi.rb
%rubylibdir/cmath.rb
%rubylibdir/complex.rb
%rubylibdir/csv.rb
%rubylibdir/date
%rubylibdir/date.rb
%rubylibdir/debug.rb
%rubylibdir/delegate.rb
%rubylibdir/digest
%rubylibdir/digest.rb
%rubylibdir/dl
%rubylibdir/drb
%rubylibdir/drb.rb
%rubylibdir/e2mmap.rb
%rubylibdir/erb.rb
%rubylibdir/expect.rb
%rubylibdir/fileutils.rb
%rubylibdir/find.rb
%rubylibdir/forwardable.rb
%rubylibdir/getoptlong.rb
%rubylibdir/gserver.rb
%rubylibdir/io
%rubylibdir/ipaddr.rb
%rubylibdir/kconv.rb
%rubylibdir/logger.rb
%rubylibdir/mathn.rb
%rubylibdir/matrix.rb
%rubylibdir/monitor.rb
%rubylibdir/mutex_m.rb
%rubylibdir/net
%rubylibdir/observer.rb
%rubylibdir/open-uri.rb
%rubylibdir/open3.rb
%rubylibdir/openssl
%rubylibdir/openssl.rb
%rubylibdir/optparse
%rubylibdir/optparse.rb
%rubylibdir/ostruct.rb
%rubylibdir/pathname.rb
%rubylibdir/pp.rb
%rubylibdir/prettyprint.rb
%rubylibdir/prime.rb
%rubylibdir/profile.rb
%rubylibdir/profiler.rb
%rubylibdir/pstore.rb
%rubylibdir/rational.rb
%rubylibdir/resolv-replace.rb
%rubylibdir/resolv.rb
%rubylibdir/rexml
%rubylibdir/rinda
%rubylibdir/ripper
%rubylibdir/ripper.rb
%rubylibdir/rss
%rubylibdir/rss.rb
%rubylibdir/scanf.rb
%rubylibdir/securerandom.rb
%rubylibdir/set.rb
%rubylibdir/shell
%rubylibdir/shell.rb
%rubylibdir/shellwords.rb
%rubylibdir/singleton.rb
%rubylibdir/sync.rb
%rubylibdir/tempfile.rb
%rubylibdir/thread.rb
%rubylibdir/thwait.rb
%rubylibdir/time.rb
%rubylibdir/timeout.rb
%rubylibdir/tmpdir.rb
%rubylibdir/tracer.rb
%rubylibdir/tsort.rb
%rubylibdir/un.rb
%rubylibdir/uri
%rubylibdir/uri.rb
%rubylibdir/weakref.rb
%rubylibdir/webrick
%rubylibdir/webrick.rb
%rubylibdir/xmlrpc
%rubylibdir/yaml
%rubylibdir/yaml.rb
%archdir/bigdecimal.so
%archdir/continuation.so
%archdir/coverage.so
%archdir/curses.so
%archdir/dbm.so
%archdir/digest
%archdir/digest.so
%archdir/dl.so
%archdir/etc.so
%archdir/fcntl.so
%archdir/fiber.so
%archdir/gdbm.so
%archdir/iconv.so
%archdir/io
%archdir/mathn
%archdir/nkf.so
%archdir/openssl.so
%archdir/pty.so
%archdir/readline.so
%archdir/ripper.so
%archdir/sdbm.so
%archdir/socket.so
%archdir/stringio.so
%archdir/strscan.so
%archdir/syck.so
%archdir/syslog.so
%archdir/zlib.so
# }}}

# {{{ %name-stdlibs-tk

%files -n %name-stdlibs-tk
%rubylibdir/multi-tk.rb
%rubylibdir/remote-tk.rb
%rubylibdir/tcltk.rb
%rubylibdir/tk*
%archdir/tcltklib.so
%archdir/tkutil.so
# }}}

# }}} Files


# {{{ Changelog

%changelog

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

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