]> git.pld-linux.org Git - packages/ruby.git/blobdiff - ruby.spec
remove html docs that nobody nothered to package
[packages/ruby.git] / ruby.spec
index 665200e1dd3ca39743896b00752197da09df27b7..187245dafb8fc32c5e2e48c9a70a49722b91b618 100644 (file)
--- a/ruby.spec
+++ b/ruby.spec
@@ -1,13 +1,26 @@
 #
-# Conditional build:
-%bcond_without doc     # skip generating docs (which is time-consuming). Intended for speed up test builds
-%bcond_without emacs   # skip building package with ruby-mode for emacs
-%bcond_without tk      # skip building package with Tk bindings
+# TODO:
+#      - include ext/ in docs
+#      - replace ri with fastri
+#      - patch ri to search multiple indexes (one per package), so RPMs can
+#        install ri docs
 #
+# Conditional build:
+%bcond_without doc             # skip (time-consuming) docs generating; intended for speed up test builds
+%bcond_without emacs           # skip building package with ruby-mode for emacs
+%bcond_without tk              # skip building package with Tk bindings
+%bcond_without batteries       # Don't include rubygems, json or rake
+%bcond_with    bootstrap       # build bootstrap version
+
 %define                ruby_ver        1.9
-%define                stdlibdoc_version       0.10.1
-%define                patchlevel 378
-%define                basever 1.9.1
+%define                basever         1.9.3
+%define                patchlevel      392
+%define                doc_version     1_9_3
+%define                json_ver        1.5.5
+%define                rake_ver        0.9.2.2
+%define                rubygems_ver    1.8.11
+%define                minitest_ver    2.5.1
+%define                rdoc_ver        3.9.5
 Summary:       Ruby - interpreted scripting language
 Summary(ja.UTF-8):     オブジェクト指向言語Rubyインタプリタ
 Summary(pl.UTF-8):     Ruby - interpretowany język skryptowy
@@ -15,33 +28,41 @@ Summary(pt_BR.UTF-8):       Linguagem de script orientada a objeto
 Summary(zh_CN.UTF-8):  ruby - 一种快速高效的面向对象脚本编程语言
 Name:          ruby
 Version:       %{basever}.%{patchlevel}
-Release:       2
+Release:       1
 Epoch:         1
 License:       The Ruby License
 Group:         Development/Languages
-Source0:       ftp://ftp.ruby-lang.org/pub/ruby/%{name}-%{basever}-p%{patchlevel}.tar.bz2
-# Source0-md5: 5922459622a23612eb9b68a3586cb5f8
+Source0:       ftp://ftp.ruby-lang.org/pub/ruby/%{ruby_ver}/%{name}-%{basever}-p%{patchlevel}.tar.bz2
+# Source0-md5: a810d64e2255179d2f334eb61fb8519c
 Source1:       http://www.ruby-doc.org/download/%{name}-doc-bundle.tar.gz
 # Source1-md5: ad1af0043be98ba1a4f6d0185df63876
-Source2:       http://www.ruby-doc.org/download/stdlib/%{name}-doc-stdlib-%{stdlibdoc_version}.tgz
-# Source2-md5: 5437c281b44e7a4af142d2bd35eba407
-Source3:       rdoc.1
-Source4:       testrb.1
-Source5:       %{name}-mode-init.el
-Patch0:                %{name}-mkmf-shared.patch
-Patch1:                %{name}-lib64.patch
+Source2:       http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_stdlib_rdocs.tgz
+# Source2-md5: ec622612428672c432b6f65dd31a84b5
+Source3:       http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_core_rdocs.tgz
+# Source3-md5: 1892aadde51d36106c513bced2193dff
+Source100:     ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{name}-1.8.7-p330.tar.gz
+# Source100-md5:       50a49edb787211598d08e756e733e42e
+Source4:       rdoc.1
+Source5:       testrb.1
+Source6:       %{name}-mode-init.el
+Patch0:                %{name}-lib64.patch
+Patch1:                %{name}-ffs.patch
+Patch2:                fix-bison-invocation.patch
 URL:           http://www.ruby-lang.org/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.60
 BuildRequires: automake
 BuildRequires: bison
 BuildRequires: db-devel
 %{?with_emacs:BuildRequires:   emacs}
 BuildRequires: gdbm-devel >= 1.8.3
