%global major_ver 2.0.0 %global patchlevel 353 %define buildhost powerpc-aix5.1.0.0 %define ruby_libdir %{_libdir}/%{name}/%{major_ver} %define ruby_archdir %{_libdir}/%{name}/%{major_ver}/%{buildhost} %define ruby_sitearchdir %{_libdir}/%{name}/site_ruby/%{major_ver}/%{buildhost} %define ruby_sitelibdir %{_libdir}/%{name}/site_ruby/%{major_ver} %define ruby_vendorarchdir %{_libdir}/%{name}/vendor_ruby/%{major_ver}/%{buildhost} %define ruby_vendorlibdir %{_libdir}/%{name}/vendor_ruby/%{major_ver} %define ruby_gemdir %{_libdir}/%{name}/gems/%{major_ver} %define ruby_ridir %{_datadir}/ri/%{major_ver} Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{major_ver}.%{patchlevel} Release: 1 Group: Development/Languages License: (Ruby or BSD) and Public Domain URL: http://ruby-lang.org/ Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_ver}/%{name}-%{major_ver}-p%{patchlevel}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: readline-devel >= 5.2-3 BuildRequires: openssl-devel >= 1.0.1 BuildRequires: gdbm-devel >= 1.8.3-1 BuildRequires: libyaml-devel >= 0.1.4-1 BuildRequires: zlib-devel >= 1.2.3 Requires: readline >= 5.2-3 Requires: openssl >= 1.0.1 Requires: gdbm >= 1.8.3-1 Requires: libyaml >= 0.1.4-1 Requires: zlib >= 1.2.3 %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. %package devel Summary: A Ruby development environment Group: Development/Languages Requires: %{name} = %{version}-%{release} %description devel Header files and libraries for building an extension library for the Ruby or an application embedding Ruby. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} %description doc This package contains documentation for %{name}. %prep %setup -q -n %{name}-%{major_ver}-p%{patchlevel} %build export OBJECT_MODE=32 export CC="cc -D_LARGE_FILES" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared # this is required so ruby finds it's shared library export LIBPATH="%{_libdir}:/usr/lib:/lib:`pwd`" # Q= makes the build output more verbose make %{?_smp_mflags} Q= %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} # this is required so ruby finds it's shared library export LIBPATH="%{_libdir}:/usr/lib:/lib:`pwd`" make DESTDIR=${RPM_BUILD_ROOT} install prefix=${RPM_BUILD_ROOT}%{_prefix} /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : slibclean find ${RPM_BUILD_ROOT}%{ruby_archdir} -name "*.so" -exec /usr/bin/strip -X32_64 {} \; # create AIX-style shared library ( cd ${RPM_BUILD_ROOT}%{_libdir} /usr/bin/ar -X32 -rv lib%{name}.a lib%{name}.so.%{major_ver} ) cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %doc COPYING ChangeLog GPL LEGAL NEWS README ToDo %doc doc/ChangeLog-* doc/NEWS-* %{_bindir}/* %{_libdir}/libruby.so* %{_libdir}/%{name} %{_mandir}/man1/* /usr/bin/* %files devel %doc COPYING* GPL LEGAL README.EXT %{_includedir}/* %{_libdir}/libruby.a %{_libdir}/pkgconfig/%{name}*.pc %files doc %doc COPYING GPL LEGAL README %{_datadir}/ri %{_datadir}/doc/%{name} %changelog * Thu Dec 12 2013 Michael Perzl - 2.0.0.353-1 - updated to version 2.0.0.353 * Wed Jul 24 2013 Michael Perzl - 2.0.0.247-1 - first version for AIX V5.1 and higher