]> git.pld-linux.org Git - packages/ruby.git/blobdiff - ruby.spec
package %{ruby_vendordir}/data
[packages/ruby.git] / ruby.spec
index f9001259df6f6f2f1e0b80f083f919ad54243437..d3faa8d2da9f918fc1626e7df38b634c68c5c4a6 100644 (file)
--- a/ruby.spec
+++ b/ruby.spec
@@ -1,4 +1,3 @@
-#
 # TODO:
 #      - include ext/ in docs
 #      - replace ri with fastri
@@ -9,17 +8,20 @@
 # Conditional build:
 %bcond_without doc             # skip (time-consuming) docs generating; intended for speed up test builds
 %bcond_without tk              # skip building package with Tk bindings
-%bcond_without batteries       # Don't include rubygems, json or rake
+%bcond_without batteries       # Don't include rubygems, json, rake, minitest
 %bcond_with    bootstrap       # build bootstrap version
 
+%define                rel             2
 %define                ruby_version    1.9
 %define                basever         1.9.3
-%define                patchlevel      392
+%define                patchlevel      448
 %define                doc_version     1_9_3
 %define                json_ver        1.5.5
 %define                rake_ver        0.9.2.2
+# when increasing rubygems_ver, please remove "11." prefix in rubygems package release
 %define                rubygems_ver    1.8.11
 %define                minitest_ver    2.5.1
+# when increasing rdoc_ver, please remove "11." prefix in rdoc package release
 %define                rdoc_ver        3.9.5
 %define                bigdecimal_ver  1.1.0
 %define                io_console_ver  0.3
@@ -30,15 +32,13 @@ Summary(pt_BR.UTF-8):       Linguagem de script orientada a objeto
 Summary(zh_CN.UTF-8):  ruby - 一种快速高效的面向对象脚本编程语言
 Name:          ruby
 Version:       %{basever}.%{patchlevel}
-# NOTE: do not decrease Release, when updating Version,
-# unless rdoc_ver, rubygems_ver *both* are increased as well
-Release:       9
+Release:       %{rel}
 Epoch:         1
 # Public Domain for example for: include/ruby/st.h, strftime.c, ...
 License:       (Ruby or BSD) and Public Domain
 Group:         Development/Languages
-Source0:       ftp://ftp.ruby-lang.org/pub/ruby/%{ruby_version}/%{name}-%{basever}-p%{patchlevel}.tar.bz2
-# Source0-md5: a810d64e2255179d2f334eb61fb8519c
+Source0:       ftp://ftp.ruby-lang.org/pub/ruby/1.9/%{name}-%{basever}-p%{patchlevel}.tar.bz2
+# Source0-md5: aa710d386e5903f78f0231868255e6af
 Source1:       http://www.ruby-doc.org/download/%{name}-doc-bundle.tar.gz
 # Source1-md5: ad1af0043be98ba1a4f6d0185df63876
 Source2:       http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_stdlib_rdocs.tgz
@@ -60,10 +60,12 @@ Patch4:             arch-specific-dir.patch
 Patch5:                site-and-vendor-arch-flags.patch
 # Make mkmf verbose by default
 Patch6:                mkmf-verbose.patch
+Patch7:                strip-ccache.patch
+Patch8:                bison3.patch
 URL:           http://www.ruby-lang.org/
 BuildRequires: autoconf >= 2.60
 BuildRequires: automake
-BuildRequires: bison
+BuildRequires: bison >= 1.875
 BuildRequires: db-devel
 BuildRequires: gdbm-devel >= 1.8.3
 BuildRequires: libffi-devel
@@ -85,14 +87,6 @@ Provides:    ruby(ver) = %{ruby_version}
 Obsoletes:     ruby-REXML <= 2.4.0-2
 Obsoletes:     ruby-doc < 1.8.4
 Obsoletes:     ruby-fastthread <= 0.6.3
