From 6f8eb9e2b9e3d6fe14f0bfdff9bb93bc64a86e96abeb28c037e9078b331c6c4c Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Wed, 20 Mar 2019 15:26:17 +0000 Subject: [PATCH] - use new license string compatible with latest spdx.org changes - ran spec-cleaner - adjust spec file to be able to build for SLE-12 and below: + re-add BuildRoot definition + re-add defattr definitions + define python2_sitearch if the macro is not defined - added newt-0.52.20-implicit-pointer-decl.patch to get rid of compiler warnings about implicit definitions of functions OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/newt?expand=0&rev=45 --- newt-0.52.20-implicit-pointer-decl.patch | 40 ++++++++++++++++++++++++ newt.changes | 12 +++++++ newt.spec | 37 +++++++++++++++------- 3 files changed, 78 insertions(+), 11 deletions(-) create mode 100644 newt-0.52.20-implicit-pointer-decl.patch diff --git a/newt-0.52.20-implicit-pointer-decl.patch b/newt-0.52.20-implicit-pointer-decl.patch new file mode 100644 index 0000000..3ca536b --- /dev/null +++ b/newt-0.52.20-implicit-pointer-decl.patch @@ -0,0 +1,40 @@ +Index: newt-0.52.20/dialogboxes.c +=================================================================== +--- newt-0.52.20.orig/dialogboxes.c ++++ newt-0.52.20/dialogboxes.c +@@ -1,4 +1,5 @@ + /* simple dialog boxes, used by both whiptail and tcl dialog bindings */ ++#define _XOPEN_SOURCE 700 + + #include "config.h" + #include +@@ -8,6 +9,11 @@ + #include + #include + #include ++#include ++ ++#ifdef HAVE_ALLOCA_H ++#include ++#endif + + #include "nls.h" + #include "dialogboxes.h" +Index: newt-0.52.20/newt.c +=================================================================== +--- newt-0.52.20.orig/newt.c ++++ newt-0.52.20/newt.c +@@ -1,3 +1,4 @@ ++#define _XOPEN_SOURCE 700 + #include "config.h" + + #include +Index: newt-0.52.20/textbox.c +=================================================================== +--- newt-0.52.20.orig/textbox.c ++++ newt-0.52.20/textbox.c +@@ -1,3 +1,4 @@ ++#define _XOPEN_SOURCE 700 + + #include + #include diff --git a/newt.changes b/newt.changes index 3a7d8f9..3c0d480 100644 --- a/newt.changes +++ b/newt.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Mar 20 08:32:24 UTC 2019 - lars@linux-schulserver.de - 0.52.20 + +- use new license string compatible with latest spdx.org changes +- ran spec-cleaner +- adjust spec file to be able to build for SLE-12 and below: + + re-add BuildRoot definition + + re-add defattr definitions + + define python2_sitearch if the macro is not defined +- added newt-0.52.20-implicit-pointer-decl.patch to get rid of + compiler warnings about implicit definitions of functions + ------------------------------------------------------------------- Wed Jan 3 14:38:04 UTC 2018 - tchvatal@suse.com diff --git a/newt.spec b/newt.spec index 8ccf844..c1ec2d1 100644 --- a/newt.spec +++ b/newt.spec @@ -1,7 +1,7 @@ # # spec file for package newt # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,23 +12,25 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define libname lib%{name} %define libsoname %{libname}0_52 %bcond_without python2 +%{!?python2_sitearch: %global python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: newt Version: 0.52.20 Release: 0 Summary: A library for text mode user interfaces -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ -Url: https://pagure.io/newt +URL: https://pagure.io/newt Source: https://fedorahosted.org/releases/n/e/newt/%{name}-%{version}.tar.gz Source2: baselibs.conf Source10: %{name}-rpmlintrc +Patch0: newt-0.52.20-implicit-pointer-decl.patch # needed for tutorial.pdf BuildRequires: docbook-toys BuildRequires: pkgconfig @@ -44,6 +46,7 @@ BuildRequires: texlive-times %if %{with python2} BuildRequires: python-devel %endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Newt is a programming library for color text-mode, widget-based user @@ -56,7 +59,7 @@ is based on the slang library. %package -n %{libsoname} Summary: Shared libraries for Nifty Erik's Windowing Toolkit -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: System/Libraries %description -n %{libsoname} @@ -70,7 +73,7 @@ etc., to text mode user interfaces. %package devel Summary: Development files for the Newt windowing toolkit -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ Requires: %{libsoname} = %{version} Requires: popt-devel @@ -90,7 +93,7 @@ newt. %package doc Summary: Tutorial for Nifty Erik's Windowing Toolkit # the examples need the main package: -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Documentation/Howto Recommends: %{name} = %{version} BuildArch: noarch @@ -108,7 +111,7 @@ etc., to text mode user interfaces. Newt is based on the slang library. # vendor for his tool. It shouldn't be a problem to keep this # special package. (lrupp) Summary: Static libraries of Nifty Erik's Windowing Toolkit -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ Requires: %{name}-devel = %{version} @@ -124,7 +127,7 @@ etc., to text mode user interfaces. %package -n python2-%{name} Summary: Python bindings for newt -License: GPL-2.0 AND GPL-2.0+ AND LGPL-2.1+ +License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later Group: Development/Languages/Python Requires: %{name} = %{version} Provides: python-%{name} = %{version} @@ -138,7 +141,7 @@ library providing a python API for creating text mode interfaces. %package -n python3-%{name} Summary: Python 3 bindings for newt -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Development/Languages/Python Requires: %{name} = %{version}-%{release} @@ -148,6 +151,7 @@ providing a python API for creating text mode interfaces. %prep %setup -q +%patch0 -p1 %build # gpm support seems to smash the stack @@ -202,31 +206,42 @@ rm %{buildroot}%{_defaultdocdir}/%{name}/examples/*.py %postun -n %{libsoname} -p /sbin/ldconfig %files -f %{name}.lang +%defattr(-,root,root) %dir %{_defaultdocdir}/%{name} +%if 0%{?suse_version} >= 01500 +%license %{_defaultdocdir}/%{name}/COPYING +%else %doc %{_defaultdocdir}/%{name}/COPYING +%endif %{_bindir}/whiptail -%{_mandir}/man1/whiptail.1* +%{_mandir}/man1/whiptail.1%{?ext_man} %files -n %{libsoname} +%defattr(-,root,root) %{_libdir}/%{libname}.so.* %files devel +%defattr(-,root,root) %{_includedir}/%{name}.h %{_libdir}/%{libname}.so %{_libdir}/pkgconfig/*.pc %files doc +%defattr(-,root,root) %doc %{_defaultdocdir}/%{name}/tutorial.* %files static +%defattr(-,root,root) %{_libdir}/%{libname}.a %if %{with python2} %files -n python2-%{name} +%defattr(-,root,root) %{python2_sitearch}/* %endif %files -n python3-%{name} +%defattr(-,root,root) %{python3_sitearch}/*.so %{python3_sitearch}/*.py* %{python3_sitearch}/__pycache__/*.py*