1 | Summary: A library for editing typed command lines
|
---|
2 | Name: readline
|
---|
3 | Version: 6.1
|
---|
4 | Release: 4%{?dist}
|
---|
5 | License: GPLv3+
|
---|
6 | Group: System Environment/Libraries
|
---|
7 | URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
|
---|
8 | Source: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz
|
---|
9 |
|
---|
10 | # sent upstream
|
---|
11 | Patch0: readline-6.1-os2.diff
|
---|
12 |
|
---|
13 | #Requires(post): /sbin/install-info
|
---|
14 | #Requires(preun): /sbin/install-info
|
---|
15 | BuildRequires: ncurses-devel
|
---|
16 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
---|
17 |
|
---|
18 | %description
|
---|
19 | The Readline library provides a set of functions that allow users to
|
---|
20 | edit command lines. Both Emacs and vi editing modes are available. The
|
---|
21 | Readline library includes additional functions for maintaining a list
|
---|
22 | of previously-entered command lines for recalling or editing those
|
---|
23 | lines, and for performing csh-like history expansion on previous
|
---|
24 | commands.
|
---|
25 |
|
---|
26 | %package devel
|
---|
27 | Summary: Files needed to develop programs which use the readline library
|
---|
28 | Group: Development/Libraries
|
---|
29 | Requires: %{name} = %{version}-%{release}
|
---|
30 | Requires: ncurses-devel
|
---|
31 | #Requires(post): /sbin/install-info
|
---|
32 | #Requires(preun): /sbin/install-info
|
---|
33 |
|
---|
34 | %description devel
|
---|
35 | The Readline library provides a set of functions that allow users to
|
---|
36 | edit typed command lines. If you want to develop programs that will
|
---|
37 | use the readline library, you need to have the readline-devel package
|
---|
38 | installed. You also need to have the readline package installed.
|
---|
39 |
|
---|
40 | %package static
|
---|
41 | Summary: Static libraries for the readline library
|
---|
42 | Group: Development/Libraries
|
---|
43 | Requires: %{name}-devel = %{version}-%{release}
|
---|
44 |
|
---|
45 | %description static
|
---|
46 | The readline-static package contains the static version of the readline
|
---|
47 | library.
|
---|
48 |
|
---|
49 | %prep
|
---|
50 | %setup -q
|
---|
51 | %patch0 -p1 -b .os2~
|
---|
52 |
|
---|
53 | #pushd examples
|
---|
54 | #rm -f rlfe/configure
|
---|
55 | #iconv -f iso8859-1 -t utf8 -o rl-fgets.c{_,}
|
---|
56 | #touch -r rl-fgets.c{,_}
|
---|
57 | #mv -f rl-fgets.c{_,}
|
---|
58 | #popd
|
---|
59 |
|
---|
60 | %build
|
---|
61 | #export CPPFLAGS="-I%{_includedir}/ncurses"
|
---|
62 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
|
---|
63 | LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; export LDFLAGS ; \
|
---|
64 | %configure \
|
---|
65 | --disable-shared \
|
---|
66 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
---|
67 |
|
---|
68 | make %{?_smp_mflags}
|
---|
69 |
|
---|
70 | %install
|
---|
71 | rm -rf $RPM_BUILD_ROOT
|
---|
72 |
|
---|
73 | make DESTDIR=$RPM_BUILD_ROOT install
|
---|
74 |
|
---|
75 | #mkdir $RPM_BUILD_ROOT/%{_lib}
|
---|
76 | #mv $RPM_BUILD_ROOT%{_libdir}/libreadline.so.* $RPM_BUILD_ROOT/%{_lib}
|
---|
77 | #for l in $RPM_BUILD_ROOT%{_libdir}/libreadline.so; do
|
---|
78 | # ln -sf $(echo %{_libdir} | \
|
---|
79 | # sed 's,\(^/\|\)[^/][^/]*,..,g')/%{_lib}/$(readlink $l) $l
|
---|
80 | #done
|
---|
81 |
|
---|
82 | rm -rf $RPM_BUILD_ROOT%{_datadir}/readline
|
---|
83 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir*
|
---|
84 |
|
---|
85 | cp readln6.dll $RPM_BUILD_ROOT%{_libdir}
|
---|
86 | cp libreadline_s.a $RPM_BUILD_ROOT%{_libdir}
|
---|
87 | cp libreadline.lib $RPM_BUILD_ROOT%{_libdir}
|
---|
88 | cp histor6.dll $RPM_BUILD_ROOT%{_libdir}
|
---|
89 | cp libhistory_s.a $RPM_BUILD_ROOT%{_libdir}
|
---|
90 | cp libhistory.lib $RPM_BUILD_ROOT%{_libdir}
|
---|
91 |
|
---|
92 |
|
---|
93 | %clean
|
---|
94 | rm -rf $RPM_BUILD_ROOT
|
---|
95 |
|
---|
96 | #%post
|
---|
97 | #/sbin/ldconfig
|
---|
98 | #/sbin/install-info %{_infodir}/history.info.gz %{_infodir}/dir &> /dev/null
|
---|
99 | #/sbin/install-info %{_infodir}/rluserman.info.gz %{_infodir}/dir &> /dev/null
|
---|
100 | #:
|
---|
101 |
|
---|
102 | #%postun -p /sbin/ldconfig
|
---|
103 |
|
---|
104 | #%preun
|
---|
105 | #if [ $1 = 0 ]; then
|
---|
106 | # /sbin/install-info --delete %{_infodir}/history.info.gz %{_infodir}/dir &> /dev/null
|
---|
107 | # /sbin/install-info --delete %{_infodir}/rluserman.info.gz %{_infodir}/dir &> /dev/null
|
---|
108 | #fi
|
---|
109 | #:
|
---|
110 |
|
---|
111 | #%post devel
|
---|
112 | #/sbin/install-info %{_infodir}/readline.info.gz %{_infodir}/dir &> /dev/null
|
---|
113 | #:
|
---|
114 |
|
---|
115 | #%preun devel
|
---|
116 | #if [ $1 = 0 ]; then
|
---|
117 | # /sbin/install-info --delete %{_infodir}/readline.info.gz %{_infodir}/dir &> /dev/null
|
---|
118 | #fi
|
---|
119 | #:
|
---|
120 |
|
---|
121 | %files
|
---|
122 | %defattr(-,root,root,-)
|
---|
123 | %doc CHANGES COPYING NEWS README USAGE
|
---|
124 | %{_libdir}/*.dll
|
---|
125 | %{_infodir}/history.info*
|
---|
126 | %{_infodir}/rluserman.info*
|
---|
127 |
|
---|
128 | %files devel
|
---|
129 | %defattr(-,root,root,-)
|
---|
130 | %doc examples/*.c examples/*.h examples/rlfe
|
---|
131 | %{_includedir}/readline
|
---|
132 | %{_libdir}/*.dll
|
---|
133 | %{_libdir}/libreadline.a
|
---|
134 | %{_libdir}/libhistory.a
|
---|
135 | %{_libdir}/*.lib
|
---|
136 | %{_mandir}/man3/*
|
---|
137 | %{_infodir}/readline.info*
|
---|
138 |
|
---|
139 | %files static
|
---|
140 | %defattr(-,root,root,-)
|
---|
141 | %{_libdir}/*_s.a
|
---|
142 |
|
---|
143 | %changelog
|
---|
144 | * Mon Jan 16 2012 yd
|
---|
145 | - rebuild with libc 0.6.4 runtime.
|
---|