-%if %{with batteries}
-Provides:      json = %{json_ver}
-Provides:      rake = %{rake_ver}
-Provides:      ruby-json = %{json_ver}
-Provides:      ruby-rake = %{rake_ver}
-Obsoletes:     ruby-json <= 1.5.4
-Obsoletes:     ruby-rake < 0.9.2.2
-%endif
 Conflicts:     ruby-activesupport < 2.3.11-2
 Conflicts:     ruby-activesupport2 < 2.3.11-2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -180,12 +174,12 @@ Requires: %{name} = %{epoch}:%{version}-%{release}
 Suggests:      ruby-rubygems
 Provides:      ruby-bigdecimal = %{bigdecimal_ver}
 Provides:      ruby-io-console = %{io_console_ver}
-Provides:      ruby-json = %{json_ver}
-Provides:      ruby-minitest = %{minitest_ver}
-Provides:      ruby-rake = %{rake_ver}
 # ruby-modules deprecated, rpm5 generates ruby(abi) itself
 Provides:      ruby-modules(ver) = %{ruby_version}
+%if %{with batteries}
+Provides:      ruby-minitest = %{minitest_ver}
 Obsoletes:     ruby-minitest <= 1.5.0
+%endif
 
 %description modules
 Ruby standard modules and utilities:
@@ -216,6 +210,8 @@ Summary:    Ruby development libraries
 Summary(pl.UTF-8):     Biblioteki programistyczne interpretera języka Ruby
 Group:         Development/Languages
 Requires:      %{name}-modules = %{epoch}:%{version}-%{release}
+Requires:      gcc
+Requires:      glibc-devel
 Requires:      pkgconfig
 
 %description devel
@@ -240,6 +236,9 @@ Biblioteki statyczne Ruby.
 Summary:       Ruby HTML documentation
 Summary(pl.UTF-8):     Dokumentacja HTML do Ruby
 Group:         Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description doc
 Ruby HTML documentation: FAQ, guide, core and standard library.
@@ -253,6 +252,9 @@ Summary:    Ruby ri documentation
 Summary(pl.UTF-8):     Dokumentacja Ruby w formacie ri
 Group:         Documentation
 Requires:      %{name}-modules = %{epoch}:%{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description doc-ri
 Ruby ri documentation.
@@ -264,6 +266,9 @@ Dokumentacja Ruby w formacie ri.
 Summary:       Ruby examples
 Summary(pl.UTF-8):     Przykłady dla języka Ruby
 Group:         Development/Languages
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description examples
 Ruby examples.
@@ -271,16 +276,24 @@ Ruby examples.
 %description examples -l pl.UTF-8
 Przykłady programów w języku Ruby.
 
-# IMPORTANT: keep this as last package, as we reset Epoch
+# IMPORTANT: keep rdoc, rubygems, rake, json as last packages as we reset epoch/version/release
+# and %{version},%{release} macros may not be used directly as they take last
+# subpackage value not main package one what you intend to use
+
 %package rdoc
 Summary:       A tool to generate HTML and command-line documentation for Ruby projects
 Summary(pl.UTF-8):     Narzędzie do generowania dokumentacji HTML i linii poleceń dla projektów w Rubym
 Version:       %{rdoc_ver}
+# remove "11." when rdoc_ver is increased
+Release:       11.%{basever}.%{patchlevel}.%{rel}
 Epoch:         0
 License:       GPL v2 and Ruby and MIT
 Group:         Development/Libraries
-Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{release}
+Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel}
 Obsoletes:     rdoc <= 0.9.0
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description rdoc
 RDoc produces HTML and command-line documentation for Ruby projects.
@@ -296,11 +309,14 @@ wyświetlania dokumentacji online.
 Summary:       RubyGems - the Ruby standard for packaging Ruby libraries
 Summary(pl.UTF-8):     RubyGems - standard Ruby'ego pakietowania bibliotek
 Version:       %{rubygems_ver}
+# remove "11." when rubygems_ver is increased
+Release:       11.%{basever}.%{patchlevel}.%{rel}
 Epoch:         0
 License:       Ruby or MIT
 Group:         Development/Libraries
-Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{release}
+Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel}
 Requires:      %{name}-rdoc >= %{rdoc_ver}
+Suggests:      %{name}-devel
 Provides:      rubygems = %{rubygems_ver}
 %if "%{_rpmversion}" >= "5"
 BuildArch:     noarch
