%bcond_without python2 %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} Summary: A development library for text mode user interfaces. Summary(ja): テキストモードインターフェースのための開発ライブラリ Name: newt Version: 0.52.21 Release: 2%{?_dist_release} Group: system Vendor: Project Vine Distribution: Vine Linux Packager: daisuke License: LGPLv2 URL: https://pagure.io/newt Source: https://pagure.io/releases/newt/newt-%{version}.tar.gz # patches from mdv Patch1: newt-0.51.4-fix-wstrlen-for-non-utf8-strings.patch # patches from ubuntu Patch10: newt-python_memory_allocation.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: popt-devel, slang-devel BuildRequires: python-rpm-macros BuildRequires: python3-devel BuildRequires: python3-rpm-macros %if %{with python2} BuildRequires: python-devel BuildRequires: python2-rpm-macros %endif Provides: snack = %{version}-%{release} %description Newt is a programming library for color text mode, widget based user interfaces. Newt can be used to add stacked windows, entry widgets, checkboxes, radio buttons, labels, plain text fields, scrollbars, etc., to text mode user interfaces. This package also contains the shared library needed by programs built with newt, as well as a /usr/bin/dialog replacement called whiptail. Newt is based on the slang library. %package devel Summary: Newt windowing toolkit development files. Summary(ja): Newt ウィンドウツールキット開発ファイル集 Group: programming Requires: slang-devel %{name} = %{version} %description devel The newt-devel package contains the header files and libraries necessary for developing applications which use newt. Newt is a development library for text mode user interfaces. Newt is based on the slang library. Install newt-devel if you want to develop applications which will use newt. %if %{with python2} %package -n python-newt Summary: Python 2 bindings for newt Group: programming %{?python_provide:%python_provide python-newt} # Remove before F30 Provides: %{name}-python = %{version}-%{release} Provides: %{name}-python%{?_isa} = %{version}-%{release} Provides: snack = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python-newt The python-newt package contains the Python 2 bindings for the newt library providing a python API for creating text mode interfaces. %endif %package -n python3-newt Summary: Python 3 bindings for newt Group: programming %{?python_provide:%python_provide python3-newt} # Remove before F30 Provides: %{name}-python3 = %{version}-%{release} Provides: %{name}-python3%{?_isa} = %{version}-%{release} Provides: snack = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python3-newt The python3-newt package contains the Python 3 bindings for the newt library providing a python API for creating text mode interfaces. ## to build compat32 for x86_64 architecture support %package -n compat32-%{name} Summary: A development library for text mode user interfaces. Group: system %description -n compat32-%{name} Newt is a programming library for color text mode, widget based user interfaces. Newt can be used to add stacked windows, entry widgets, checkboxes, radio buttons, labels, plain text fields, scrollbars, etc., to text mode user interfaces. This package also contains the shared library needed by programs built with newt, as well as a /usr/bin/dialog replacement called whiptail. Newt is based on the slang library. %package -n compat32-%{name}-devel Summary: Newt windowing toolkit development files. Group: programming Requires: compat32-%{name} = %{version} %description -n compat32-%{name}-devel The newt-devel package contains the header files and libraries necessary for developing applications which use newt. Newt is a development library for text mode user interfaces. Newt is based on the slang library. Install newt-devel if you want to develop applications which will use newt. %prep %setup -q -n %{name}-%{version} %patch1 -p1 -b .fix-wstrlen-for-non-utf8-strings %patch10 -p1 -b .python_memory_allocation %build SLANG_CFLAGS=$(pkg-config --cflags slang) export CFLAGS="%{optflags} $SLANG_CFLAGS" %if %{build_compat32} export CC='gcc -m32' %configure --without-tcl make %{?_smp_mflags} CC='gcc -m32' #make CC='gcc -m32' shared %else %configure --without-tcl make %{?_smp_mflags} all #make shared %endif chmod 0644 peanuts.py popcorn.py %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %find_lang %{name} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %if %{build_compat32} %post -n compat32-%{name} -p /sbin/ldconfig %postun -n compat32-%{name} -p /sbin/ldconfig %endif %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr (-,root,root) %license COPYING %doc AUTHORS CHANGES README %{_libdir}/libnewt.so.* %{_bindir}/whiptail %{_mandir}/man1/whiptail.1* %files devel %defattr (-,root,root) %doc tutorial.sgml peanuts.py popcorn.py %{_includedir}/newt.h %{_libdir}/libnewt.a %{_libdir}/libnewt.so %{_libdir}/pkgconfig/libnewt.pc %if %{with python2} %files -n python-newt %{python2_sitearch}/*.py* %{python2_sitearch}/*.so %endif %files -n python3-newt %doc peanuts.py popcorn.py %{python3_sitearch}/*.so %{python3_sitearch}/*.py* %if %{build_compat32} %files -n compat32-%{name} %defattr (-,root,root) %{_libdir}/libnewt.so.* %files -n compat32-%{name}-devel %defattr (-,root,root) %{_libdir}/libnewt.a %{_libdir}/libnewt.so %endif %changelog * Wed Aug 19 2020 Tomohiro "Tomo-p" KATO 0.52.21-2 - rebuilt with python-3.8. - moved python2 bindings to "python-newt". * Sun Sep 15 2019 Tomohiro "Tomo-p" KATO 0.52.21-1 - updated to 0.52.21. - added python3 support. * Tue Jul 15 2014 Daisuke SUZUKI 0.52.17-1 - update to 0.52.17 * Sun Feb 19 2012 Yoji TOYODA 0.52.14-1 - new upstram release * Thu Oct 06 2011 Daisuke SUZUKI 0.52.13-1 - new upstram release * Sat Jun 04 2011 Daisuke SUZUKI 0.52.12-2 - add patch2,3 from mdv - add patch10 from ubuntu * Tue May 31 2011 Daisuke SUZUKI 0.52.12-1 - update to 0.52.12 - add patch0: don't hang in form when stdin disappears - remove patch100, fixed in upstream * Mon Apr 18 2011 Tomohiro "Tomo-p" KATO 0.52.10-7 - rebuilt with recent environment. * Fri Feb 12 2010 MATSUBAYASHI Kohji - 0.52.10-6 - rebuilt with gcc-4.4.3-3 on ppc * Fri Feb 5 2010 MATSUBAYASHI Kohji - 0.52.10-5 - rebuilt with rpm-4.8.0-3 (on ppc) * Wed Feb 03 2010 Shu KONNO 0.52.10-4 - rebuilt with python-2.6.4 * Thu Oct 8 2009 Satoshi IWAMOTO 0.52.10-3 - fix build_compat32 if-endif * Sat Sep 26 2009 Satoshi IWAMOTO 0.52.10-2 - add patch100 for fix CVE-2009-2905 (textbox BoF) from fc10 * Sun Aug 24 2008 Daisuke SUZUKI 0.52.10-1 - new upstream release - use %%python_sitearch macro - remove --with-gpm-support - drop obsolete patches * Sun Aug 20 2006 NAKAMURA Kenta 0.50.35-0vl6 - rebuild to fix dependency problem on x86_64 architecture * Thu Feb 16 2006 Shu KONNO 0.50.35-0vl5 - added BuildRequires: slang-devel - added newt-0.50.35-Makefile.in.patch - updated newt-0.50.35-make.patch - changed /usr/lib to %%{_libdir} - added compat32-* packages for x86_64 architecture support * Sun Apr 03 2005 Shu KONNO 0.50.35-0vl4 - rebuild with python-2.4.1-0vl1 * Sat Apr 17 2004 Shu KONNO 0.50.35-0vl3 - rebuild with python-2.3.3-0vl1 * Sat Apr 10 2004 Shu KONNO 0.50.35-0vl2.1 - rebuild with python-2.3.3-0vl0.3 (for TestPkg) * Wed Jan 29 2003 Tomoya TAKA 0.50.35-0vl2 - build against python-2.2 - drop Patch20 * Thu Oct 10 2002 MATSUBAYASHI Kohji 0.50.35-0vl1 - updated to new upstream release 0.50.35 - updated Patch11 and added Patch20 (Patch20 is for python 1.5: REMOVE IT WHEN WE DECIDED TO GO WITH PYTHON2) * Sat Mar 09 2002 Tomoya TAKA 0.50.33-0vl1 - update to new upstream release * Mon Jul 2 2001 MATUBARA Kazuyuki - 0.50.22-0vl1 - updated to 0.50.22 - use Release No for Vine Linux - use better macros - bytecompile the snack python module * Wed Sep 29 1999 Norihito Ohmori - fix spec file * Sat Sep 11 1999 Norihito Ohmori - added Japanese support patch * Wed Sep 01 1999 Erik Troan - added suspend/resume to snack * Tue Aug 31 1999 Matt Wilson - enable gpm support * Fri Aug 27 1999 Matt Wilson - added hotkey assignment for gridforms, changed listbox.setcurrent to take the item key * Wed Aug 25 1999 Matt Wilson - fixed snack callback function refcounts, as well as optional data args - fixed suspend callback ref counts * Mon Aug 23 1999 Matt Wilson - added buttons argument to entrywindow * Thu Aug 12 1999 Bill Nottingham - multi-state checkboxtrees. Woohoo. * Mon Aug 9 1999 Matt Wilson - added snack wrappings for checkbox flag setting * Thu Aug 5 1999 Matt Wilson - added snack bindings for setting current listbox selection - added argument to set default selection in snack ListboxChoiceWindow * Mon Aug 2 1999 Matt Wilson - added checkboxtree - improved snack binding * Fri Apr 9 1999 Matt Wilson - fixed a glibc related bug in reflow that was truncating all text to 1000 chars * Fri Apr 09 1999 Matt Wilson - fixed bug that made newt apps crash when you hit followed by lots of keys * Mon Mar 15 1999 Matt Wilson - fix from Jakub Jelinek for listbox keypresses * Sat Feb 27 1999 Matt Wilson - fixed support for navigating listboxes with alphabetical keypresses * Thu Feb 25 1999 Matt Wilson - updated descriptions - added support for navigating listboxes with alphabetical keypresses * Mon Feb 8 1999 Matt Wilson - made grid wrapped windows at least the size of their title bars * Fri Feb 5 1999 Matt Wilson - Function to set checkbox flags. This will go away later when I have a generic flag setting function and signals to comps to go insensitive. * Tue Jan 19 1999 Matt Wilson - Stopped using libgpm, internalized all gpm calls. Still need some cleanups. * Thu Jan 7 1999 Matt Wilson - Added GPM mouse support - Moved to autoconf to allow compiling without GPM support - Changed revision to 0.40 * Wed Oct 21 1998 Bill Nottingham - built against slang-1.2.2 * Wed Aug 19 1998 Bill Nottingham - bugfixes for text reflow - added docs * Fri May 01 1998 Cristian Gafton - devel package moved to Development/Libraries * Thu Apr 30 1998 Erik Troan - removed whiptcl.so -- it should be in a separate package * Mon Feb 16 1998 Erik Troan - added newtWinMenu() - many bug fixes in grid code * Wed Jan 21 1998 Erik Troan - removed newtWinTernary() - made newtWinChoice() return codes consistent with newtWinTernary() * Fri Jan 16 1998 Erik Troan - added changes from Bruce Perens - small cleanups - lets whiptail automatically resize windows - the order of placing a grid and adding components to a form no longer matters - added newtGridAddComponentsToForm() * Wed Oct 08 1997 Erik Troan - added newtWinTernary() * Tue Oct 07 1997 Erik Troan - made Make/spec files use a buildroot - added grid support (for newt 0.11 actually) * Mon Jun 02 1997 Erik Troan - Added patched from Clarence Smith for setting the size of a listbox - Version 0.9 * Wed May 28 1997 Elliot Lee 0.8-2 - Touchups on Makefile - Cleaned up NEWT_FLAGS_* * Tue Mar 18 1997 Erik Troan - Cleaned up listbox - Added whiptail - Added newtButtonCompact button type and associated colors - Added newtTextboxGetNumLines() and newtTextboxSetHeight() * Tue Feb 25 1997 Erik Troan - Added changes from sopwith for C++ cleanliness and some listbox fixes.