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:
@@ -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
|
||||
|
||||
|
||||
32
newt.spec
32
newt.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# 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
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,13 +18,14 @@
|
||||
|
||||
%define libname lib%{name}
|
||||
%define libsoname %{libname}0_52
|
||||
%bcond_without python2
|
||||
Name: newt
|
||||
Version: 0.52.20
|
||||
Release: 0
|
||||
Summary: A library for text mode user interfaces
|
||||
License: LGPL-2.1+
|
||||
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
|
||||
Source2: baselibs.conf
|
||||
Source10: %{name}-rpmlintrc
|
||||
@@ -40,9 +41,7 @@ BuildRequires: texlive-ec
|
||||
BuildRequires: texlive-helvetic
|
||||
BuildRequires: texlive-jadetex
|
||||
BuildRequires: texlive-times
|
||||
%if 0%{?suse_version} > 1320
|
||||
BuildRequires: python2-devel
|
||||
%else
|
||||
%if %{with python2}
|
||||
BuildRequires: python-devel
|
||||
%endif
|
||||
|
||||
@@ -75,7 +74,7 @@ License: LGPL-2.1+
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{libsoname} = %{version}
|
||||
Requires: popt-devel
|
||||
Requires: python-devel
|
||||
Requires: python3-devel
|
||||
Requires: slang-devel
|
||||
Recommends: %{name} = %{version}
|
||||
|
||||
@@ -132,7 +131,6 @@ Provides: python-%{name} = %{version}
|
||||
Obsoletes: python-%{name} < %{version}
|
||||
Provides: %{name}-python = %{version}
|
||||
Obsoletes: %{name}-python < %{version}
|
||||
%py_requires
|
||||
|
||||
%description -n python2-%{name}
|
||||
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
|
||||
|
||||
%install
|
||||
%if %{with python2}
|
||||
pyversions="python%{py_ver}"
|
||||
%else
|
||||
pyversions=""
|
||||
%endif
|
||||
pyversions="$pyversions python%{py3_ver}"
|
||||
make PYTHONVERS="$pyversions" instroot=%{buildroot} DESTDIR=%{buildroot} install install-sh
|
||||
# currently we don't support these languages
|
||||
@@ -187,10 +189,14 @@ rm tutorial.{aux,log,out} CATALOG.* *.dsl
|
||||
popd 1>/dev/null
|
||||
%find_lang %{name}
|
||||
|
||||
%if %{with python2}
|
||||
%py_compile %{buildroot}/%{python_sitearch}
|
||||
%py_compile -O %{buildroot}/%{python_sitearch}
|
||||
%endif
|
||||
%py3_compile %{buildroot}/%{python3_sitearch}
|
||||
%py3_compile -O %{buildroot}/%{python3_sitearch}
|
||||
# pointless examples
|
||||
rm %{buildroot}%{_defaultdocdir}/%{name}/examples/*.py
|
||||
|
||||
%post -n %{libsoname} -p /sbin/ldconfig
|
||||
%postun -n %{libsoname} -p /sbin/ldconfig
|
||||
@@ -200,11 +206,6 @@ popd 1>/dev/null
|
||||
%doc %{_defaultdocdir}/%{name}/COPYING
|
||||
%{_bindir}/whiptail
|
||||
%{_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}
|
||||
%{_libdir}/%{libname}.so.*
|
||||
@@ -220,13 +221,12 @@ popd 1>/dev/null
|
||||
%files static
|
||||
%{_libdir}/%{libname}.a
|
||||
|
||||
%if %{with python2}
|
||||
%files -n python2-%{name}
|
||||
%dir %{_defaultdocdir}/%{name}/examples
|
||||
%doc %{_defaultdocdir}/%{name}/examples/*.py
|
||||
%{py_sitedir}/*
|
||||
%{python2_sitearch}/*
|
||||
%endif
|
||||
|
||||
%files -n python3-%{name}
|
||||
%doc peanuts.py popcorn.py
|
||||
%{python3_sitearch}/*.so
|
||||
%{python3_sitearch}/*.py*
|
||||
%{python3_sitearch}/__pycache__/*.py*
|
||||
|
||||
Reference in New Issue
Block a user