Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > eb0960becf99b5c79716c8509add9fa3 > files > 9

ruby-1.8.7-7p72mdv2009.0.src.rpm

Summary:	Object Oriented Script Language
Name:		ruby
Version:	1.8.7
%define		patchversion p72
%define		pversion %{?patchversion:-%patchversion}
%define		subver 1.8
# increase the release number, patchversion is here just to make it visible
Release: 	%mkrel 7%{?patchversion}
License:	Ruby or GPLv2
Group:		Development/Ruby
BuildRequires:	autoconf2.5
BuildRequires:	byacc
BuildRequires:	ncurses-devel
BuildRequires:	readline-devel
BuildRequires:	tcl-devel tk-devel
BuildRequires:	db4-devel
BuildRequires:  libgdbm-devel >= 1.8.3
BuildRequires:  openssl-devel
BuildRequires:	zlib1-devel
Obsoletes:	ruby-rexml
Provides:	ruby-rexml
# explicit file provides (since such requires are automatically added by find-requires)
Provides: /usr/bin/ruby

Source0:	ftp://ftp.ruby-lang.org/pub/ruby/%{subver}/ruby-%{version}%{pversion}.tar.bz2
Source1:	http://www.rubycentral.com/faq/rubyfaqall.html.bz2
Source2:	http://dev.rubycentral.com/downloads/files/ProgrammingRuby-0.4.tar.bz2
Source3:	ruby.macros
Patch0:		ruby-lib64.patch
Patch1:		ruby-do-not-use-system-ruby-to-generate-ri-doc.patch
Patch2:		ruby-add-old-os-to-search-path.patch
Patch3:		ruby-do_not_propagate_no-undefined.patch
Patch25:	ruby-1.8.6.111-gcc43.patch
URL:		http://www.ruby-lang.org/
Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root

%define my_target_cpu %{_target_cpu}
%ifarch ppc
%define my_target_cpu powerpc
%endif
%ifarch ppc64
%define my_target_cpu powerpc64
%endif
%ifarch amd64
%define my_target_cpu x86_64
%endif

%package	doc
Summary:	Documentation for the powerful language Ruby
Group:		Development/Ruby

%package	devel
Summary:	Development file for the powerful language Ruby
Group:		Development/Ruby
Requires:	%{name} = %{version}

%package	tk
Summary:	Tk extension for the powerful language Ruby
Group:		Development/Ruby
Requires:	%{name} = %{version}

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

%description	doc
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 Ruby's documentation

%description	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 Ruby's devel files.

%description	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 the Tk extension for Ruby.

%prep
%setup -q -n ruby-%{version}%{pversion}
%patch0 -p0 -b .lib64
%patch1 -p0 -b .ri
%patch2 -p2 -b .old
%patch3 -p2 -b .undefined
%patch25 -p1

autoreconf

%build
echo '.text' | gcc -shared -o libdummy.so.0 -xassembler - -ltcl -ltk >& /dev/null && {
  if %{_bindir}/ldd libdummy.so.0 | grep -q "lib\(tcl\|tk\).so"; then
    echo "Your tcl/tk is broken, get one with versioning in the libraries."
    exit 1
  fi
  rm -f libdummy.so.0
}

CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'`
%configure2_5x --enable-shared --disable-rpath --enable-pthread \
	--with-sitedir=%_prefix/lib/ruby/site_ruby \
	--with-vendordir=%_prefix/lib/ruby/vendor_ruby \
	--with-old-os=linux-gnu

%make


%install
rm -rf %buildroot
%makeinstall_std install-doc

install -d %buildroot%{_docdir}/%{name}-%{version}
cp -a COPYING* ChangeLog README* ToDo sample %buildroot%{_docdir}/%{name}-%{version}
bzcat %{SOURCE1} > %buildroot%{_docdir}/%{name}-%{version}/FAQ.html

install -d %buildroot%{_datadir}/emacs/site-lisp
cp -a misc/ruby-mode.el %buildroot%{_datadir}/emacs/site-lisp