+BuildRequires: libffi-devel
 BuildRequires: ncurses-devel
 BuildRequires: openssl-devel
+BuildRequires: pkgconfig
 BuildRequires: readline-devel >= 4.2
-BuildRequires: ruby-modules
+%{!?with_bootstrap:BuildRequires:      ruby-modules}
 BuildRequires: sed >= 4.0
+BuildRequires: yaml-devel
 %if %{with tk}
 BuildRequires: tk-devel
 %endif
@@ -51,6 +72,19 @@ Obsoletes:   rdoc
 Obsoletes:     ruby-REXML
 Obsoletes:     ruby-doc < 1.8.4
 Obsoletes:     ruby-fastthread
+%if %{with batteries}
+Provides:      json = %{json_ver}
+Provides:      rake = %{rake_ver}
+Provides:      ruby-json = %{json_ver}
+Provides:      ruby-rake = %{rake_ver}
+Provides:      ruby-rubygems = %{rubygems_ver}
+Provides:      rubygems = %{rubygems_ver}
+Obsoletes:     ruby-json
+Obsoletes:     ruby-rake
+Obsoletes:     ruby-rubygems
+%endif
+Conflicts:     ruby-activesupport < 2.3.11-2
+Conflicts:     ruby-activesupport2 < 2.3.11-2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # bleh, some nasty (gcc or ruby) bug still not fixed
@@ -72,8 +106,7 @@ full-functional ruby environment install ruby-modules package.
 %description -l ja.UTF-8
 Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.Rubyは最初
 から純粋なオブジェクト指向言語として設計されていますから,オブジェクト
-指向プログラミングを手軽に行う事が出来ます.もちろん通常の手続き型のプ
-ログラミングも可能です.
+指向プログラミングを手軽に行う事が出来ます.もちろん通常の手続き型のプ ログラミングも可能です.
 
 %description -l pl.UTF-8
 Ruby to interpretowany język skryptowy, w sam raz dla łatwego i
@@ -96,7 +129,10 @@ Summary:    Ruby standard modules and utilities
 Summary(pl.UTF-8):     Standardowe moduły i narzędzia dla języka Ruby
 Group:         Development/Languages
 Requires:      %{name} = %{epoch}:%{version}-%{release}
+# workaround for autodep generator net getting version properly
+Provides:      ruby(abi) = %{ruby_ver}
 Provides:      ruby-modules(ver) = %{ruby_ver}
+Obsoletes:     ruby-minitest
 
 %description modules
 Ruby standard modules and utilities:
@@ -199,9 +235,17 @@ Ruby mode and debugger for Emacs.
 Tryb Ruby i debugger dla Emacsa.
 
 %prep
-%setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2
+%if %{with bootstrap}
+%setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3 -a100
+%else
+%setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3
+%endif
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+
+# must be regenerated with new bison
+%{__rm} parse.{c,h}
 
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
@@ -212,14 +256,24 @@ find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \
 %build
 cp -f /usr/share/automake/config.sub .
 
+# build ruby-1.8.7 first
+%if %{with bootstrap}
+cd %{name}-1.8.7-p330
+%configure
+%{__make}
+cd ..
+%endif
+
 %{__autoconf}
 %configure \
+       %{?with_bootstrap:--with-baseruby=%{name}-1.8.7-p330/miniruby} \
        --enable-shared \
        --enable-pthread \
-       --with-ruby-version=minor \
-       --enable-frame-address
+       --with-ruby-version=minor
 
