newt-vl.spec 11 KB

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