install -d %buildroot%{_sysconfdir}/emacs/site-start.d
cat <<EOF >%buildroot%{_sysconfdir}/emacs/site-start.d/%{name}.el
(autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t)
(add-to-list 'auto-mode-alist '("\\\\.rb$" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
EOF

(cd %buildroot%{_docdir}/%{name}-%{version} ; tar xfj %{SOURCE2} ; cd Pro*; mv -f html/* . ; rm -rf html xml)

# Make the file/dirs list, filtering out tcl/tk and devel files
( cd %buildroot \
  && find usr/lib/ruby/%{subver} \
          \( -not -type d -printf "/%%p\n" \) \
          -or \( -type d -printf "%%%%dir /%%p\n" \) \
) | egrep -v '/(tcl)?tk|(%{my_target_cpu}-%{_target_os}/.*[ha]$)' > %{name}.list

# Fix scripts permissions and location
find %buildroot sample -type f | file -i -f - | grep text | cut -d: -f1 >text.list
cat text.list | xargs chmod 0644
#  Magic grepping to get only files with '#!' in the first line
cat text.list | xargs grep -n '^#!' | grep ':1:#!' | cut -d: -f1 >shebang.list
cat shebang.list | xargs sed -i -e 's|/usr/local/bin|/usr/bin|; s|\./ruby|/usr/bin/ruby|'
cat shebang.list | xargs chmod 0755


# Install the rpm macros 
mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d
cp %{SOURCE3} %buildroot%{_sysconfdir}/rpm/macros.d
%check
make test

%clean
rm -rf %buildroot

%if %mdkversion < 200900
%post -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -p /sbin/ldconfig
%endif

%files -f %{name}.list
%defattr(-, root, root)
%dir %{_docdir}/%{name}-%{version}
%{_docdir}/%{name}-%{version}/README
%{_bindir}/*
%dir %{_prefix}/lib/%{name}/
%{_libdir}/libruby.so.*
%{_prefix}/lib/%{name}/site_ruby
%{_mandir}/*/*
%{_datadir}/emacs/site-lisp/*
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/*
%{_sysconfdir}/rpm/macros.d/%{name}.macros

%files doc
%defattr(-, root, root)
%{_datadir}/ri
%{_docdir}/%{name}-%{version}/COPYING*
%{_docdir}/%{name}-%{version}/ChangeLog
%{_docdir}/%{name}-%{version}/README.*
%{_docdir}/%{name}-%{version}/FAQ.html
%{_docdir}/%{name}-%{version}/ToDo
%{_docdir}/%{name}-%{version}/sample
%{_docdir}/%{name}-%{version}/ProgrammingRuby*

%files devel
%defattr(-, root, root)
%{_prefix}/lib/%{name}/%{subver}/%{my_target_cpu}-%{_target_os}/*.[ah]
%{_libdir}/libruby-static.a
%{_libdir}/libruby.so

%files tk
%defattr(-, root, root)
%{_prefix}/lib/%{name}/%{subver}/%{my_target_cpu}-%{_target_os}/tcltk*
%{_prefix}/lib/%{name}/%{subver}/%{my_target_cpu}-%{_target_os}/tk*
%{_prefix}/lib/%{name}/%{subver}/tcltk*
%{_prefix}/lib/%{name}/%{subver}/tk*
%{_prefix}/lib/%{name}/%{subver}/test/unit/ui/tk



%changelog
* Thu Sep 11 2008 Pixel <pixel@mandriva.com> 1.8.7-7p72mdv2009.0
+ Revision: 283683
- explicitly provide /usr/bin/ruby
  (since such requires are automatically added by find-requires) (#42316)

* Wed Aug 13 2008 Frederik Himpe <fhimpe@mandriva.org> 1.8.7-6p72mdv2009.0
+ Revision: 271536
- Update ruby 1.8.7 to patchlevel 72 (fixes CVE-2008-1447,
  CVE-2008-3655, CVE-2008-3656, CVE-2008-3657)
- Remove CVE-2008-2376 patch: fix integrated upstream

* Thu Jul 10 2008 Gustavo De Nardin <gustavodn@mandriva.com> 1.8.7-5p22mdv2009.0
+ Revision: 233280
- 1.8.7-p22
  . security fixes for CVE-2008-2662, CVE-2008-2663, CVE-2008-2664,
    CVE-2008-2725, CVE-2008-2726
- P4: fix for CVE-2008-2376

* Tue Jun 10 2008 Pascal Terjan <pterjan@mandriva.org> 1.8.7-4p17mdv2009.0
+ Revision: 217724
- Filter -Wl,--no-undefined from CFLAGS used by mkmf

* Tue Jun 10 2008 Pascal Terjan <pterjan@mandriva.org> 1.8.7-3p17mdv2009.0
+ Revision: 217392
- Really fix archdir on x86_64

* Tue Jun 10 2008 Pascal Terjan <pterjan@mandriva.org> 1.8.7-2p17mdv2009.0
+ Revision: 217351
- Fix archdir on x86_64

* Tue Jun 10 2008 Pascal Terjan <pterjan@mandriva.org> 1.8.7-1p17mdv2009.0
+ Revision: 217304
- Add macros ruby_vendorarchdir and ruby_vendorlibdir
- Update to p17

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Mon Jun 09 2008 Pascal Terjan <pterjan@mandriva.org> 1.8.7-1mdv2009.0
+ Revision: 217004
- Enforce vendor_ruby in /usr/lib
- Add linux-gnu to search path
- 1.8.7
- Drop P2 and P26
- Update P0
- Enforce sitedir to be in /usr/lib

* Fri May 23 2008 Oden Eriksson <oeriksson@mandriva.com> 1.8.6-12p114mdv2009.0
+ Revision: 210416
- bump release

* Fri May 23 2008 Gustavo De Nardin <gustavodn@mandriva.com> 1.8.6-11p114mdv2009.0
+ Revision: 210214
- added ruby-1.8.6p114-mdv,svn-tk85-gcc43.patch: fix tk extension build for
  tcl/tk 8.5, required with GCC 4.3
- fixed use of host_os, which should be target_os, in files lists

  + Oden Eriksson <oeriksson@mandriva.com>
    - added a gcc43 patch from fedora

* Mon Mar 10 2008 Gustavo De Nardin <gustavodn@mandriva.com> 1.8.6-9p114mdv2008.1
+ Revision: 183218
- new patch version p114
- Patch3 (ruby-1.8.6-p111-rexml-trans) applied upstream
- made the patch version visible in the Release tag
- fixed License tag following policy

* Fri Feb 22 2008 Gustavo De Nardin <gustavodn@mandriva.com> 1.8.6-8mdv2008.1
+ Revision: 173813
- fixes a variable name in REXML code, pointed by Guillaume Cottenceau

* Mon Jan 28 2008 Gustavo De Nardin <gustavodn@mandriva.com> 1.8.6-7mdv2008.1
+ Revision: 159036
- updated to ruby-1.8.6-p111 (fixes CVE-2007-5162)
- removed Patch2 (ruby-rdoc_graphviz), fixed upstream a little differently
- removed Patch3 (rexml-double-encoding), applied upstream
- Patch2 (CVE-2007-5770 fix), from Suse, minus CVE-2007-5162 fixes; ruby
  1.8.6 doesn't seem to have SSL support in smtp.rb and pop.rb
- -doc subpackage doesn't requires main package

* Fri Dec 21 2007 Oden Eriksson <oeriksson@mandriva.com> 1.8.6-6mdv2008.1
+ Revision: 136344
- rebuilt against new build deps

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Fri Sep 07 2007 Anssi Hannula <anssi@mandriva.org> 1.8.6-5mdv2008.0
+ Revision: 82045
- rebuild for new soname of tcl

* Thu Jun 07 2007 Guillaume <gc@mandriva.com> 1.8.6-4mdv2008.0
+ Revision: 36514
- add patch3: Fix REXML wrongly saving XML special chars as doubly escaped entities

  + Pascal Terjan <pterjan@mandriva.org>
    - Be more consistant in the macros

  + Nicolas Lécureuil <neoclust@mandriva.org>
    - Remove double BR

* Mon Apr 23 2007 Nicolas Lécureuil <neoclust@mandriva.org> 1.8.6-3mdv2008.0
+ Revision: 17162
- Fix BuildRequires (tk-devel instead of libx11-devel)

* Sun Apr 22 2007 Pascal Terjan <pterjan@mandriva.org> 1.8.6-2mdv2008.0
+ Revision: 16751
- BuildRequires libx11-devel until tk-devel get fixed
- Use Development/Ruby group
- Fix the dot -V parsing in rdoc for recent graphviz


* Sat Apr 07 2007 Pascal Terjan <pterjan@mandriva.org> 1.8.6-1mdv2007.1
+ Revision: 151012
- 1.8.6
- drop p3 and p4
- uncompress and update p0 and p1

* Mon Dec 18 2006 Gustavo De Nardin <gustavodn@mandriva.com> 1.8.5-5mdv2007.1
+ Revision: 98532
- Mostly build changes:
- dependencies fixes
  . don't need full XFree86-devel, tcl/tk devel packages should be enough
  . add missing zlib1-devel BuildRequires, which before was probably being
    provided indirectly by XFree86-devel
- avoid use of non-ascii chars in spec (parameter separator for sed command)
- avoid implicitly requiring Perl for build (for filtering devel and tk
  files)
- use file lists instead of shell loops for fixing permissions, for shorter
  build time

* Wed Dec 06 2006 Pascal Terjan <pterjan@mandriva.org> 1.8.5-4mdv2007.1
+ Revision: 91863
- CVE-2006-6303

* Mon Oct 30 2006 Pascal Terjan <pterjan@mandriva.org> 1.8.5-3mdv2007.1
+ Revision: 73677
- CVE-2006-5467
- Import ruby

* Tue Sep 19 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.8.5-2mdv2007.0
- Rebuild

* Sat Aug 26 2006 Pascal Terjan <pterjan@mandriva.org> 1.8.5-1mdv2007.0
- 1.8.5
- Drop P2, P3, P4, P5, P6

* Wed Aug 23 2006 Pascal Terjan <pterjan@mandriva.org> 1.8.4-7mdv2007.0
- CVE-2006-3694 (P4, P5, P6)
- Fix macros in changelog
- Move make test into %%check

* Sun Jul 16 2006 Guillaume Cottenceau 1.8.4-6mdv2007.0
- author patch3 since even ruby authors don't care to ship a badly broken
  rexml for several months

* Sat May 20 2006 Laurent MONTEL <lmontel@mandriva.com> 1.8.4-5
- Add patch2 (patch from opensuse): don't redefine eaccess (it's into new glibc)

* Thu Mar 09 2006 Pascal Terjan <pterjan@mandriva.org> 1.8.4-4mdk
- BuildRequire openssl-devel

* Tue Feb 14 2006 Pascal Terjan <pterjan@mandriva.org> 1.8.4-3mdk
- Move /etc/rpm/ruby.macros to main package. It is required to build a lot
  of noarch package which do not need -devel.

* Thu Feb 09 2006 Pascal Terjan <pterjan@mandriva.org> 1.8.4-2mdk
- Provide /etc/rpm/ruby.macros with usual macros

* Fri Jan 27 2006 Pascal Terjan <pterjan@mandriva.org> 1.8.4-1mdk
- 1.8.4
- Update P0

* Tue Jan 03 2006 Oden Eriksson <oeriksson@mandriva.com> 1.8.3-5mdk
- rebuilt against soname aware deps (tcl/tk)
- fix deps
- enable threading (--enable-pthread)

* Sun Nov 13 2005 Oden Eriksson <oeriksson@mandriva.com> 1.8.3-4mdk
- rebuilt against openssl-0.9.8a

* Fri Nov 04 2005 Michael Scherer <misc@mandriva.org> 1.8.3-3mdk
- mkrel

* Thu Oct 06 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.8.3-2mdk
- ppc64 fixes

* Sat Oct 01 2005 Pascal Terjan <pterjan@mandriva.org> 1.8.3-1mdk
- 1.8.3
- Drop P2
- Update P1
- Fix requires-on-release

* Wed Jul 13 2005 Pascal Terjan <pterjan@mandriva.org> 1.8.2-7mdk
- CAN-2005-1992 (P2)
- Fix interpreter and rights on samples

* Thu Mar 31 2005 Pascal Terjan <pterjan@mandrake.org> 1.8.2-6mdk
- put and search everything in %%{_prefix}/lib/ruby/ even on x86_64, else all
  noarch packages won't work

* Fri Jan 21 2005 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.8.2-5mdk
- rebuild for new readline

* Tue Jan 18 2005 Götz Waschk <waschk@linux-mandrake.com> 1.8.2-4mdk
- force build with libgdbm3

* Sat Jan 15 2005 Pixel <pixel@mandrakesoft.com> 1.8.2-3mdk
- add ri doc (bugzilla #12976)

* Sun Jan 02 2005 Pascal Terjan <pterjan@mandrake.org> 1.8.2-2mdk
- Disable rpath

* Fri Dec 31 2004 Pascal Terjan <pterjan@mandrake.org> 1.8.2-1mdk
- 1.8.2

* Wed Dec 08 2004 Götz Waschk <waschk@linux-mandrake.com> 1.8.1-5mdk
- rebuild for libgdbm3

* Tue Aug 31 2004 Götz Waschk <waschk@linux-mandrake.com> 1.8.1-4mdk
- build with db 4.2

* Tue Jun 29 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.8.1-2mdk
- BuildRequires: tcl