newt-vl.spec 12 KB

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