@@ -314,6 +330,65 @@ libraries.
 RubyGems to standardowe narzędzie języka Ruby do publikowania i
 zarządzania zewnętrznymi bibliotekami.
 
+%package rake
+Summary:       Rake is a Make-like program implemented in Ruby
+Summary(pl.UTF-8):     Program typu Make dla języka Ruby
+Version:       %{rake_ver}
+Release:       %{basever}.%{patchlevel}.%{rel}
+Epoch:         0
+License:       MIT
+Group:         Development/Languages
+Provides:      rake = %{rake_ver}
+Conflicts:     ruby-modules < 1:1.9.3.429-2
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description rake
+Rake is a simple Ruby build program with capabilities similar to make.
+
+It has the following features:
+- Rakefiles (rake's version of Makefiles) are completely defined in
+  standard Ruby syntax. No XML files to edit. No quirky Makefile syntax
+  to worry about (is that a tab or a space?)
+- Users can specify tasks with prerequisites.
+- Rake supports rule patterns to synthesize implicit tasks.
+- Rake is lightweight. It can be distributed with other projects as a
+  single file. Projects that depend upon rake do not require that rake
+  be installed on target systems.
+
+%description rake -l pl.UTF-8
+Rake to prosty program do budowania w języku Ruby o możliwościach
+podobnych do make.
+
+Ma następujące cechy:
+- Pliki Rakefile (rake'owa odmiana plików Makefile) są definiowane
+  całkowicie w standardowej składni języka Ruby. Nie trzeba modyfikować
+  plików XML. Nie trzeba martwić się kaprysami składni Makefile (czy to
+  tabulacja czy spacja?).
+- Użytkownicy mogą określać zadania z ich zależnościami.
+- Rake obsługuje wzorce reguł do tworzenia z nich wynikowych zadań.
+- Rake jest lekki. Może być rozpowszechniany z innymi projektami jako
+  pojedynczy plik. Projekty używające rake'a nie wymagają go
+  zainstalowanego na systemach docelowych.
+
+%package json
+Summary:       JSON library for Ruby
+Summary(pl.UTF-8):     Biblioteka JSON dla języka Ruby
+Version:       %{json_ver}
+Release:       %{basever}.%{patchlevel}.%{rel}
+Epoch:         0
+License:       MIT
+Group:         Development/Languages
+Obsoletes:     ruby-json-rubyforge
+Conflicts:     ruby-modules < 1:1.9.3.429-3
+
+%description json
+This is a JSON implementation as a Ruby extension in C.
+
+%description json -l pl.UTF-8
+Biblioteka JSON dla języka Ruby.
+
 %prep
 %if %{with bootstrap}
 %setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3 -a100
@@ -326,6 +401,9 @@ zarządzania zewnętrznymi bibliotekami.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
 
 # must be regenerated with new bison
 %{__rm} parse.{c,h}
@@ -377,6 +455,7 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{_examplesdir}/%{name}-%{version}} \
        $RPM_BUILD_ROOT{%{ruby_vendorarchdir},%{ruby_ridir}} \
        $RPM_BUILD_ROOT%{ruby_vendorlibdir}/net \
+       $RPM_BUILD_ROOT%{ruby_vendordir}/data \
        $RPM_BUILD_ROOT{%{legacy_archdir}/racc,%{legacy_sitelibdir},%{legacy_sitearchdir},%{legacy_vendorarchdir},%{legacy_libdir}/tasks} \
 
 %{__make} install %{?with_doc:install-doc} \
@@ -388,14 +467,18 @@ cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1
 
 %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/html
 
+ln -sf %{gem_dir}/gems/rake-%{rake_ver}/bin/rake $RPM_BUILD_ROOT%{_bindir}/rake
+
 %if %{without batteries}
 # packaged separately
-%{__rm} -r $RPM_BUILD_ROOT%{ruby_libdir}/{rubygems,rake,json}
+%{__rm} -r $RPM_BUILD_ROOT%{ruby_libdir}/{rubygems,rake,json,minitest}
 %{__rm} -r $RPM_BUILD_ROOT%{ruby_archdir}/json
+%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rake-*
 %{__rm} $RPM_BUILD_ROOT%{ruby_libdir}/{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_version}/system/JSON
+%{__rm} $RPM_BUILD_ROOT%{gem_dir}/specifications/{json,minitest,rake}-*.gemspec
+%{?with_doc:%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_version}/system/JSON}
 %endif
 
 %if %{with doc}
