From 41cfbbb06fe5bd8d1578dad0cec64ed1f09d0b67337acb42e0b2dca5cb240d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 9 Nov 2017 08:53:14 +0000 Subject: [PATCH] Accepting request 539962 from home:pluskalm:branches:devel:libraries:c_c++ - Use current factory dependencies - Build python3 bindings allways - Small cleanup with spec-clenaer OBS-URL: https://build.opensuse.org/request/show/539962 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/newt?expand=0&rev=40 --- newt.changes | 7 +++++++ newt.spec | 51 ++++++++++++--------------------------------------- 2 files changed, 19 insertions(+), 39 deletions(-) diff --git a/newt.changes b/newt.changes index 978c1e2..68e9fab 100644 --- a/newt.changes +++ b/newt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 8 16:43:04 UTC 2017 - mpluskal@suse.com + +- Use current factory dependencies +- Build python3 bindings allways +- Small cleanup with spec-clenaer + ------------------------------------------------------------------- Mon Oct 2 21:35:26 UTC 2017 - jengelh@inai.de diff --git a/newt.spec b/newt.spec index 86674e6..57fd7a4 100644 --- a/newt.spec +++ b/newt.spec @@ -16,12 +16,6 @@ # -%if 0%{?suse_version} > 1320 -%bcond_without python3 -%else -%bcond_with python3 -%endif - %define libname lib%{name} %define libsoname %{libname}0_52 Name: newt @@ -36,24 +30,20 @@ Source2: baselibs.conf Source10: %{name}-rpmlintrc # needed for tutorial.pdf BuildRequires: docbook-toys -BuildRequires: pkg-config +BuildRequires: pkgconfig BuildRequires: popt-devel -BuildRequires: python-devel +BuildRequires: python3-devel BuildRequires: slang-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} < 1020 -BuildRequires: libpng-devel -%endif -%if 0%{?suse_version} > 1220 BuildRequires: texlive-courier BuildRequires: texlive-dvips BuildRequires: texlive-ec BuildRequires: texlive-helvetic BuildRequires: texlive-jadetex BuildRequires: texlive-times -%endif -%if %{with python3} -BuildRequires: python3-devel +%if 0%{?suse_version} > 1320 +BuildRequires: python2-devel +%else +BuildRequires: python-devel %endif %description @@ -104,9 +94,7 @@ Summary: Tutorial for Nifty Erik's Windowing Toolkit License: LGPL-2.1+ Group: Documentation/Howto Recommends: %{name} = %{version} -%if 0%{?suse_version} > 1120 BuildArch: noarch -%endif %description doc This package contains a tutorial about the Newt windowing toolkit. @@ -135,20 +123,21 @@ interfaces. Newt can be used to add stacked windows, entry widgets, check boxes, radio buttons, labels, plain text fields, scrollbars, etc., to text mode user interfaces. -%package -n python-%{name} +%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 AND GPL-2.0+ AND LGPL-2.1+ Group: Development/Languages/Python Requires: %{name} = %{version} +Provides: python-%{name} = %{version} +Obsoletes: python-%{name} < %{version} Provides: %{name}-python = %{version} Obsoletes: %{name}-python < %{version} %py_requires -%description -n python-%{name} +%description -n python2-%{name} The python-newt package contains the Python bindings for the newt library providing a python API for creating text mode interfaces. -%if %{with python3} %package -n python3-%{name} Summary: Python 3 bindings for newt License: LGPL-2.1+ @@ -158,7 +147,6 @@ Requires: %{name} = %{version}-%{release} %description -n python3-%{name} The python3-newt package contains the Python 3 bindings for the newt library providing a python API for creating text mode interfaces. -%endif %prep %setup -q @@ -174,9 +162,7 @@ chmod 0644 peanuts.py popcorn.py %install pyversions="python%{py_ver}" -%if %{with python3} pyversions="$pyversions python%{py3_ver}" -%endif make PYTHONVERS="$pyversions" instroot=%{buildroot} DESTDIR=%{buildroot} install install-sh # currently we don't support these languages for lang in ast bal sr@latin wo; do @@ -201,21 +187,15 @@ rm tutorial.{aux,log,out} CATALOG.* *.dsl popd 1>/dev/null %find_lang %{name} -%if 0%{?suse_version} %py_compile %{buildroot}/%{python_sitearch} %py_compile -O %{buildroot}/%{python_sitearch} -%if %{with python3} %py3_compile %{buildroot}/%{python3_sitearch} %py3_compile -O %{buildroot}/%{python3_sitearch} -%endif -%endif %post -n %{libsoname} -p /sbin/ldconfig - %postun -n %{libsoname} -p /sbin/ldconfig %files -f %{name}.lang -%defattr (-,root,root) %dir %{_defaultdocdir}/%{name} %doc %{_defaultdocdir}/%{name}/COPYING %{_bindir}/whiptail @@ -227,35 +207,28 @@ popd 1>/dev/null %endif %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 -%files -n python-%{name} -%defattr(-,root,root) +%files -n python2-%{name} %dir %{_defaultdocdir}/%{name}/examples %doc %{_defaultdocdir}/%{name}/examples/*.py %{py_sitedir}/* -%if %{with python3} %files -n python3-%{name} %doc peanuts.py popcorn.py %{python3_sitearch}/*.so %{python3_sitearch}/*.py* %{python3_sitearch}/__pycache__/*.py* -%endif %changelog