1 |
%define major 8 |
2 |
%define libname %mklibname %{name} %{major} |
3 |
%define develname %mklibname %{name} -d |
4 |
|
5 |
Summary: Library for reading lines from a terminal |
6 |
Name: readline |
7 |
Version: 8.2 |
8 |
Release: %mkrel 2 |
9 |
License: GPLv3 |
10 |
Group: System/Libraries |
11 |
Url: https://tiswww.case.edu/php/chet/readline/rltop.html |
12 |
Source0: https://ftp.gnu.org/gnu/readline/%{name}-%{version}.tar.gz |
13 |
Source1: https://ftp.gnu.org/gnu/readline/%{name}-%{version}.tar.gz.sig |
14 |
Patch0: readline-4.3-no_rpath.patch |
15 |
Patch1: readline-4.1-outdated.patch |
16 |
Patch2: rl-header.patch |
17 |
Patch3: rl-attribute.patch |
18 |
# Official upstream patches |
19 |
# Patches are converted to apply with '-p1' |
20 |
Patch31: readline-8.2-patch-1.patch |
21 |
|
22 |
BuildRequires: pkgconfig(ncursesw) |
23 |
|
24 |
%description |
25 |
The "readline" library will read a line from the terminal and return it, |
26 |
allowing the user to edit the line with the standard emacs editing keys. |
27 |
It allows the programmer to give the user an easier-to-use and more |
28 |
intuitive interface. |
29 |
|
30 |
%package -n %{libname} |
31 |
Summary: Shared libraries for readline |
32 |
Group: System/Libraries |
33 |
Requires(pre): filesystem >= 2.1.9-18 |
34 |
Provides: %{name} = %{version}-%{release} |
35 |
|
36 |
%description -n %{libname} |
37 |
This package contains the library needed to run programs dynamically |
38 |
linked to readline. |
39 |
|
40 |
%package doc |
41 |
Summary: Readline documentation in GNU info format |
42 |
Group: Documentation |
43 |
Requires: %{libname} = %{version}-%{release} |
44 |
|
45 |
%description doc |
46 |
This package contains readline documentation in the GNU info format. |
47 |
|
48 |
%package -n %{develname} |
49 |
Summary: Files for developing programs that use the readline library |
50 |
Group: Development/C |
51 |
Requires(pre): filesystem >= 2.1.9-18 |
52 |
Requires: ncursesw-devel |
53 |
Requires: %{libname} = %{version}-%{release} |
54 |
Provides: %{name}-devel = %{version}-%{release} |
55 |
|
56 |
%description -n %{develname} |
57 |
The "readline" library will read a line from the terminal and return it, |
58 |
using prompt as a prompt. If prompt is null, no prompt is issued. The |
59 |
line returned is allocated with malloc(3), so the caller must free it when |
60 |
finished. The line returned has the final newline removed, so only the |
61 |
text of the line remains. |
62 |
|
63 |
%prep |
64 |
%setup -q |
65 |
%patch -P 0 -p1 -b .no_rpath |
66 |
%patch -P 1 -p1 -b .outdated |
67 |
%patch -P 2 -p1 -b .header |
68 |
%patch -P 3 -p1 -b .attribute |
69 |
%patch -P 31 -p1 |
70 |
|
71 |
# Fix upstream perm Bug #3053 |
72 |
chmod 644 examples/rlfe/ChangeLog |
73 |
|
74 |
%build |
75 |
%configure \ |
76 |
--disable-static \ |
77 |
--disable-install-examples \ |
78 |
--with-curses \ |
79 |
--enable-multibyte |
80 |
%make_build SHLIB_LIBS="-lncursesw" |
81 |
|
82 |
%install |
83 |
%make_install |
84 |
|
85 |
rm -rf %{buildroot}%{_docdir}/%{name}/ |
86 |
|
87 |
%files -n %{libname} |
88 |
%{_libdir}/lib*.so.%{major}{,.*} |
89 |
|
90 |
%files doc |
91 |
%{_infodir}/*info* |
92 |
|
93 |
%files -n %{develname} |
94 |
%doc CHANGELOG CHANGES MANIFEST README USAGE |
95 |
%doc doc examples support |
96 |
%{_includedir}/readline/ |
97 |
%{_libdir}/lib*.so |
98 |
%{_libdir}/pkgconfig/%{name}.pc |
99 |
%{_libdir}/pkgconfig/history.pc |
100 |
%{_mandir}/man3/*.3* |