File compat-readline4.spec of Package compat-readline4

#
# spec file for package compat-readline4
#
# Copyright (c) 2011 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/
#

Name:           compat-readline4
BuildRequires:  autoconf
BuildRequires:  ncurses-devel
# bug437293
%ifarch ppc64
Obsoletes:      compat-readline4-64bit
%endif
#
Version:        4.3
Release:        0
Summary:        The Old readline Library 4.3
License:        GPL-2.0+
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
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
openSUSE Build Service is sponsored by