1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
10 Summary: MinGW port of readline for editing typed command lines
13 Group: System Environment/Libraries
14 URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
15 Source0: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18 Patch1: readline-5.2-shlib.patch
19 Patch2: readline-5.2-001.patch
20 Patch3: readline-5.2-002.patch
21 Patch4: readline-5.2-003.patch
22 Patch5: readline-5.2-004.patch
23 Patch6: readline-5.2-005.patch
24 Patch7: readline-5.2-006.patch
25 Patch8: readline-5.2-007.patch
26 Patch9: readline-5.2-008.patch
27 Patch10: readline-5.2-009.patch
28 Patch11: readline-5.2-010.patch
29 Patch12: readline-5.2-011.patch
30 Patch13: readline-5.2-redisplay-sigint.patch
34 BuildRequires: mingw32-filesystem >= 29
35 BuildRequires: mingw32-gcc
36 BuildRequires: mingw32-binutils
37 BuildRequires: mingw32-termcap
41 The Readline library provides a set of functions that allow users to
42 edit command lines. Both Emacs and vi editing modes are available. The
43 Readline library includes additional functions for maintaining a list
44 of previously-entered command lines for recalling or editing those
45 lines, and for performing csh-like history expansion on previous
48 This is a port of the library and development tools to Windows.
52 %setup -q -n readline-%{version}
65 %patch13 -p1 -b .redisplay-sigint
69 iconv -f iso8859-1 -t utf8 -o rl-fgets.c{_,}
70 touch -r rl-fgets.c{,_}
76 %{_mingw32_configure} --enable-shared
77 make SHLIB_LIBS=-ltermcap
79 # Rebuild the DLLs correctly and create implibs.
81 %{_mingw32_cc} -shared -o readline.dll -Wl,--out-implib,readline.dll.a readline.so vi_mode.so funmap.so keymaps.so parens.so search.so rltty.so complete.so bind.so isearch.so display.so signals.so util.so kill.so undo.so macro.so input.so callback.so terminal.so text.so nls.so misc.so xmalloc.so history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so tilde.so compat.so -ltermcap
82 %{_mingw32_cc} -shared -o history.dll -Wl,--out-implib,history.dll.a history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so xmalloc.so
87 rm -rf $RPM_BUILD_ROOT
88 make DESTDIR=$RPM_BUILD_ROOT install
90 # Remove the fake .so files and install our DLLs and implibs.
92 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/lib*.so.*
93 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
94 install readline.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
95 install readline.dll.a $RPM_BUILD_ROOT%{_mingw32_libdir}
96 install history.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
97 install history.dll.a $RPM_BUILD_ROOT%{_mingw32_libdir}
100 # Don't want the info files or manpages which duplicate the native package.
101 rm -rf $RPM_BUILD_ROOT%{_mingw32_prefix}/{info,man}
103 # Don't want the static library.
104 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libhistory.a
105 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libreadline.a
109 rm -rf $RPM_BUILD_ROOT
113 %defattr(-,root,root)
114 %{_mingw32_bindir}/readline.dll
115 %{_mingw32_bindir}/history.dll
116 %{_mingw32_libdir}/readline.dll.a
117 %{_mingw32_libdir}/history.dll.a
118 %{_mingw32_includedir}/readline/
122 * Thu Sep 25 2008 Richard W.M. Jones <rjones@example.com> - 5.2-1
123 - Initial RPM release.