-%{__make} -j1
+%{__make} -j1 \
+       COPY="cp -p" Q= \
+       %{?with_bootstrap:BASERUBY="ruby-1.8.7-p330/miniruby -I./ruby-1.8.7-p330/lib"}
 
 %if %{with doc}
 %{__make} -j1 rdoc
@@ -227,33 +281,39 @@ cp -f /usr/share/automake/config.sub .
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{_examplesdir}/%{name}-%{version}} \
+       $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/tasks
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
 cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man1
-cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1
+
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}/html
 
+%if %{without batteries}
 # packaged separately
-rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/{rubygems,rake,json,minitest}
-rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/*-linux*/json
-rm $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/{rake,rubygems,json}.rb
-rm $RPM_BUILD_ROOT%{_bindir}/{gem,rake}
-rm $RPM_BUILD_ROOT%{_mandir}/man1/rake*
+%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/{rubygems,rake,json,tasks}
+%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/*-linux*/json
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/{rake,rubygems,json}.rb
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/{gem,rake}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/rake*
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_ver}/system/JSON
+%endif
 
 # ruby emacs mode - borrowed from FC-4
 %if %{with emacs}
 install -d $RPM_BUILD_ROOT%{_emacs_lispdir}/{%{name}-mode,site-start.d}
 cp -a misc/*.el $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode
-rm -f $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/rubydb2x.el*
-install -p %{SOURCE5} $RPM_BUILD_ROOT%{_emacs_lispdir}/site-start.d
+%{__rm} $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/rubydb2x.el*
+install -p %{SOURCE6} $RPM_BUILD_ROOT%{_emacs_lispdir}/site-start.d
 cat << 'EOF' > path.el
 (setq load-path (cons "." load-path) byte-compile-warnings nil)
 EOF
 emacs --no-site-file -q -batch -l path.el -f batch-byte-compile $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/*.el
-rm -f path.el*
+%{__rm} path.el*
 %endif
 
 %clean
@@ -266,9 +326,16 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc NEWS LEGAL README README.EXT ChangeLog ToDo
 %attr(755,root,root) %{_bindir}/ruby
+%if %{with batteries}
+%attr(755,root,root) %{_bindir}/gem
+%attr(755,root,root) %{_bindir}/rake
+%endif
 %attr(755,root,root) %{_libdir}/libruby.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libruby.so.1.9
 %{_mandir}/man1/ruby.1*
+%if %{with batteries}
+%{_mandir}/man1/rake.1*
+%endif
 %dir %{_libdir}/%{name}
 %dir %{_libdir}/%{name}/%{ruby_ver}
 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*
@@ -281,11 +348,13 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_datadir}/ri
 %dir %{_datadir}/ri/%{ruby_ver}
 %dir %{_datadir}/ri/%{ruby_ver}/system
+%dir %{ruby_rdocdir}
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libruby.so
 %{_includedir}/%{name}-%{ruby_ver}
+%{_pkgconfigdir}/ruby-%{ruby_ver}.pc
 
 %files static
 %defattr(644,root,root,755)
@@ -314,11 +383,21 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/%{name}/%{ruby_ver}/digest
 %{_libdir}/%{name}/%{ruby_ver}/dl
 %{_libdir}/%{name}/%{ruby_ver}/drb
+%{_libdir}/%{name}/%{ruby_ver}/fiddle
 %{_libdir}/%{name}/%{ruby_ver}/io
 %{_libdir}/%{name}/%{ruby_ver}/irb
+%{_libdir}/%{name}/%{ruby_ver}/matrix
+%{_libdir}/%{name}/%{ruby_ver}/minitest
 %{_libdir}/%{name}/%{ruby_ver}/net
 %{_libdir}/%{name}/%{ruby_ver}/openssl
 %{_libdir}/%{name}/%{ruby_ver}/optparse
+%if %{with batteries}
+%{_libdir}/%{name}/%{ruby_ver}/json
+%{_libdir}/%{name}/%{ruby_ver}/rake
+%{_libdir}/%{name}/%{ruby_ver}/rubygems
+%dir %{_libdir}/%{name}/%{ruby_ver}/tasks
+%endif
+%{_libdir}/%{name}/%{ruby_ver}/psych
 %{_libdir}/%{name}/%{ruby_ver}/racc
 %{_libdir}/%{name}/%{ruby_ver}/rbconfig
 %{_libdir}/%{name}/%{ruby_ver}/rdoc
@@ -327,6 +406,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/%{name}/%{ruby_ver}/ripper
 %{_libdir}/%{name}/%{ruby_ver}/rss
 %{_libdir}/%{name}/%{ruby_ver}/shell
+%{_libdir}/%{name}/%{ruby_ver}/syck
 %{_libdir}/%{name}/%{ruby_ver}/test
 %{_libdir}/%{name}/%{ruby_ver}/uri
 %{_libdir}/%{name}/%{ruby_ver}/webrick
@@ -342,21 +422,47 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/%{name}/%{ruby_ver}/tracer.rb
 %{_libdir}/%{name}/%{ruby_ver}/tsort.rb
 %{_libdir}/%{name}/%{ruby_ver}/[u-z]*.rb
-%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/digest
-%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc
-%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc/trans
-%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/io
-%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/mathn
-%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/racc
 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/[a-s]*.so
 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/[u-z]*.so
+%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/digest
 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/digest/*.so
+%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/dl
+%attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/dl/callback.so
+%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc
 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc/*.so
+%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc/trans
 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc/trans/*.so
+%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/io
 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/io/*.so
+%if %{with batteries}
+%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/json
+%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/json/ext
+%attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/json/ext/*.so
+%endif
+%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/mathn
 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/mathn/*.so
+%dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/racc
 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/racc/*.so
 %{_libdir}/%{name}/%{ruby_ver}/*-linux*/rbconfig.rb
