Summary: A library for editing typed command lines Name: readline Version: 5.2 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 Patch1: readline52-001 Patch2: readline52-002 Patch3: readline52-003 Patch4: readline52-004 Patch5: readline52-005 Patch6: readline52-006 Patch7: readline52-007 Patch8: readline52-008 Patch9: readline52-009 Patch10: readline52-010 Patch11: readline52-011 Patch12: readline52-012 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %define major 5 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 %patch1 -p0 -b .001 %patch2 -p0 -b .002 %patch3 -p0 -b .003 %patch4 -p0 -b .004 %patch5 -p0 -b .005 %patch6 -p0 -b .006 %patch7 -p0 -b .007 %patch8 -p0 -b .008 %patch9 -p0 -b .009 %patch10 -p0 -b .010 %patch11 -p0 -b .011 %patch12 -p0 -b .012 %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} \ --enable-shared --disable-static make %{?_smp_mflags} mkdir 64bit cp shlib/libhistory.so.5 64bit/ cp shlib/libreadline.so.5 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} %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 31 2008 Michael Perzl - 5.2-1 - first version for AIX V5.1 and higher