/[packages]/cauldron/readline/current/SPECS/readline.spec
ViewVC logotype

Contents of /cauldron/readline/current/SPECS/readline.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 653 - (show annotations) (download)
Sat Jan 8 14:47:37 2011 UTC (13 years, 3 months ago) by blino
File size: 3947 byte(s)
imported package readline
1 %define major 6
2 %define lib_name_orig lib%{name}
3 %define libname %mklibname %{name} %{major}
4 %define develname %mklibname %{name} -d
5
6 Summary: Library for reading lines from a terminal
7 Name: readline
8 Version: 6.1
9 Release: %mkrel 3
10 License: GPLv2+
11 Group: System/Libraries
12 Url: http://tiswww.case.edu/php/chet/readline/rltop.html
13 Source0: ftp://ftp.gnu.org/gnu/readline/%{name}-%{version}.tar.gz
14 Source1: ftp://ftp.gnu.org/gnu/readline/%{name}-%{version}.tar.gz.sig
15 Patch0: readline-4.3-no_rpath.patch
16 Patch3: readline-4.1-outdated.patch
17 Patch4: rl-header.patch
18 Patch5: rl-attribute.patch
19 Patch6: readline-6.0-fix-shared-libs-perms.patch
20 Patch10: readline61-001
21 Patch12: readline61-002
22 BuildRequires: libncurses-devel
23 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
24
25 %description
26 The "readline" library will read a line from the terminal and return it,
27 allowing the user to edit the line with the standard emacs editing keys.
28 It allows the programmer to give the user an easier-to-use and more
29 intuitive interface.
30
31 %package -n %{libname}
32 Summary: Shared libraries for readline
33 Group: System/Libraries
34 Obsoletes: %{name}
35 Provides: %{name} = %{version}-%{release}
36
37 %description -n %{libname}
38 This package contains the library needed to run programs dynamically
39 linked to readline.
40
41 %package doc
42 Summary: Readline documentation in GNU info format
43 Group: Books/Computer books
44 Provides: %{name}-doc = %{version}-%{release}
45 Requires: %{libname} = %{version}-%{release}
46 Obsoletes: %{libname}-doc
47
48 %description doc
49 This package contains readline documentation in the GNU info format.
50
51 %package -n %{develname}
52 Summary: Files for developing programs that use the readline library
53 Group: Development/C
54 Requires: %{libname} = %{version}-%{release}
55 Obsoletes: %{name}-devel < 6.0-2
56 Provides: %{lib_name_orig}-devel = %{version}-%{release}
57 Provides: %{name}-devel = %{version}-%{release}
58 Requires: libncurses-devel
59 Obsoletes: %{mklibname readline 5 -d}
60
61 %description -n %{develname}
62 The "readline" library will read a line from the terminal and return it,
63 using prompt as a prompt. If prompt is null, no prompt is issued. The
64 line returned is allocated with malloc(3), so the caller must free it when
65 finished. The line returned has the final newline removed, so only the
66 text of the line remains.
67
68 %prep
69 %setup -q
70 %patch0 -p1 -b .no_rpath
71 %patch3 -p1 -b .outdated
72 %patch4 -p1 -b .header
73 %patch5 -p1 -b .attribute
74 %patch6 -p1 -b .fix-perms
75 %patch10 -p0 -b .001
76 %patch12 -p0 -b .002
77 libtoolize --copy --force
78
79 %build
80 export LDFLAGS="-I%{_includedir}/ncurses -lncurses"
81 export CFLAGS="%{optflags} -I%{_includedir}/ncurses -lncurses"
82 export CXXFLAGS="%{optflags} -I%{_includedir}/ncurses -lncurses"
83
84 %configure2_5x \
85 --with-curses \
86 --enable-multibyte
87
88 perl -p -i -e 's|-Wl,-rpath.*||' shlib/Makefile
89
90 %make
91
92 %install
93 rm -rf %{buildroot}
94 %makeinstall_std
95
96 # put all libs in /lib because some package needs it
97 # before /usr is mounted
98 install -d %{buildroot}/%{_lib}
99 mv %{buildroot}%{_libdir}/*.so* %{buildroot}/%{_lib}
100 ln -s ../../%{_lib}/lib{history,readline}.so %{buildroot}%{_libdir}
101
102 # The make install moves the existing libs with a suffix of old. Urgh.
103 rm -f %{buildroot}/%{_lib}/*.old
104
105 perl -p -i -e 's|/usr/local/bin/perl|/usr/bin/perl|' doc/texi2html
106
107 %clean
108 rm -rf %{buildroot}
109
110 %if %mdkversion < 200900
111 %post -n %{libname} -p /sbin/ldconfig
112 %endif
113 %if %mdkversion < 200900
114 %postun -n %{libname} -p /sbin/ldconfig
115 %endif
116
117 %post doc
118 %{_install_info history.info}
119 %{_install_info readline.info}
120
121 %preun doc
122 %{_remove_install_info history.info}
123 %{_remove_install_info readline.info}
124
125 %files -n %{libname}
126 %defattr(-,root,root)
127 /%{_lib}/lib*.so.%{major}*
128
129 %files doc
130 %{_infodir}/*info*
131
132 %files -n %{develname}
133 %defattr(-,root,root)
134 %doc CHANGELOG CHANGES MANIFEST README USAGE
135 %doc doc examples support
136 %{_mandir}/man3/*
137 %{_datadir}/readline
138 %{_includedir}/readline
139 %{_libdir}/lib*.a
140 %{_libdir}/lib*.so
141 /%{_lib}/*so
142
143

  ViewVC Help
Powered by ViewVC 1.1.30