Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 8a10625dd3b8e42e5ee544d2d6b223e7 > files > 8

ruby-1.8.6-5mdv2008.0.src.rpm

Summary:	Object Oriented Script Language
Name:		ruby
Version:	1.8.6
%define		subver 1.8
Release: 	%mkrel 5
License:	GPL
Group:		Development/Ruby
BuildRequires:	autoconf2.5
BuildRequires:	byacc
BuildRequires:	ncurses-devel
BuildRequires:	readline-devel
BuildRequires:	tcl-devel tk-devel
BuildRequires:	db4.2-devel
BuildRequires:  libgdbm-devel >= 1.8.3
BuildRequires:  openssl-devel
BuildRequires:	zlib1-devel
Obsoletes:	ruby-rexml
Provides:	ruby-rexml

Source0:	ftp://ftp.ruby-lang.org/pub/ruby/ruby-%{version}.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
# Fix the dot -V parsing for recent grphviz
Patch2:		ruby-rdoc_graphviz.patch
# Fix REXML wrongly saving XML special chars as entities
Patch3: ruby-1.8.6-fix-rexml-double-encoding.patch
URL:		http://www.ruby-lang.org/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%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
Requires:	%{name} = %{version}

%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
%patch0 -p0 -b .lib64
%patch1 -p0 -b .ri
%patch2 -p0 -b .graphviz
%patch3 -p0

sed -i -e "s,| sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/',," configure.in

%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
%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}-%{_host_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

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%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}-%{_host_os}/*.[ah]
%{_libdir}/libruby-static.a
%{_libdir}/libruby.so

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



%changelog
* 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 gc <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