Summary: A library for reading and returning lines from a terminal. Name: readline Version: 4.3 Release: 2 License: GPL Group: System Environment/Libraries URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html Source: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz Prereq: /sbin/install-info Patch: readline-%{version}-aix5.patch Prefix: %{_prefix} Buildroot: /var/tmp/readline-root %define major 4 %define DEFCC cc # Use --define 'no64 1' on the command line to disable 64bit build %{!?no64:%define BUILD64 1} %{?no64:%define BUILD64 0} %define prefix64 %{_prefix}/64 %description 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 that will use the readline library, you'll also need to install the readline-devel package. %package devel Summary: Development files for programs which will use the readline library. Group: Development/Libraries Requires: readline = %{PACKAGE_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 %patch -b .aix5 %if %{BUILD64} == 1 # Prep 64-bit build in 64bit subdirectory ########################################## # Test whether we can run a 64bit command so we don't waste our time /usr/bin/locale64 >/dev/null 2>&1 mkdir 64bit cd 64bit gunzip -c %{SOURCE0} |tar -xf - cd readline-%{version} %patch -b .aix5 %endif %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if [[ "$CC" != "gcc" ]] then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` fi CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --with-curses make static shared %if %{BUILD64} == 1 # Now build again as 64bit ########################### cd 64bit/%{name}-%{version} export OBJECT_MODE=64 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --with-curses make static shared %endif #BUILD64 %install rm -rf $RPM_BUILD_ROOT make install-shared prefix=$RPM_BUILD_ROOT%{prefix} cd doc make install prefix=$RPM_BUILD_ROOT%{prefix} cd .. ( cd $RPM_BUILD_ROOT gzip -9nf .%{_prefix}/info/*info* rm -f .%{_prefix}/info/dir ) ( cd $RPM_BUILD_ROOT%{prefix}/lib # Create the archives rm -f libreadline.a libhistory.a ar -qv libreadline.a libreadline.so.%major ar -qv libhistory.a libhistory.so.%major # Create a compatibility member to mitigate differences with Bull Freeware # offering COMPATLIBS="libreadline.a:libreadline.so libhistory.a:libhistory.so" for libspec in $COMPATLIBS do lib=`echo $libspec | cut -d: -f1` COMPATMEMBER=`echo $libspec | cut -d: -f2` /usr/bin/dump -Tv $lib |/usr/bin/awk 'match($4,"EXP|Exp") { print $NF }' > tmp.exp libbase=`print $lib | sed -e 's/.a$//' -e 's/^lib//'` ld -L. -bI:tmp.exp -bE:tmp.exp -l$libbase -bM:SRE -bnoentry -o $COMPATMEMBER /usr/bin/strip -e $COMPATMEMBER # Make shr.o a load-only module /usr/bin/ar -r $lib $COMPATMEMBER rm -f $COMPATMEMBER tmp.exp done ) ( cd $RPM_BUILD_ROOT mkdir -p usr/include cd usr/include ln -sf ../..%{prefix}/include/* . cd - mkdir -p usr/lib cd usr/lib ln -sf ../..%{prefix}/lib/* . ) %if %{BUILD64} == 1 #Add 64-bit members to libraries ( export OBJECT_MODE=64 cd 64bit/%{name}-%{version}/shlib /usr/bin/ar -q $RPM_BUILD_ROOT%{prefix}/lib/libreadline.a \ libreadline.so.%major /usr/bin/ar -q $RPM_BUILD_ROOT%{prefix}/lib/libhistory.a \ libhistory.so.%major ) #Add links for 64-bit library members ( mkdir -p $RPM_BUILD_ROOT/%{prefix64}/lib cd $RPM_BUILD_ROOT/%{prefix64}/lib ln -s ../../lib/*.a . ) %endif %clean rm -rf $RPM_BUILD_ROOT %post /sbin/install-info /%{_prefix}/info/history.info.gz /%{_prefix}/info/dir /sbin/install-info /%{_prefix}/info/readline.info.gz /%{_prefix}/info/dir %preun if [ $1 = 0 ]; then /sbin/install-info --delete /%{_prefix}/info/history.info.gz /%{_prefix}/info/dir /sbin/install-info --delete /%{_prefix}/info/readline.info.gz /%{_prefix}/info/dir fi %files %defattr(-,root,system) %{_prefix}/man/man*/* %{_prefix}/info/*info* %{_prefix}/lib/lib*.a /usr/lib/lib*.a %if %{BUILD64} == 1 %attr(755,bin,bin) %dir %{prefix64} %attr(755,bin,bin) %dir %{prefix64}/lib %{prefix64}/lib/lib*.a %endif %files devel %defattr(-,root,system) %{_prefix}/include/readline /usr/include/readline %changelog * Mon Dec 13 2004 David Clissold 4.3-2 - Build 64-bit library version. * Tue Feb 17 2004 David Clissold 4.3-1 - Update to version 4.3 * Wed Jan 30 2002 David Clissold - Update to version 4.2a * Wed Mar 21 2001 Marc Stephenson - Build both 32- and 64-bit libraries - Add AIX5 logic to shared library support section * Thu Mar 08 2001 Marc Stephenson - Add logic for default compiler - Generate shared objects - Add Bull freeware compatibility entry * Tue Feb 20 2001 aixtoolbox - Account for different standard lib location in IA64 32-bit ABI * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Mon Feb 7 2000 Jeff Johnson - compress man pages. * 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