1 | %bcond_without python2 |
---|
2 | %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} |
---|
3 | |
---|
4 | Summary: A development library for text mode user interfaces. |
---|
5 | Summary(ja): テキストモードインターフェースのための開発ライブラリ |
---|
6 | Name: newt |
---|
7 | Version: 0.52.21 |
---|
8 | Release: 2%{?_dist_release} |
---|
9 | Group: system |
---|
10 | Vendor: Project Vine |
---|
11 | Distribution: Vine Linux |
---|
12 | Packager: daisuke |
---|
13 | |
---|
14 | License: LGPLv2 |
---|
15 | URL: https://pagure.io/newt |
---|
16 | Source: https://pagure.io/releases/newt/newt-%{version}.tar.gz |
---|
17 | |
---|
18 | # patches from mdv |
---|
19 | Patch1: newt-0.51.4-fix-wstrlen-for-non-utf8-strings.patch |
---|
20 | |
---|
21 | # patches from ubuntu |
---|
22 | Patch10: newt-python_memory_allocation.patch |
---|
23 | |
---|
24 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
25 | BuildRequires: popt-devel, slang-devel |
---|
26 | BuildRequires: python-rpm-macros |
---|
27 | BuildRequires: python3-devel |
---|
28 | BuildRequires: python3-rpm-macros |
---|
29 | %if %{with python2} |
---|
30 | BuildRequires: python-devel |
---|
31 | BuildRequires: python2-rpm-macros |
---|
32 | %endif |
---|
33 | Provides: snack = %{version}-%{release} |
---|
34 | |
---|
35 | %description |
---|
36 | Newt is a programming library for color text mode, widget based user |
---|
37 | interfaces. Newt can be used to add stacked windows, entry widgets, |
---|
38 | checkboxes, radio buttons, labels, plain text fields, scrollbars, |
---|
39 | etc., to text mode user interfaces. This package also contains the |
---|
40 | shared library needed by programs built with newt, as well as a |
---|
41 | /usr/bin/dialog replacement called whiptail. Newt is based on the |
---|
42 | slang library. |
---|
43 | |
---|
44 | |
---|
45 | %package devel |
---|
46 | Summary: Newt windowing toolkit development files. |
---|
47 | Summary(ja): Newt ウィンドウツールキット開発ファイル集 |
---|
48 | Group: programming |
---|
49 | Requires: slang-devel %{name} = %{version} |
---|
50 | |
---|
51 | |
---|
52 | %description devel |
---|
53 | The newt-devel package contains the header files and libraries |
---|
54 | necessary for developing applications which use newt. Newt is a |
---|
55 | development library for text mode user interfaces. Newt is based on |
---|
56 | the slang library. |
---|
57 | |
---|
58 | Install newt-devel if you want to develop applications which will use |
---|
59 | newt. |
---|
60 | |
---|
61 | |
---|
62 | %if %{with python2} |
---|
63 | %package -n python-newt |
---|
64 | Summary: Python 2 bindings for newt |
---|
65 | Group: programming |
---|
66 | %{?python_provide:%python_provide python-newt} |
---|
67 | # Remove before F30 |
---|
68 | Provides: %{name}-python = %{version}-%{release} |
---|
69 | Provides: %{name}-python%{?_isa} = %{version}-%{release} |
---|
70 | Provides: snack = %{version}-%{release} |
---|
71 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
72 | |
---|
73 | %description -n python-newt |
---|
74 | The python-newt package contains the Python 2 bindings for the newt library |
---|
75 | providing a python API for creating text mode interfaces. |
---|
76 | %endif |
---|
77 | |
---|
78 | |
---|
79 | %package -n python3-newt |
---|
80 | Summary: Python 3 bindings for newt |
---|
81 | Group: programming |
---|
82 | %{?python_provide:%python_provide python3-newt} |
---|
83 | # Remove before F30 |
---|
84 | Provides: %{name}-python3 = %{version}-%{release} |
---|
85 | Provides: %{name}-python3%{?_isa} = %{version}-%{release} |
---|
86 | Provides: snack = %{version}-%{release} |
---|
87 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
88 | |
---|
89 | %description -n python3-newt |
---|
90 | The python3-newt package contains the Python 3 bindings for the newt library |
---|
91 | providing a python API for creating text mode interfaces. |
---|
92 | |
---|
93 | |
---|
94 | ## to build compat32 for x86_64 architecture support |
---|
95 | %package -n compat32-%{name} |
---|
96 | Summary: A development library for text mode user interfaces. |
---|
97 | Group: system |
---|
98 | %description -n compat32-%{name} |
---|
99 | Newt is a programming library for color text mode, widget based user |
---|
100 | interfaces. Newt can be used to add stacked windows, entry widgets, |
---|
101 | checkboxes, radio buttons, labels, plain text fields, scrollbars, |
---|
102 | etc., to text mode user interfaces. This package also contains the |
---|
103 | shared library needed by programs built with newt, as well as a |
---|
104 | /usr/bin/dialog replacement called whiptail. Newt is based on the |
---|
105 | slang library. |
---|
106 | |
---|
107 | |
---|
108 | %package -n compat32-%{name}-devel |
---|
109 | Summary: Newt windowing toolkit development files. |
---|
110 | Group: programming |
---|
111 | Requires: compat32-%{name} = %{version} |
---|
112 | %description -n compat32-%{name}-devel |
---|
113 | The newt-devel package contains the header files and libraries |
---|
114 | necessary for developing applications which use newt. Newt is a |
---|
115 | development library for text mode user interfaces. Newt is based on |
---|
116 | the slang library. |
---|
117 | |
---|
118 | Install newt-devel if you want to develop applications which will use |
---|
119 | newt. |
---|
120 | |
---|
121 | |
---|
122 | %prep |
---|
123 | %setup -q -n %{name}-%{version} |
---|
124 | %patch1 -p1 -b .fix-wstrlen-for-non-utf8-strings |
---|
125 | %patch10 -p1 -b .python_memory_allocation |
---|
126 | |
---|
127 | |
---|
128 | %build |
---|
129 | SLANG_CFLAGS=$(pkg-config --cflags slang) |
---|
130 | export CFLAGS="%{optflags} $SLANG_CFLAGS" |
---|
131 | |
---|
132 | %if %{build_compat32} |
---|
133 | export CC='gcc -m32' |
---|
134 | %configure --without-tcl |
---|
135 | make %{?_smp_mflags} CC='gcc -m32' |
---|
136 | #make CC='gcc -m32' shared |
---|
137 | %else |
---|
138 | %configure --without-tcl |
---|
139 | make %{?_smp_mflags} all |
---|
140 | #make shared |
---|
141 | %endif |
---|
142 | chmod 0644 peanuts.py popcorn.py |
---|
143 | |
---|
144 | %install |
---|
145 | rm -rf $RPM_BUILD_ROOT |
---|
146 | make DESTDIR=$RPM_BUILD_ROOT install |
---|
147 | |
---|
148 | %find_lang %{name} |
---|
149 | |
---|
150 | |
---|
151 | %post -p /sbin/ldconfig |
---|
152 | %postun -p /sbin/ldconfig |
---|
153 | |
---|
154 | %if %{build_compat32} |
---|
155 | %post -n compat32-%{name} -p /sbin/ldconfig |
---|
156 | %postun -n compat32-%{name} -p /sbin/ldconfig |
---|
157 | %endif |
---|
158 | |
---|
159 | |
---|
160 | %clean |
---|
161 | rm -rf $RPM_BUILD_ROOT |
---|
162 | |
---|
163 | |
---|
164 | %files -f %{name}.lang |
---|
165 | %defattr (-,root,root) |
---|
166 | %license COPYING |
---|
167 | %doc AUTHORS CHANGES README |
---|
168 | %{_libdir}/libnewt.so.* |
---|
169 | %{_bindir}/whiptail |
---|
170 | %{_mandir}/man1/whiptail.1* |
---|
171 | |
---|
172 | %files devel |
---|
173 | %defattr (-,root,root) |
---|
174 | %doc tutorial.sgml peanuts.py popcorn.py |
---|
175 | %{_includedir}/newt.h |
---|
176 | %{_libdir}/libnewt.a |
---|
177 | %{_libdir}/libnewt.so |
---|
178 | %{_libdir}/pkgconfig/libnewt.pc |
---|
179 | |
---|
180 | %if %{with python2} |
---|
181 | %files -n python-newt |
---|
182 | %{python2_sitearch}/*.py* |
---|
183 | %{python2_sitearch}/*.so |
---|
184 | %endif |
---|
185 | |
---|
186 | %files -n python3-newt |
---|
187 | %doc peanuts.py popcorn.py |
---|
188 | %{python3_sitearch}/*.so |
---|
189 | %{python3_sitearch}/*.py* |
---|
190 | |
---|
191 | %if %{build_compat32} |
---|
192 | %files -n compat32-%{name} |
---|
193 | %defattr (-,root,root) |
---|
194 | %{_libdir}/libnewt.so.* |
---|
195 | |
---|
196 | %files -n compat32-%{name}-devel |
---|
197 | %defattr (-,root,root) |
---|
198 | %{_libdir}/libnewt.a |
---|
199 | %{_libdir}/libnewt.so |
---|
200 | %endif |
---|
201 | |
---|
202 | |
---|
203 | %changelog |
---|
204 | * Wed Aug 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.52.21-2 |
---|
205 | - rebuilt with python-3.8. |
---|
206 | - moved python2 bindings to "python-newt". |
---|
207 | |
---|
208 | * Sun Sep 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.52.21-1 |
---|
209 | - updated to 0.52.21. |
---|
210 | - added python3 support. |
---|
211 | |
---|
212 | * Tue Jul 15 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 0.52.17-1 |
---|
213 | - update to 0.52.17 |
---|
214 | |
---|
215 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.52.14-1 |
---|
216 | - new upstram release |
---|
217 | |
---|
218 | * Thu Oct 06 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.52.13-1 |
---|
219 | - new upstram release |
---|
220 | |
---|
221 | * Sat Jun 04 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.52.12-2 |
---|
222 | - add patch2,3 from mdv |
---|
223 | - add patch10 from ubuntu |
---|
224 | |
---|
225 | * Tue May 31 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.52.12-1 |
---|
226 | - update to 0.52.12 |
---|
227 | - add patch0: don't hang in form when stdin disappears |
---|
228 | - remove patch100, fixed in upstream |
---|
229 | |
---|
230 | * Mon Apr 18 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.52.10-7 |
---|
231 | - rebuilt with recent environment. |
---|
232 | |
---|
233 | * Fri Feb 12 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.52.10-6 |
---|
234 | - rebuilt with gcc-4.4.3-3 on ppc |
---|
235 | |
---|
236 | * Fri Feb 5 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.52.10-5 |
---|
237 | - rebuilt with rpm-4.8.0-3 (on ppc) |
---|
238 | |
---|
239 | * Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.52.10-4 |
---|
240 | - rebuilt with python-2.6.4 |
---|
241 | |
---|
242 | * Thu Oct 8 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 0.52.10-3 |
---|
243 | - fix build_compat32 if-endif |
---|
244 | |
---|
245 | * Sat Sep 26 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 0.52.10-2 |
---|
246 | - add patch100 for fix CVE-2009-2905 (textbox BoF) from fc10 |
---|
247 | |
---|
248 | * Sun Aug 24 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.52.10-1 |
---|
249 | - new upstream release |
---|
250 | - use %%python_sitearch macro |
---|
251 | - remove --with-gpm-support |
---|
252 | - drop obsolete patches |
---|
253 | |
---|
254 | * Sun Aug 20 2006 NAKAMURA Kenta <kenta@vinelinux.org> 0.50.35-0vl6 |
---|
255 | - rebuild to fix dependency problem on x86_64 architecture |
---|
256 | |
---|
257 | * Thu Feb 16 2006 Shu KONNO <owa@bg.wakwak.com> 0.50.35-0vl5 |
---|
258 | - added BuildRequires: slang-devel |
---|
259 | - added newt-0.50.35-Makefile.in.patch |
---|
260 | - updated newt-0.50.35-make.patch |
---|
261 | - changed /usr/lib to %%{_libdir} |
---|
262 | - added compat32-* packages for x86_64 architecture support |
---|
263 | |
---|
264 | * Sun Apr 03 2005 Shu KONNO <owa@bg.wakwak.com> 0.50.35-0vl4 |
---|
265 | - rebuild with python-2.4.1-0vl1 |
---|
266 | |
---|
267 | * Sat Apr 17 2004 Shu KONNO <owa@bg.wakwak.com> 0.50.35-0vl3 |
---|
268 | - rebuild with python-2.3.3-0vl1 |
---|
269 | |
---|
270 | * Sat Apr 10 2004 Shu KONNO <owa@bg.wakwak.com> 0.50.35-0vl2.1 |
---|
271 | - rebuild with python-2.3.3-0vl0.3 (for TestPkg) |
---|
272 | |
---|
273 | * Wed Jan 29 2003 Tomoya TAKA <taka@vinelinux.org> 0.50.35-0vl2 |
---|
274 | - build against python-2.2 |
---|
275 | - drop Patch20 |
---|
276 | |
---|
277 | * Thu Oct 10 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.50.35-0vl1 |
---|
278 | - updated to new upstream release 0.50.35 |
---|
279 | - updated Patch11 and added Patch20 |
---|
280 | (Patch20 is for python 1.5: REMOVE IT WHEN WE DECIDED TO GO WITH PYTHON2) |
---|
281 | |
---|
282 | * Sat Mar 09 2002 Tomoya TAKA <taka@vinelinux.org> 0.50.33-0vl1 |
---|
283 | - update to new upstream release |
---|
284 | |
---|
285 | * Mon Jul 2 2001 MATUBARA Kazuyuki <matubara@mb.asmnet.ne.jp> |
---|
286 | - 0.50.22-0vl1 |
---|
287 | - updated to 0.50.22 |
---|
288 | - use Release No for Vine Linux |
---|
289 | - use better macros |
---|
290 | - bytecompile the snack python module |
---|
291 | |
---|
292 | * Wed Sep 29 1999 Norihito Ohmori <ohmori@flatout.rog> |
---|
293 | - fix spec file |
---|
294 | |
---|
295 | * Sat Sep 11 1999 Norihito Ohmori <ohmori@flatout.org> |
---|
296 | - added Japanese support patch |
---|
297 | |
---|
298 | * Wed Sep 01 1999 Erik Troan <ewt@redhat.com> |
---|
299 | - added suspend/resume to snack |
---|
300 | |
---|
301 | * Tue Aug 31 1999 Matt Wilson <msw@redhat.com> |
---|
302 | - enable gpm support |
---|
303 | |
---|
304 | * Fri Aug 27 1999 Matt Wilson <msw@redhat.com> |
---|
305 | - added hotkey assignment for gridforms, changed listbox.setcurrent to |
---|
306 | take the item key |
---|
307 | |
---|
308 | * Wed Aug 25 1999 Matt Wilson <msw@redhat.com> |
---|
309 | - fixed snack callback function refcounts, as well as optional data args |
---|
310 | - fixed suspend callback ref counts |
---|
311 | |
---|
312 | * Mon Aug 23 1999 Matt Wilson <msw@redhat.com> |
---|
313 | - added buttons argument to entrywindow |
---|
314 | |
---|
315 | * Thu Aug 12 1999 Bill Nottingham <notting@redhat.com> |
---|
316 | - multi-state checkboxtrees. Woohoo. |
---|
317 | |
---|
318 | * Mon Aug 9 1999 Matt Wilson <msw@redhat.com> |
---|
319 | - added snack wrappings for checkbox flag setting |
---|
320 | |
---|
321 | * Thu Aug 5 1999 Matt Wilson <msw@redhat.com> |
---|
322 | - added snack bindings for setting current listbox selection |
---|
323 | - added argument to set default selection in snack ListboxChoiceWindow |
---|
324 | |
---|
325 | * Mon Aug 2 1999 Matt Wilson <msw@redhat.com> |
---|
326 | - added checkboxtree |
---|
327 | - improved snack binding |
---|
328 | |
---|
329 | * Fri Apr 9 1999 Matt Wilson <msw@redhat.com> |
---|
330 | - fixed a glibc related bug in reflow that was truncating all text to 1000 |
---|
331 | chars |
---|
332 | |
---|
333 | * Fri Apr 09 1999 Matt Wilson <msw@redhat.com> |
---|
334 | - fixed bug that made newt apps crash when you hit <insert> followed by lots |
---|
335 | of keys |
---|
336 | |
---|
337 | * Mon Mar 15 1999 Matt Wilson <msw@redhat.com> |
---|
338 | - fix from Jakub Jelinek for listbox keypresses |
---|
339 | |
---|
340 | * Sat Feb 27 1999 Matt Wilson <msw@redhat.com> |
---|
341 | - fixed support for navigating listboxes with alphabetical keypresses |
---|
342 | |
---|
343 | * Thu Feb 25 1999 Matt Wilson <msw@redhat.com> |
---|
344 | - updated descriptions |
---|
345 | - added support for navigating listboxes with alphabetical keypresses |
---|
346 | |
---|
347 | * Mon Feb 8 1999 Matt Wilson <msw@redhat.com> |
---|
348 | - made grid wrapped windows at least the size of their title bars |
---|
349 | |
---|
350 | * Fri Feb 5 1999 Matt Wilson <msw@redhat.com> |
---|
351 | - Function to set checkbox flags. This will go away later when I have |
---|
352 | a generic flag setting function and signals to comps to go insensitive. |
---|
353 | |
---|
354 | * Tue Jan 19 1999 Matt Wilson <msw@redhat.com> |
---|
355 | - Stopped using libgpm, internalized all gpm calls. Still need some cleanups. |
---|
356 | |
---|
357 | * Thu Jan 7 1999 Matt Wilson <msw@redhat.com> |
---|
358 | - Added GPM mouse support |
---|
359 | - Moved to autoconf to allow compiling without GPM support |
---|
360 | - Changed revision to 0.40 |
---|
361 | |
---|
362 | * Wed Oct 21 1998 Bill Nottingham <notting@redhat.com> |
---|
363 | - built against slang-1.2.2 |
---|
364 | |
---|
365 | * Wed Aug 19 1998 Bill Nottingham <notting@redhat.com> |
---|
366 | - bugfixes for text reflow |
---|
367 | - added docs |
---|
368 | |
---|
369 | * Fri May 01 1998 Cristian Gafton <gafton@redhat.com> |
---|
370 | - devel package moved to Development/Libraries |
---|
371 | |
---|
372 | * Thu Apr 30 1998 Erik Troan <ewt@redhat.com> |
---|
373 | - removed whiptcl.so -- it should be in a separate package |
---|
374 | |
---|
375 | * Mon Feb 16 1998 Erik Troan <ewt@redhat.com> |
---|
376 | - added newtWinMenu() |
---|
377 | - many bug fixes in grid code |
---|
378 | |
---|
379 | * Wed Jan 21 1998 Erik Troan <ewt@redhat.com> |
---|
380 | - removed newtWinTernary() |
---|
381 | - made newtWinChoice() return codes consistent with newtWinTernary() |
---|
382 | |
---|
383 | * Fri Jan 16 1998 Erik Troan <ewt@redhat.com> |
---|
384 | - added changes from Bruce Perens |
---|
385 | - small cleanups |
---|
386 | - lets whiptail automatically resize windows |
---|
387 | - the order of placing a grid and adding components to a form no longer |
---|
388 | matters |
---|
389 | - added newtGridAddComponentsToForm() |
---|
390 | |
---|
391 | * Wed Oct 08 1997 Erik Troan <ewt@redhat.com> |
---|
392 | - added newtWinTernary() |
---|
393 | |
---|
394 | * Tue Oct 07 1997 Erik Troan <ewt@redhat.com> |
---|
395 | - made Make/spec files use a buildroot |
---|
396 | - added grid support (for newt 0.11 actually) |
---|
397 | |
---|
398 | * Mon Jun 02 1997 Erik Troan <ewt@redhat.com> |
---|
399 | - Added patched from Clarence Smith for setting the size of a listbox |
---|
400 | - Version 0.9 |
---|
401 | |
---|
402 | * Wed May 28 1997 Elliot Lee <sopwith@redhat.com> 0.8-2 |
---|
403 | - Touchups on Makefile |
---|
404 | - Cleaned up NEWT_FLAGS_* |
---|
405 | |
---|
406 | * Tue Mar 18 1997 Erik Troan <ewt@redhat.com> |
---|
407 | - Cleaned up listbox |
---|
408 | - Added whiptail |
---|
409 | - Added newtButtonCompact button type and associated colors |
---|
410 | - Added newtTextboxGetNumLines() and newtTextboxSetHeight() |
---|
411 | |
---|
412 | * Tue Feb 25 1997 Erik Troan <ewt@redhat.com> |
---|
413 | - Added changes from sopwith for C++ cleanliness and some listbox fixes. |
---|
414 | |
---|