1 |
%define rolluppatch 20100424 |
2 |
%define patchdate 20100925 |
3 |
%define version 5.7 |
4 |
%define release %mkrel 5.%{patchdate}.1 |
5 |
%define major 5 |
6 |
%define majorminor 5.7 |
7 |
%define utf8libname %mklibname %{name}w %{major} |
8 |
%define libname %mklibname %{name} %{major} |
9 |
%define develname %mklibname -d %{name} |
10 |
%define utf8develname %mklibname -d %{name}w |
11 |
|
12 |
Summary: A CRT screen handling and optimization package |
13 |
Name: ncurses |
14 |
Version: %{version} |
15 |
Release: %{release} |
16 |
License: MIT |
17 |
Group: System/Libraries |
18 |
Url: http://www.gnu.org/software/ncurses/ncurses.html |
19 |
Source0: ftp://ftp.gnu.org/gnu/ncurses/%{name}-%{version}.tar.gz |
20 |
Source4: ncurses-resetall.sh |
21 |
Source5: ncurses-usefull-terms |
22 |
# fwang: Source 100 is rollup patches from |
23 |
# ftp://invisible-island.net/ncurses/5.7/ |
24 |
Source100: ncurses-%{version}-%{rolluppatch}-patch.sh.bz2 |
25 |
Patch1: ncurses-5.6-xterm-debian.patch |
26 |
Patch4: ncurses-5.3-parallel.patch |
27 |
Patch5: ncurses-5.3-utf8.patch |
28 |
Patch6: ncurses-5.7-format_not_a_string_literal_and_no_format_arguments.diff |
29 |
Patch7: ncurses-5.7-urxvt.patch |
30 |
# Patch >100 from here: |
31 |
# ftp://invisible-island.net/ncurses/5.7/ |
32 |
Patch101: ncurses-5.7-20100501.patch.gz |
33 |
Patch102: ncurses-5.7-20100515.patch.gz |
34 |
Patch103: ncurses-5.7-20100522.patch.gz |
35 |
Patch104: ncurses-5.7-20100529.patch.gz |
36 |
Patch105: ncurses-5.7-20100605.patch.gz |
37 |
Patch106: ncurses-5.7-20100612.patch.gz |
38 |
Patch107: ncurses-5.7-20100619.patch.gz |
39 |
Patch108: ncurses-5.7-20100626.patch.gz |
40 |
Patch109: ncurses-5.7-20100703.patch.gz |
41 |
Patch110: ncurses-5.7-20100717.patch.gz |
42 |
Patch111: ncurses-5.7-20100724.patch.gz |
43 |
Patch112: ncurses-5.7-20100731.patch.gz |
44 |
Patch113: ncurses-5.7-20100807.patch.gz |
45 |
Patch114: ncurses-5.7-20100814.patch.gz |
46 |
Patch115: ncurses-5.7-20100828.patch.gz |
47 |
Patch116: ncurses-5.7-20100904.patch.gz |
48 |
Patch117: ncurses-5.7-20100911.patch.gz |
49 |
Patch118: ncurses-5.7-20100918.patch.gz |
50 |
Patch119: ncurses-5.7-20100925.patch.gz |
51 |
BuildRequires: gpm-devel |
52 |
BuildRequires: sharutils |
53 |
Conflicts: %{name}-extraterms < 5.6-1.20070721.1 |
54 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
55 |
|
56 |
%description |
57 |
The curses library routines are a terminal-independent method of updating |
58 |
character screens with reasonalble optimization. The ncurses (new curses) |
59 |
library is a freely distributable replacement for the discontinued 4.4BSD |
60 |
classic curses library. |
61 |
|
62 |
%package -n %{libname} |
63 |
Summary: The development files for applications which use ncurses |
64 |
Group: System/Libraries |
65 |
Requires: ncurses = %{version}-%{release} |
66 |
|
67 |
%description -n %{libname} |
68 |
The curses library routines are a terminal-independent method of updating |
69 |
character screens with reasonalble optimization. The ncurses (new curses) |
70 |
library is a freely distributable replacement for the discontinued 4.4BSD |
71 |
classic curses library. |
72 |
|
73 |
%package -n %{utf8libname} |
74 |
Summary: Ncurses libraries which support UTF8 |
75 |
Group: System/Libraries |
76 |
Requires: ncurses = %{version}-%{release} |
77 |
|
78 |
%description -n %{utf8libname} |
79 |
The curses library routines are a terminal-independent method of updating |
80 |
character screens with reasonalble optimization. The ncurses (new curses) |
81 |
library is a freely distributable replacement for the discontinued 4.4BSD |
82 |
classic curses library. |
83 |
|
84 |
This package contains ncurses libraries which support wide char (UTF8), |
85 |
and is not compatible with those without. |
86 |
|
87 |
%package extraterms |
88 |
Summary: Some exotic terminal descriptions |
89 |
Group: System/Libraries |
90 |
Requires: ncurses = %{version}-%{release} |
91 |
|
92 |
%description extraterms |
93 |
Install the ncurses-extraterms package if you use some exotic terminals. |
94 |
|
95 |
%package -n %{develname} |
96 |
Summary: The development files for applications which use ncurses |
97 |
Group: Development/C |
98 |
Provides: lib%{name}-devel = %{version}-%{release} |
99 |
Provides: %{name}-devel = %{version}-%{release} |
100 |
Requires: %{libname} = %{version}-%{release} |
101 |
Obsoletes: %mklibname -d %name 5 |
102 |
|
103 |
%description -n %{develname} |
104 |
The header files and libraries for developing applications that use |
105 |
the ncurses CRT screen handling and optimization package. |
106 |
|
107 |
Install the ncurses-devel package if you want to develop applications |
108 |
which will use ncurses. |
109 |
|
110 |
%package -n %{utf8develname} |
111 |
Summary: The development files for applications which use ncurses |
112 |
Group: Development/C |
113 |
Requires: %{utf8libname} = %{version}-%{release} |
114 |
Provides: lib%{name}w-devel = %{version}-%{release} |
115 |
Provides: ncursesw-devel = %{version}-%{release} |
116 |
Obsoletes: %mklibname -d %{name}w 5 |
117 |
Conflicts: %{_lib}ncurses-devel < 5.7-3.20091128.2 |
118 |
|
119 |
%description -n %{utf8develname} |
120 |
The libraries for developing applications that use ncurses CRT screen |
121 |
handling and optimization package. Install it if you want to develop |
122 |
applications which will use ncurses. |
123 |
|
124 |
Note that the libraries included here supports wide char (UTF-8), |
125 |
and is not compatible with those without. When linking programs with |
126 |
these libraries, you will have to append a "w" to the library names, |
127 |
i.e. -lformw, -lmenuw, -lncursesw, -lpanelw. |
128 |
|
129 |
%prep |
130 |
%setup -q |
131 |
|
132 |
# Let's apply rollup patches at first |
133 |
bunzip2 -kc %SOURCE100 >./ncurses-%{version}-%{rolluppatch}-patch.sh |
134 |
/bin/sh ncurses-%{version}-%{rolluppatch}-patch.sh |
135 |
# Then the official patch |
136 |
%patch101 -p1 |
137 |
%patch102 -p1 |
138 |
%patch103 -p1 |
139 |
%patch104 -p1 |
140 |
%patch105 -p1 |
141 |
%patch106 -p1 |
142 |
%patch107 -p1 |
143 |
%patch108 -p1 |
144 |
%patch109 -p1 |
145 |
%patch110 -p1 |
146 |
%patch111 -p1 |
147 |
%patch112 -p1 |
148 |
%patch113 -p1 |
149 |
%patch114 -p1 |
150 |
%patch115 -p1 |
151 |
%patch116 -p1 |
152 |
%patch117 -p1 |
153 |
%patch118 -p1 |
154 |
%patch119 -p1 |
155 |
#patch4 -p1 -b .parallel |
156 |
|
157 |
%patch5 -p1 -b .utf8 |
158 |
#%patch6 -p0 -b .format_not_a_string_literal_and_no_format_arguments |
159 |
%patch7 -p0 -b .urxvt |
160 |
|
161 |
# regenerating configure needs patched autoconf, so modify configure |
162 |
# directly |
163 |
%patch1 -p1 -b .deb |
164 |
|
165 |
find . -name "*.orig" | xargs rm -f |
166 |
# fix some permissions |
167 |
chmod 755 c++/edit_cfg.sh test/listused.sh test/configure test/tracemunch |
168 |
|
169 |
%build |
170 |
export PKG_CONFIG_LIBDIR=%{_libdir}/pkgconfig |
171 |
|
172 |
mkdir -p ncurses-normal |
173 |
pushd ncurses-normal |
174 |
CONFIGURE_TOP=.. |
175 |
%configure2_5x \ |
176 |
--includedir=%{_includedir}/ncurses \ |
177 |
--without-libtool \ |
178 |
--with-shared \ |
179 |
--with-normal \ |
180 |
--without-debug \ |
181 |
--enable-overwrite \ |
182 |
--without-profile \ |
183 |
--with-gpm \ |
184 |
--enable-termcap \ |
185 |
--enable-getcap \ |
186 |
--enable-const \ |
187 |
--enable-hard-tabs \ |
188 |
--enable-hash-map \ |
189 |
--enable-no-padding \ |
190 |
--enable-sigwinch \ |
191 |
--without-ada \ |
192 |
--disable-widec \ |
193 |
--enable-xmc-glitch \ |
194 |
--enable-colorfgbg \ |
195 |
--enable-pc-files \ |
196 |
--with-ospeed=unsigned |
197 |
|
198 |
%make -j1 |
199 |
popd |
200 |
|
201 |
mkdir -p ncurses-utf8 |
202 |
pushd ncurses-utf8 |
203 |
CONFIGURE_TOP=.. |
204 |
%configure2_5x \ |
205 |
--includedir=%{_includedir}/ncursesw \ |
206 |
--without-libtool \ |
207 |
--with-shared \ |
208 |
--with-normal \ |
209 |
--without-debug \ |
210 |
--enable-overwrite \ |
211 |
--without-profile \ |
212 |
--with-gpm \ |
213 |
--enable-termcap \ |
214 |
--enable-getcap \ |
215 |
--enable-const \ |
216 |
--enable-hard-tabs \ |
217 |
--enable-hash-map \ |
218 |
--enable-no-padding \ |
219 |
--enable-sigwinch \ |
220 |
--without-ada \ |
221 |
--enable-widec \ |
222 |
--enable-xmc-glitch \ |
223 |
--enable-colorfgbg \ |
224 |
--enable-pc-files \ |
225 |
--with-ospeed=unsigned |
226 |
|
227 |
%make -j1 |
228 |
popd |
229 |
|
230 |
%install |
231 |
rm -rf %{buildroot} |
232 |
|
233 |
pushd ncurses-utf8 |
234 |
%{makeinstall_std} |
235 |
popd |
236 |
|
237 |
pushd ncurses-normal |
238 |
%{makeinstall_std} |
239 |
popd |
240 |
|
241 |
ln -sf ../l/linux %{buildroot}%{_datadir}/terminfo/c/console |
242 |
ln -sf ncurses/curses.h %{buildroot}/usr/include/ncurses.h |
243 |
for I in curses unctrl eti form menu panel term; do |
244 |
ln -sf ncurses/$I.h %{buildroot}/usr/include/$I.h |
245 |
done |
246 |
|
247 |
# the resetall script |
248 |
install -m 755 %{SOURCE4} %{buildroot}%{_bindir}/resetall |
249 |
# we don't want this in doc |
250 |
rm -f c++/demo |
251 |
|
252 |
mkdir -p %{buildroot}/%{_lib} |
253 |
mv %{buildroot}%{_libdir}/libncurses.so* %{buildroot}/%{_lib} |
254 |
ln -s /%{_lib}/libncurses.so.%{majorminor} %{buildroot}%{_libdir}/libncurses.so.%{majorminor} |
255 |
ln -s /%{_lib}/libncurses.so.%{majorminor} %{buildroot}%{_libdir}/libncurses.so.%{major} |
256 |
ln -s /%{_lib}/libncurses.so.%{majorminor} %{buildroot}%{_libdir}/libncurses.so |
257 |
|
258 |
# |
259 |
# FIXME |
260 |
# OK do not time to debbug it now |
261 |
# |
262 |
cp %{buildroot}%{_datadir}/terminfo/x/xterm %{buildroot}%{_datadir}/terminfo/x/xterm2 |
263 |
cp %{buildroot}%{_datadir}/terminfo/x/xterm-new %{buildroot}%{_datadir}/terminfo/x/xterm |
264 |
|
265 |
# |
266 |
# remove unneeded/unwanted files |
267 |
# have to be done before find commands below |
268 |
# |
269 |
rm -f %{buildroot}%{_libdir}/terminfo |
270 |
|
271 |
# fwang: avoid conflict with kon package |
272 |
rm -f %{buildroot}%{_datadir}/terminfo/k/kon |
273 |
|
274 |
# |
275 |
# FIXME |
276 |
# |
277 |
(cd %{buildroot} ; find usr/share/terminfo -type d | perl -pe 's||%%dir /|') > %{name}.list |
278 |
(cd %{buildroot} ; find usr/share/terminfo -not -type d | perl -pe 's||/|') > %{name}-extraterms.list |
279 |
perl -pe 's||%{_datadir}/terminfo/|' %{SOURCE5} >> %{name}.list |
280 |
|
281 |
perl -ni -e 'BEGIN { open F, "%{name}.list"; /^%/ or $s{$_} = 1 foreach <F>; } print unless $s{$_}' %{name}-extraterms.list |
282 |
|
283 |
find %{buildroot}/%{_libdir} -name 'lib*.a' -not -type d -not -name "*_g.a" -not -name "*_p.a" -not -name "*w.a" | sed -e "s#^%{buildroot}##" > %{libname}-devel.list |
284 |
|
285 |
%multiarch_includes %{buildroot}%{_includedir}/ncurses*/curses.h |
286 |
|
287 |
%if %mdkversion < 200900 |
288 |
%post -n %{libname} -p /sbin/ldconfig |
289 |
%endif |
290 |
|
291 |
%if %mdkversion < 200900 |
292 |
%postun -n %{libname} -p /sbin/ldconfig |
293 |
%endif |
294 |
|
295 |
%if %mdkversion < 200900 |
296 |
%post -n %{utf8libname} -p /sbin/ldconfig |
297 |
%endif |
298 |
|
299 |
%if %mdkversion < 200900 |
300 |
%postun -n %{utf8libname} -p /sbin/ldconfig |
301 |
%endif |
302 |
|
303 |
%clean |
304 |
rm -rf %{buildroot} |
305 |
|
306 |
%files -f %{name}.list |
307 |
%defattr(-,root,root) |
308 |
%doc README ANNOUNCE |
309 |
%{_datadir}/tabset |
310 |
%{_bindir}/* |
311 |
%{_mandir}/man1/* |
312 |
%{_mandir}/man5/* |
313 |
%{_mandir}/man7/* |
314 |
|
315 |
%files -n %{libname} |
316 |
%defattr(-,root,root) |
317 |
%attr(755,root,root) /%{_lib}/libncurses.so.* |
318 |
%attr(755,root,root) %{_libdir}/libform.so.* |
319 |
%attr(755,root,root) %{_libdir}/libmenu.so.* |
320 |
%attr(755,root,root) %{_libdir}/libncurses.so.* |
321 |
%attr(755,root,root) %{_libdir}/libpanel.so.* |
322 |
|
323 |
%files -n %{utf8libname} |
324 |
%defattr(-,root,root) |
325 |
%attr(755,root,root) %{_libdir}/lib*w.so.* |
326 |
|
327 |
%files extraterms -f %{name}-extraterms.list |
328 |
%defattr(-,root,root) |
329 |
%doc README |
330 |
|
331 |
%files -n %{develname} |
332 |
%defattr(-,root,root) |
333 |
%doc doc c++ test |
334 |
/%{_lib}/libncurses.so |
335 |
%{_libdir}/libcurses.a |
336 |
%{_libdir}/libcurses.so |
337 |
%{_libdir}/libform.a |
338 |
%{_libdir}/libform.so |
339 |
%{_libdir}/libmenu.a |
340 |
%{_libdir}/libmenu.so |
341 |
%{_libdir}/libncurses++.a |
342 |
%{_libdir}/libncurses.a |
343 |
%{_libdir}/libncurses.so |
344 |
%{_libdir}/libpanel.a |
345 |
%{_libdir}/libpanel.so |
346 |
%{_libdir}/pkgconfig/form.pc |
347 |
%{_libdir}/pkgconfig/menu.pc |
348 |
%{_libdir}/pkgconfig/ncurses++.pc |
349 |
%{_libdir}/pkgconfig/ncurses.pc |
350 |
%{_libdir}/pkgconfig/panel.pc |
351 |
%{_includedir}/ncurses |
352 |
%multiarch %_includedir/multiarch*/ncurses |
353 |
%{_includedir}/*.h |
354 |
%{_mandir}/man3/* |
355 |
|
356 |
%files -n %{utf8develname} |
357 |
%defattr(-,root,root) |
358 |
%{_includedir}/ncursesw |
359 |
%{_libdir}/pkgconfig/*w.pc |
360 |
%multiarch %_includedir/multiarch*/ncursesw |
361 |
%{_libdir}/lib*w.so |
362 |
%{_libdir}/lib*w.a |
363 |
|
364 |
|