+%dir %{_libdir}/%{name}/gems
+%dir %{_libdir}/%{name}/gems/%{ruby_ver}
+%dir %{_libdir}/%{name}/gems/%{ruby_ver}/gems
+%dir %{_libdir}/%{name}/gems/%{ruby_ver}/specifications
+%{_libdir}/%{name}/gems/%{ruby_ver}/specifications/io-console-*.gemspec
+%{_libdir}/%{name}/gems/%{ruby_ver}/specifications/bigdecimal-*.gemspec
+%if %{with batteries}
+%dir %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rake-%{rake_ver}
+%dir %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rake-%{rake_ver}/bin
+%attr(755,root,root) %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rake-%{rake_ver}/bin/rake
+%dir %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rdoc-%{rdoc_ver}
+%dir %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rdoc-%{rdoc_ver}/bin
+%attr(755,root,root) %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rdoc-%{rdoc_ver}/bin/rdoc
+%attr(755,root,root) %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rdoc-%{rdoc_ver}/bin/ri
+%{_libdir}/%{name}/gems/%{ruby_ver}/specifications/minitest-%{minitest_ver}.gemspec
+%{_libdir}/%{name}/gems/%{ruby_ver}/specifications/rake-%{rake_ver}.gemspec
+%{_libdir}/%{name}/gems/%{ruby_ver}/specifications/rdoc-%{rdoc_ver}.gemspec
+%{_libdir}/%{name}/gems/%{ruby_ver}/specifications/json-%{json_ver}.gemspec
+%endif
 %{_mandir}/man1/erb.1*
 %{_mandir}/man1/irb.1*
 %{_mandir}/man1/rdoc.1*
@@ -366,7 +472,8 @@ rm -rf $RPM_BUILD_ROOT
 %files doc
 %defattr(644,root,root,755)
 %doc ruby-doc-bundle/*
-%{?with_doc:%doc ruby-doc-stdlib-%{stdlibdoc_version}/stdlib}
+%{?with_doc:%doc ruby_%{doc_version}_stdlib}
+%{?with_doc:%doc ruby_%{doc_version}_core}
 
 %if %{with doc}
 %files doc-ri
This page took 0.062965 seconds and 4 git commands to generate.