@@ -414,23 +497,18 @@ 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}/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}/%{vendordir}
 %dir %{_datadir}/%{name}
-%dir %{_datadir}/%{name}/%{vendordir}
 
 %dir %{ruby_libdir}
 %dir %{ruby_archdir}
+%dir %{ruby_vendordir}
+%dir %{ruby_vendordir}/data
 %dir %{ruby_vendorlibdir}
 %dir %{ruby_vendorarchdir}
 
@@ -493,15 +571,24 @@ rm -rf $RPM_BUILD_ROOT
 %{ruby_libdir}/rubygems.rb
 %{ruby_libdir}/ubygems.rb
 
-%if %{with batteries}
+%files rake
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rake
+%{_mandir}/man1/rake.1*
+%{ruby_libdir}/rake
 %dir %{gem_dir}/gems/rake-%{rake_ver}
 %dir %{gem_dir}/gems/rake-%{rake_ver}/bin
 %attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/rake
-%{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec
 %{gem_dir}/specifications/rake-%{rake_ver}.gemspec
+
+%files json
+%defattr(644,root,root,755)
+%{ruby_libdir}/json
+%dir %{ruby_archdir}/json
+%dir %{ruby_archdir}/json/ext
+%attr(755,root,root) %{ruby_archdir}/json/ext/*.so
 %{gem_dir}/specifications/json-%{json_ver}.gemspec
 %endif
-%endif
 
 %files modules
 %defattr(644,root,root,755)
@@ -518,14 +605,9 @@ rm -rf $RPM_BUILD_ROOT
 %{ruby_libdir}/io
 %{ruby_libdir}/irb
 %{ruby_libdir}/matrix
-%{ruby_libdir}/minitest
 %{ruby_libdir}/net
 %{ruby_libdir}/openssl
 %{ruby_libdir}/optparse
-%if %{with batteries}
-%{ruby_libdir}/json
-%{ruby_libdir}/rake
-%endif
 %{ruby_libdir}/psych
 %{ruby_libdir}/racc
 %{ruby_libdir}/rbconfig
@@ -550,8 +632,10 @@ rm -rf $RPM_BUILD_ROOT
 %{ruby_libdir}/tracer.rb
 %{ruby_libdir}/tsort.rb
 %{ruby_libdir}/[u-z]*.rb
+%if %{with batteries}
 %exclude %{ruby_libdir}/rubygems.rb
 %exclude %{ruby_libdir}/ubygems.rb
+%endif
 %exclude %{ruby_libdir}/mkmf.rb
 %attr(755,root,root) %{ruby_archdir}/[a-s]*.so
 %attr(755,root,root) %{ruby_archdir}/[u-z]*.so
@@ -565,11 +649,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{ruby_archdir}/enc/trans/*.so
 %dir %{ruby_archdir}/io
 %attr(755,root,root) %{ruby_archdir}/io/*.so
-%if %{with batteries}
-%dir %{ruby_archdir}/json
-%dir %{ruby_archdir}/json/ext
-%attr(755,root,root) %{ruby_archdir}/json/ext/*.so
-%endif
 %dir %{ruby_archdir}/mathn
 %attr(755,root,root) %{ruby_archdir}/mathn/*.so
 %dir %{ruby_archdir}/racc
@@ -579,6 +658,12 @@ rm -rf $RPM_BUILD_ROOT
 %{gem_dir}/specifications/bigdecimal-%{bigdecimal_ver}.gemspec
 %{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec
 
+%if %{with batteries}
+# minitest
+%{ruby_libdir}/minitest
+%{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec
+%endif
+
 # parents of gem_dir
 %dir %{_datadir}/%{name}/gems
 #%dir %{_datadir}/%{name}/gems/%{ruby_version}
This page took 0.052494 seconds and 4 git commands to generate.