Summary: A library for editing typed command lines Name: readline Version: 6.0 Release: 1 License: GPLv2+ Group: System Environment/Libraries URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Source1: libreadline.so.4-aix32 Source2: libreadline.so.4-aix64 Source3: libhistory.so.4-aix32 Source4: libhistory.so.4-aix64 Source5: libreadline.so.5-aix32 Source6: libreadline.so.5-aix64 Source7: libhistory.so.5-aix32 Source8: libhistory.so.5-aix64 Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %define major 6 BuildRequires: patch Requires: /sbin/install-info, info %description The Readline library provides a set of functions that allow users to edit command lines. Both Emacs and vi editing modes are available. The Readline library includes additional functions for maintaining a list of previously-entered command lines for recalling or editing those lines, and for performing csh-like history expansion on previous commands. The library is available as 32-bit and 64-bit. %package devel Summary: Files needed to develop programs which use the readline library Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: /sbin/install-info, info %description devel The Readline library provides a set of functions that allow users to edit typed command lines. If you want to develop programs that will use the readline library, you need to have the readline-devel package installed. You also need to have the readline package installed. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc -q64" or "gcc -maix64". %prep export PATH=/opt/freeware/bin:$PATH %setup -q %patch0 %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" export OBJECT_MODE="64" # first build the 64-bit version export CC="cc -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static make %{?_smp_mflags} mkdir 64bit cp shlib/libhistory.so.6 64bit/ cp shlib/libreadline.so.6 64bit/ make distclean # now build the 32-bit version export CC="cc" export OBJECT_MODE="32" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static make %{?_smp_mflags} # Create the archives rm -f libhistory.a libreadline.a ${AR} -rv libhistory.a shlib/libhistory.so.%{major} ${AR} -rv libreadline.a shlib/libreadline.so.%{major} # add 64-bit shared objects to library ${AR} -q libhistory.a 64bit/libhistory.so.%{major} ${AR} -q libreadline.a 64bit/libreadline.so.%{major} # Add the older version 4 shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') /usr/bin/strip -X32 -e %{SOURCE1} %{SOURCE3} /usr/bin/strip -X64 -e %{SOURCE2} %{SOURCE4} cp %{SOURCE1} libreadline.so.4 /usr/bin/ar -X32 -q libreadline.a libreadline.so.4 cp %{SOURCE2} libreadline.so.4 /usr/bin/ar -X64 -q libreadline.a libreadline.so.4 cp %{SOURCE3} libhistory.so.4 /usr/bin/ar -X32 -q libhistory.a libhistory.so.4 cp %{SOURCE4} libhistory.so.4 /usr/bin/ar -X64 -q libhistory.a libhistory.so.4 # Add the older version 5 shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') /usr/bin/strip -X32 -e %{SOURCE5} %{SOURCE7} /usr/bin/strip -X64 -e %{SOURCE6} %{SOURCE8} cp %{SOURCE5} libreadline.so.5 /usr/bin/ar -X32 -q libreadline.a libreadline.so.5 cp %{SOURCE6} libreadline.so.5 /usr/bin/ar -X64 -q libreadline.a libreadline.so.5 cp %{SOURCE7} libhistory.so.5 /usr/bin/ar -X32 -q libhistory.a libhistory.so.5 cp %{SOURCE8} libhistory.so.5 /usr/bin/ar -X64 -q libhistory.a libhistory.so.5 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib*so.%{major} cp lib*.a ${RPM_BUILD_ROOT}%{_libdir} chmod 0644 ${RPM_BUILD_ROOT}%{_libdir}/lib*.a cd doc make info make DESTDIR=${RPM_BUILD_ROOT} install cd .. rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*info* ( cd $RPM_BUILD_ROOT for dir in include lib do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{_prefix}/$dir/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %post /sbin/install-info %{_infodir}/history.info.gz %{_infodir}/dir /sbin/install-info %{_infodir}/rluserman.info.gz %{_infodir}/dir exit 0 %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/history.info.gz %{_infodir}/dir /sbin/install-info --delete %{_infodir}/rluserman.info.gz %{_infodir}/dir fi exit 0 %post devel /sbin/install-info %{_infodir}/readline.info.gz %{_infodir}/dir || : %preun devel if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/readline.info.gz %{_infodir}/dir || : fi %files %defattr(-,root,system,-) %doc CHANGES COPYING NEWS README USAGE %{_libdir}/*.a %{_infodir}/history.info* %{_infodir}/rluserman.info* /usr/lib/*.a %files devel %defattr(-,root,system,-) %doc examples/*.c examples/*.h examples/rlfe %{_includedir}/readline %{_mandir}/man3/* %{_infodir}/readline.info* /usr/include/* %changelog * Mon Mar 30 2009 Michael Perzl - 6.0-1 - update to version 6.0 * Fri Mar 27 2009 Michael Perzl - 5.2-2 - fixed shared library symbol export and added version 4 compatibility members * Mon Mar 31 2008 Michael Perzl - 5.2-1 - first version for AIX V5.1 and higher