%ifos darwin %define __sosuffix .dylib %else %define __sosuffix .so %endif Summary: A library for editing typed in command lines. Name: readline Version: 4.1 Release: 8b Copyright: GPL Group: System Environment/Libraries Source: ftp://ftp.gnu.org/gnu/readline-%{version}.tar.gz Patch0: readline-2.2.1-guard.patch Patch1: readline-4.1-outdated.patch Patch2: readline-4.1-fixendkey.patch Patch3: readline-4.1-macosx-10.1-shared.patch %ifnos darwin Prereq: /sbin/install-info /sbin/ldconfig %endif Prefix: %{_prefix} Buildroot: %{_tmppath}/%{name}-root %ifnos darwin BuildRequires: sed %endif %description The readline library reads a line from the terminal and returns it, allowing the user to edit the line with standard emacs editing keys. The readline library allows programmers to provide an easy to use and more intuitive interface for users. If you want to develop programs that will use the readline library, you'll also need to install the readline-devel package. %package devel Summary: Files needed to develop programs which use the readline library. Group: Development/Libraries Requires: readline = %{version} %description devel The readline library will read a line from the terminal and return it. Use of the readline library allows programmers to provide an easy to use and more intuitive interface for users. If you want to develop programs which will use the readline library, you'll need to have the readline-devel package installed. You'll also need to have the readline package installed. %prep %setup -q %patch0 -p1 -b .guard %patch1 -p1 -b .outdated %patch2 -p1 -b .fixendkey %patch3 -p1 -b .macosx %build %ifos darwin CFLAGS="$RPM_OPT_FLAGS" ./configure %else %configure %endif make all shared %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_libdir} %makeinstall install install-shared chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/*%{__sosuffix}* { cd ${RPM_BUILD_ROOT} %ifnos darwin ln -sf libreadline%{__sosuffix}.%{version} .%{_libdir}/libreadline%{__sosuffix} ln -sf libhistory%{__sosuffix}.%{version} .%{_libdir}/libhistory%{__sosuffix} ln -sf libreadline%{__sosuffix}.%{version} \ .%{_libdir}/libreadline%{__sosuffix}.`echo %{version} | sed 's^\..*^^g'` ln -sf libhistory%{__sosuffix}.%{version} \ .%{_libdir}/libhistory%{__sosuffix}.`echo %{version} | sed 's^\..*^^g'` gzip -9nf .%{_infodir}/*.info* %endif rm -f .%{_infodir}/dir } %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %ifnos darwin %post /sbin/ldconfig /sbin/install-info %{_infodir}/history.info.gz %{_infodir}/dir /sbin/install-info %{_infodir}/readline.info.gz %{_infodir}/dir %postun -p /sbin/ldconfig %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/history.info.gz %{_infodir}/dir /sbin/install-info --delete %{_infodir}/readline.info.gz %{_infodir}/dir fi %endif %files %ifos darwin %defattr(-,root,wheel) %else %defattr(-,root,root) %endif %{_mandir}/man*/* %{_infodir}/*.info* %ifos darwin %{_libdir}/lib*.%{version}%{__sosuffix} %else %{_libdir}/lib*%{__sosuffix}.* %endif %files devel %ifos darwin %defattr(-,root,wheel) %else %defattr(-,root,root) %endif %{_includedir}/readline %{_libdir}/lib*.a %{_libdir}/libhistory%{__sosuffix} %{_libdir}/libreadline%{__sosuffix} %changelog * Wed Oct 10 2001 Keisuke Fujii - release 8b: built on MacOS X 10.1 * Sat Apr 21 2001 Keisuke Fujii - release 8a: built on MacOS X 10.0.01 * Thu Mar 8 2001 Preston Brown - fix reading of end key termcap value (@7 is correct, was kH) (#30884) * Tue Jan 30 2001 Nalin Dahyabhai - mark the man page as currently out-of-date (#25294) * Thu Sep 7 2000 Jeff Johnson - FHS packaging (64bit systems need to use libdir). * Thu Aug 17 2000 Jeff Johnson - summaries from specspo. * Wed Aug 2 2000 Florian La Roche - use "rm -f" in specfile * Wed Jul 12 2000 Prospector - automatic rebuild * Mon Jun 5 2000 Jeff Johnson - FHS packaging. * Tue Mar 21 2000 Bernhard Rosenkraenzer - 4.1 * Thu Feb 03 2000 Nalin Dahyabhai - update to 4.0 * Fri Apr 09 1999 Michael K. Johnson - added guard patch from Taneli Huuskonen * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 4) * Sun Jul 26 1998 Jeff Johnson - updated to 2.2.1 * Wed May 06 1998 Prospector System - translations modified for de, fr, tr * Wed May 06 1998 Cristian Gafton - don't package /usr/info/dir * Thu Apr 30 1998 Cristian Gafton - devel package moved to Development/Libraries * Tue Apr 21 1998 Cristian Gafton - updated to 2.2 * Tue Oct 14 1997 Donnie Barnes - spec file cleanups * Fri Oct 10 1997 Erik Troan - added proper sonames * Tue Jul 08 1997 Erik Troan - updated to readline 2.1 * Tue Jun 03 1997 Erik Troan - built against glibc