File compat-readline4.spec of Package compat-readline4

#
# spec file for package compat-readline4 (Version 4.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           compat-readline4
BuildRequires:  ncurses-devel
License:        GPL v2 or later
Group:          System/Libraries
AutoReqProv:    on
# bug437293
%ifarch ppc64
Obsoletes:      compat-readline4-64bit
%endif
%ifarch  ppc
Obsoletes:      compat-readline4-32bit
%endif
#
Version:        4.3
Release:        137
Summary:        The Old readline Library 4.3
Group:          System/Libraries
Source:         readline-%{version}.tar.bz2
Patch1:         readline-%{version}.dif
Patch2:         readline-%{version}-destdir.patch
Patch9:         bash-2.05b-display.patch
Patch10:        bash-2.05b-display-mbspeed.patch
Patch13:        readline-%{version}-input.dif
Patch14:        bash-2.05b-readline-init.patch
Patch15:        bash-2.05b-complete.patch
Patch17:        bash-2.05b-infinite.patch
Patch18:        bash-2.05b-mbutil.patch
Patch19:        bash-2.05b-vimode.patch
Patch22:        bash-2.05b-utf8.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The readline library is used by the Bourne Again shell (Bash, the
standard comand interpreter) for easy editing of command lines.  This
includes history and search functionality.

This package includes an older version for compatibility reasons.



%prep
%setup -q -n readline-4.3
%patch9  -p2 -b .display
%patch10 -p2 -b .display-mbspeed
%patch14 -p3 -b .readline-init
%patch15 -p3 -b .complete
%patch17 -p2 -b .infinite
%patch18 -p2 -b .mbutil
%patch19 -p2 -b .vimode
%patch22 -p2 -b .uft8
%patch1  -p0
%patch2  -p0 -b .destdir
%patch13 -p0 -b .zerotty

%build
%{?suse_update_config:%{suse_update_config -f support}}
autoconf
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" ./configure \
	--build=%{_target_cpu}-suse-linux \
	--prefix=/usr			  \
	--with-curses			  \
	--mandir=%{_mandir}		  \
	--infodir=%{_infodir}		  \
	--libdir=%{_libdir}
make

%install
mkdir $RPM_BUILD_ROOT/%{_lib}
install -m 755 shlib/libreadline.so.4.3 $RPM_BUILD_ROOT/%{_lib}
install -m 755 shlib/libhistory.so.4.3 $RPM_BUILD_ROOT/%{_lib}
/sbin/ldconfig -n  $RPM_BUILD_ROOT/%{_lib}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
/%{_lib}/libhistory.so.4
/%{_lib}/libhistory.so.4.3
/%{_lib}/libreadline.so.4
/%{_lib}/libreadline.so.4.3

%changelog
* Tue Dec 09 2008 ro@suse.de
- remove ix86 from ifarch statement obsoleting 32bit package
* Thu Oct 30 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Fri Mar 30 2007 stbinner@suse.de
- add ncurses-devel to build requires
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Sep 06 2004 kukuk@suse.de
- Split from old bash package for binary compatibility with old
  packages.