diff --git a/README.md b/README.md index 8d053cb..04879b2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # libreadline +The Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. +Both Emacs and vi editing modes are available. +The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands. + diff --git a/libreadline-6.2-shlib.patch b/libreadline-6.2-shlib.patch new file mode 100644 index 0000000..3b0cb3d --- /dev/null +++ b/libreadline-6.2-shlib.patch @@ -0,0 +1,41 @@ +diff -up readline-6.2/shlib/Makefile.in.shlib readline-6.2/shlib/Makefile.in +--- readline-6.2/shlib/Makefile.in.shlib 2010-12-28 21:56:21.000000000 +0100 ++++ readline-6.2/shlib/Makefile.in 2011-02-14 17:34:38.821537496 +0100 +@@ -170,7 +170,7 @@ $(SHARED_READLINE): $(SHARED_OBJ) + + $(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so xfree.so + $(RM) $@ +- $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so xfree.so $(SHLIB_LIBS) ++ $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so xfree.so + + # Since tilde.c is shared between readline and bash, make sure we compile + # it with the right flags when it's built as part of readline +diff -up readline-6.2/support/shlib-install.shlib readline-6.2/support/shlib-install +--- readline-6.2/support/shlib-install.shlib 2009-10-28 14:30:18.000000000 +0100 ++++ readline-6.2/support/shlib-install 2011-02-14 17:33:07.611768164 +0100 +@@ -72,7 +72,7 @@ fi + case "$host_os" in + hpux*|darwin*|macosx*|linux*) + if [ -z "$uninstall" ]; then +- chmod 555 ${INSTALLDIR}/${LIBNAME} ++ chmod 755 ${INSTALLDIR}/${LIBNAME} + fi ;; + cygwin*|mingw*) + IMPLIBNAME=`echo ${LIBNAME} \ +diff -up readline-6.2/support/shobj-conf.shlib readline-6.2/support/shobj-conf +--- readline-6.2/support/shobj-conf.shlib 2009-10-28 14:20:21.000000000 +0100 ++++ readline-6.2/support/shobj-conf 2011-02-14 17:33:07.612767986 +0100 +@@ -112,10 +112,11 @@ sunos5*|solaris2*) + linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) + SHOBJ_CFLAGS=-fPIC + SHOBJ_LD='${CC}' +- SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' ++ SHOBJ_LDFLAGS='$(CFLAGS) -shared -Wl,-soname,$@' + +- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`' ++ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ++ SHLIB_LIBS='-ltermcap' + ;; + + freebsd2*) diff --git a/libreadline.spec b/libreadline.spec new file mode 100644 index 0000000..22c1ffe --- /dev/null +++ b/libreadline.spec @@ -0,0 +1,181 @@ +%define majver %(echo %version | cut -d. -f1-2) +%define minver %(echo %version | cut -d. -f3) +Name: libreadline +Version: 6.3.005 +Release: 1mamba +Summary: Lets users edit command lines as they are typed in +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.gnu.org/directory/GNU/readline.html +Source0: ftp://ftp.gnu.org/gnu/readline/readline-%{majver}.tar.gz +Patch0: %{name}-6.2-shlib.patch +#Patch1: libreadline-6.2-upstream-fixes-001.patch +#Patch2: ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-001 +#Patch3: ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-002 +#Patch4: ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-003 +#Patch5: ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-%{minver} +License: LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libtermcap-devel +## AUTOBUILDREQ-END +Requires(post):%{__install_info} +Requires(preun): %{__install_info} +Obsoletes: libreadline-doc +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +The Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. +Both Emacs and vi editing modes are available. +The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands. + +%package devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +This package contains libraries and header files for developing applications that use %{name}. + +%package static +Group: Development/Libraries +Summary: Static libraries for the readline library + +%description static +The %{name}-static package contains the static version of the readline library. + +%debug_package + +%prep +%setup -q -n readline-%{majver} +#% patch0 -p1 +#% patch1 -p0 +##% patch2 -p0 +#% patch3 -p0 +#% patch4 -p0 +#% patch5 -p0 + +%build +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +# fixup strange shared library permissions +chmod 755 %{buildroot}%{_libdir}/*.so* + +# remove unpackaged files +rm -fr %{buildroot}%{_datadir}/readline + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post +/sbin/ldconfig +%install_info history.info +%install_info rluserman.info +exit 0 + +%preun +%uninstall_info history.info +%uninstall_info rluserman.info +exit 0 + +%postun -p /sbin/ldconfig + +%post devel +%install_info readline.info +exit 0 + +%preun devel +%uninstall_info readline.info +exit 0 + +%files +%defattr(-,root,root) +%{_libdir}/libhistory.so.* +%{_libdir}/libreadline.so.* +%{_infodir}/history.info* +%{_infodir}/rluserman.info* +%doc COPYING + +%files devel +%defattr(-,root,root) +%{_libdir}/*.so +%dir %{_includedir}/readline +%{_includedir}/readline/*.h +%{_infodir}/readline.info* +%{_mandir}/man3/history.* +%{_mandir}/man3/readline.* +%dir %{_docdir}/readline +%{_docdir}/readline/* +%doc examples/*.c examples/*.h examples/rlfe +%doc CHANGELOG CHANGES NEWS README + +%files static +%defattr(-,root,root) +%{_libdir}/lib*.a + +%changelog +* Thu Apr 24 2014 Automatic Build System 6.3.005-1mamba +- automatic version update by autodist + +* Tue Apr 08 2014 Automatic Build System 6.3.003-1mamba +- automatic version update by autodist + +* Fri Mar 21 2014 Silvan Calarco 6.3-1mamba +- update to 6.3 + +* Sat Dec 08 2012 Automatic Build System 6.2.004-1mamba +- update to 6.2.004 + +* Sat Sep 15 2012 Silvan Calarco 6.2-4mamba +- added upstream bugfix patch 001 +- restore shared library patch to fix build of dependent packages + +* Wed May 09 2012 Davide Madrisan 6.2-3mamba +- revert patch0: linking to libtermcap can create problems to other packages + +* Tue May 08 2012 Davide Madrisan 6.2-2mamba +- create subpackage libreadline-static +- move readline.info and manpages to package -devel +- provide a debug package +- obsolete libreadline-doc; this documentation is obsolete +- remove unused patch0 +- add some code examples to devel package +- force linking to libtermcap to avoid several undefined symbols in libreadline +- add build requirements + +* Mon Feb 14 2011 Automatic Build System 6.2-1mamba +- automatic update by autodist + +* Wed Jan 13 2010 Automatic Build System 6.1-1mamba +- automatic update by autodist + +* Sun Mar 22 2009 Silvan Calarco 6.0-1mamba +- automatic update by autodist + +* Fri Sep 14 2007 Silvan Calarco 5.2-2mamba +- added patch with various fixes + +* Fri Oct 13 2006 Davide Madrisan 5.2-1qilnx +- update to version 5.2 by autospec + +* Tue Dec 13 2005 Davide Madrisan 5.1-1qilnx +- update to version 5.1 by autospec +- new compatibility package %{name}43 + +* Fri Sep 09 2005 Davide Madrisan 5.0-2qilnx +- fixed dynamic libraries permissions + +* Thu Sep 08 2005 Davide Madrisan 5.0-1qilnx +- update to version 5.0 by autospec +- several specfile fixes +- new package %{name}.doc + +* Thu Jul 17 2003 Silvan Calarco 4.3-1qilnx +- first build for readline