SHA256
8
0
forked from pool/newt

Accepting request 562892 from devel:libraries:c_c++

OBS-URL: https://build.opensuse.org/request/show/562892
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/newt?expand=0&rev=44
This commit is contained in:
2018-01-16 08:32:27 +00:00
committed by Git OBS Bridge
2 changed files with 22 additions and 16 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 3 14:38:04 UTC 2018 - tchvatal@suse.com
- Build without py2 if needed
- Fix upstream url
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Nov 8 16:43:04 UTC 2017 - mpluskal@suse.com Wed Nov 8 16:43:04 UTC 2017 - mpluskal@suse.com

View File

@@ -1,7 +1,7 @@
# #
# spec file for package newt # spec file for package newt
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -18,13 +18,14 @@
%define libname lib%{name} %define libname lib%{name}
%define libsoname %{libname}0_52 %define libsoname %{libname}0_52
%bcond_without python2
Name: newt Name: newt
Version: 0.52.20 Version: 0.52.20
Release: 0 Release: 0
Summary: A library for text mode user interfaces Summary: A library for text mode user interfaces
License: LGPL-2.1+ License: LGPL-2.1+
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Url: https://fedorahosted.org/newt/ Url: https://pagure.io/newt
Source: https://fedorahosted.org/releases/n/e/newt/%{name}-%{version}.tar.gz Source: https://fedorahosted.org/releases/n/e/newt/%{name}-%{version}.tar.gz
Source2: baselibs.conf Source2: baselibs.conf
Source10: %{name}-rpmlintrc Source10: %{name}-rpmlintrc
@@ -40,9 +41,7 @@ BuildRequires: texlive-ec
BuildRequires: texlive-helvetic BuildRequires: texlive-helvetic
BuildRequires: texlive-jadetex BuildRequires: texlive-jadetex
BuildRequires: texlive-times BuildRequires: texlive-times
%if 0%{?suse_version} > 1320 %if %{with python2}
BuildRequires: python2-devel
%else
BuildRequires: python-devel BuildRequires: python-devel
%endif %endif
@@ -75,7 +74,7 @@ License: LGPL-2.1+
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{libsoname} = %{version} Requires: %{libsoname} = %{version}
Requires: popt-devel Requires: popt-devel
Requires: python-devel Requires: python3-devel
Requires: slang-devel Requires: slang-devel
Recommends: %{name} = %{version} Recommends: %{name} = %{version}
@@ -132,7 +131,6 @@ Provides: python-%{name} = %{version}
Obsoletes: python-%{name} < %{version} Obsoletes: python-%{name} < %{version}
Provides: %{name}-python = %{version} Provides: %{name}-python = %{version}
Obsoletes: %{name}-python < %{version} Obsoletes: %{name}-python < %{version}
%py_requires
%description -n python2-%{name} %description -n python2-%{name}
The python-newt package contains the Python bindings for the newt The python-newt package contains the Python bindings for the newt
@@ -161,7 +159,11 @@ make CPPFLAGS="%{optflags} -fPIC" %{?_smp_mflags} all
chmod 0644 peanuts.py popcorn.py chmod 0644 peanuts.py popcorn.py
%install %install
%if %{with python2}
pyversions="python%{py_ver}" pyversions="python%{py_ver}"
%else
pyversions=""
%endif
pyversions="$pyversions python%{py3_ver}" pyversions="$pyversions python%{py3_ver}"
make PYTHONVERS="$pyversions" instroot=%{buildroot} DESTDIR=%{buildroot} install install-sh make PYTHONVERS="$pyversions" instroot=%{buildroot} DESTDIR=%{buildroot} install install-sh
# currently we don't support these languages # currently we don't support these languages
@@ -187,10 +189,14 @@ rm tutorial.{aux,log,out} CATALOG.* *.dsl
popd 1>/dev/null popd 1>/dev/null
%find_lang %{name} %find_lang %{name}
%if %{with python2}
%py_compile %{buildroot}/%{python_sitearch} %py_compile %{buildroot}/%{python_sitearch}
%py_compile -O %{buildroot}/%{python_sitearch} %py_compile -O %{buildroot}/%{python_sitearch}
%endif
%py3_compile %{buildroot}/%{python3_sitearch} %py3_compile %{buildroot}/%{python3_sitearch}
%py3_compile -O %{buildroot}/%{python3_sitearch} %py3_compile -O %{buildroot}/%{python3_sitearch}
# pointless examples
rm %{buildroot}%{_defaultdocdir}/%{name}/examples/*.py
%post -n %{libsoname} -p /sbin/ldconfig %post -n %{libsoname} -p /sbin/ldconfig
%postun -n %{libsoname} -p /sbin/ldconfig %postun -n %{libsoname} -p /sbin/ldconfig
@@ -200,11 +206,6 @@ popd 1>/dev/null
%doc %{_defaultdocdir}/%{name}/COPYING %doc %{_defaultdocdir}/%{name}/COPYING
%{_bindir}/whiptail %{_bindir}/whiptail
%{_mandir}/man1/whiptail.1* %{_mandir}/man1/whiptail.1*
%if 0%{?suse_version} <= 1020
%dir %{_datadir}/locale/as
%dir %{_datadir}/locale/as/LC_MESSAGES
%{_datadir}/locale/as/LC_MESSAGES/*
%endif
%files -n %{libsoname} %files -n %{libsoname}
%{_libdir}/%{libname}.so.* %{_libdir}/%{libname}.so.*
@@ -220,13 +221,12 @@ popd 1>/dev/null
%files static %files static
%{_libdir}/%{libname}.a %{_libdir}/%{libname}.a
%if %{with python2}
%files -n python2-%{name} %files -n python2-%{name}
%dir %{_defaultdocdir}/%{name}/examples %{python2_sitearch}/*
%doc %{_defaultdocdir}/%{name}/examples/*.py %endif
%{py_sitedir}/*
%files -n python3-%{name} %files -n python3-%{name}
%doc peanuts.py popcorn.py
%{python3_sitearch}/*.so %{python3_sitearch}/*.so
%{python3_sitearch}/*.py* %{python3_sitearch}/*.py*
%{python3_sitearch}/__pycache__/*.py* %{python3_sitearch}/__pycache__/*.py*