newt-vl.spec 12 KB

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