%define majver 0.52 %define libname %mklibname %{name} %{majver} %define libdevel %{libname}-devel %bcond_without diet %bcond_with uclibc Summary: A development library for text mode user interfaces Name: newt Version: 0.52.16 Release: %mkrel 3 License: LGPLv2+ Group: System/Libraries URL: https://fedorahosted.org/newt/ Source0: https://fedorahosted.org/releases/n/e/newt/%{name}-%{version}.tar.gz # do not send upstream, customisation # change the default color palette Patch1: newt-0.52.6-mdvconf.patch # TODO send upstream ( and find what is this patch ) Patch2: newt-0.51.4-fix-wstrlen-for-non-utf8-strings.patch # splitted, and send upstream by mail ( misc, 24/01/2011 ) Patch3: newt-0.52.13-assorted-fixes.patch BuildRequires: glibc-static-devel BuildRequires: popt-devel BuildRequires: python-devel BuildRequires: slang-devel %if %{with diet} BuildRequires: dietlibc-devel %endif %if %{with uclibc} BuildRequires: uClibc-devel %endif Requires: slang # unused, should be dropped ( misc, 17/01/2011 ) Provides: python-snack # required by alsaconf Provides: whiptail %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 contains a /usr/bin/dialog replacement called whiptail. Newt is based on the slang library. %package -n %{libname} Summary: Newt windowing toolkit development files library Group: Development/C Provides: lib%{name} = %{version}-%{release} %description -n %{libname} 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 contains a /usr/bin/dialog replacement called whiptail. Newt is based on the slang library. %package -n %{libdevel} Summary: Newt windowing toolkit development files Group: Development/C Requires: slang-devel %{libname} = %{version} Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Obsoletes: %{name}-devel Conflicts: libnewt0.51-devel %description -n %{libdevel} 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 contains a /usr/bin/dialog replacement called whiptail. Newt is based on the slang library. Install newt-devel if you want to develop applications which will use newt. %prep %setup -q %patch1 -p1 -b .mdvconf %patch2 -p1 -b .fix-wstrlen-for-non-utf8-strings %patch3 -p1 -b .assorted-fixes %if %{with diet} mkdir diet pushd diet ln -s ../*.[ch] ../newt.spec . popd %endif %if %{with uclibc} mkdir uclibc pushd uclibc ln -s ../*.[ch] ../newt.spec . popd %endif %build %if %{with diet} pushd diet CC="diet gcc" CFLAGS="-Os -g" \ ../configure --without-gpm-support \ --without-tcl \ --disable-nls %make libnewt.a popd %endif %if %{with uclibc} pushd uclibc CC="%{uclibc_cc}" CFLAGS="%{uclibc_cflags}" \ ../configure --without-gpm-support \ --without-tcl \ --disable-nls %make libnewt.a popd %endif %configure --with-gpm-support --without-tcl %make %make shared %install rm -rf %{buildroot} install -d %{buildroot} %makeinstall %if %{with diet} install -m644 diet/libnewt.a -D %{buildroot}%{_prefix}/lib/dietlibc/lib-%{_arch}/libnewt.a %endif %if %{with uclibc} install -m644 uclibc/libnewt.a -D %{buildroot}%{_prefix}/uclibc/%{_libdir}/libnewt.a %endif ln -snf lib%{name}.so.%{version} %{buildroot}%{_libdir}/lib%{name}.so.%{majver} rm -rf %{buildroot}%{_libdir}/python{1.5,2.0,2.1,2.2} %find_lang %{name} %clean rm -rf %{buildroot} %files -n %{libname} %doc CHANGES %{_libdir}/libnewt.so.* %files -f %{name}.lang %doc CHANGES COPYING %{_bindir}/whiptail %{_libdir}/python%{pyver}/site-packages/* %{_mandir}/man1/whiptail.1* %files -n %{libdevel} %doc tutorial.sgml %{_includedir}/newt.h %{_libdir}/libnewt.a %{_libdir}/libnewt.so %if %{with diet} %{_prefix}/lib/dietlibc/lib-%{_arch}/libnewt.a %endif %if %{with uclibc} %{_prefix}/uclibc%{_libdir}/libnewt.a %endif %{_libdir}/pkgconfig/libnewt.pc %changelog * Fri Jan 10 2014 pterjan <pterjan> 0.52.16-3.mga4 + Revision: 566187 - Disable uclibc build * Sat Oct 19 2013 umeabot <umeabot> 0.52.16-2.mga4 + Revision: 531722 - Mageia 4 Mass Rebuild * Thu Aug 08 2013 luigiwalser <luigiwalser> 0.52.16-1.mga4 + Revision: 464813 - 0.52.16 * Sun Jul 07 2013 luigiwalser <luigiwalser> 0.52.15-1.mga4 + Revision: 450987 - 0.52.15 + umeabot <umeabot> - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Jun 01 2012 tv <tv> 0.52.14-2.mga3 + Revision: 252926 - add dietlibc & uclibc builds * Sun Feb 19 2012 luigiwalser <luigiwalser> 0.52.14-1.mga2 + Revision: 210657 - 0.52.14 * Tue Sep 06 2011 tv <tv> 0.52.13-1.mga2 + Revision: 139647 - new release - drop patch 0 & 8 (merged) - rediff patch 3 * Mon Jan 17 2011 misc <misc> 0.52.11-4.mga1 + Revision: 21012 - add some comment about patch and provides - remove old version requires on a long forgotten python version - rebuilt for new python + dmorgan <dmorgan> - Get rid of mdv macros - imported package newt * Tue Nov 02 2010 Jani Välimaa <wally@mandriva.org> 0.52.11-3mdv2011.0 + Revision: 592225 - rebuild for python 2.7 * Sun Mar 14 2010 Oden Eriksson <oeriksson@mandriva.com> 0.52.11-2mdv2010.1 + Revision: 519047 - rebuild + Sandro Cazzaniga <kharec@mandriva.org> - re-update to 0.52.11 after an error - update to 0.52.4 * Fri Sep 25 2009 Frederik Himpe <fhimpe@mandriva.org> 0.52.11-1mdv2010.0 + Revision: 449267 - Update to new version 0.52.11 (fixes CVE-2009-2905) - Remove patches integrated upstream - Rediff LDFLAGS patch * Sat Dec 27 2008 Funda Wang <fwang@mandriva.org> 0.52.6-8mdv2009.1 + Revision: 319757 - rebuild for new python * Wed Dec 24 2008 Oden Eriksson <oeriksson@mandriva.com> 0.52.6-7mdv2009.1 + Revision: 318198 - use %%ldflags * Tue Jun 17 2008 Thierry Vignaud <tv@mandriva.org> 0.52.6-5mdv2009.0 + Revision: 223345 - rebuild + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Tue Jan 15 2008 Thierry Vignaud <tv@mandriva.org> 0.52.6-4mdv2008.1 + Revision: 153283 - rebuild - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Pixel <pixel@mandriva.com> - rename the "snack" provide into "python-snack" (there is a package named libsnack which provides snack) * Mon Aug 13 2007 Pixel <pixel@mandriva.com> 0.52.6-3mdv2008.0 + Revision: 62757 - provide whiptail (it's clearer for a package to require "whiptail" instead of "newt") * Mon Aug 13 2007 Pixel <pixel@mandriva.com> 0.52.6-2mdv2008.0 + Revision: 62756 - the library should not provide newt (#32315) * Wed May 30 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 0.52.6-1mdv2008.0 + Revision: 32788 - Added upstream/fedora patches entry, countitems, cursor, memleaks. - Updated to version 0.52.6. - Redid mdkconf patch -> newt-0.52.6-mdvconf.patch - Removed allow-textbox-to-take-focus patch, not needed anymore (#15067, #31012). - libnewt0.52-devel, soname change: added needed Conflicts for libnewt0.51-devel. * Thu May 24 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 0.51.6-14mdv2008.0 + Revision: 30894 - Removed listbox part of patch do-not-ignore-EARLY-events-in-listbox--and-allow-textbox-to-take-focus and Renamed it to allow-textbox-to-take-focus, because it's breaking listbox NEWT_FLAG_RETURNEXIT feature here; with the listbox part of the patch applied, the newtFormRun function on exit never return the listbox when it's selected and Enter is pressed. From the changelogs, this patch is for ticket #15067, I tested it here without the listbox part and seems to be ok. Same description and also a testcase reported on bugzilla also (#31012). * Wed Nov 22 2006 Oden Eriksson <oeriksson@mandriva.com> 0.51.6-13mdv2007.0 + Revision: 86416 - spec file massage + bcornec <bcornec> - import newt-0.51.6-12mdk * Mon Dec 12 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.51.6-12mdk - assorted bug fixes from code review, others are in DrakX * Wed Apr 27 2005 Pixel <pixel@mandriva.com> 0.51.6-11mdk - do not ignore EARLY events in listbox and allow textbox to take focus => this fixes drakauth which has a scrollbar for the text and also for the entries (bugzilla #15067) * Sun Dec 05 2004 Michael Scherer <misc@mandrake.org> 0.51.6-10mdk - Rebuild for new python - fix dir ownership * Sat Jul 24 2004 Marcel Pol <mpol@mandrake.org> 0.51.6-9mdk - again build against new slang * Thu Jul 22 2004 Marcel Pol <mpol@mandrake.org> 0.51.6-8mdk - build against new slang * Wed Jan 28 2004 Warly <warly@mandrakesoft.com> 0.51.6-7mdk - new version