Accepting request 528738 from devel:libraries:c_c++
1 OBS-URL: https://build.opensuse.org/request/show/528738 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/newt?expand=0&rev=41
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 24 13:04:01 UTC 2017 - mc@suse.com
|
||||||
|
|
||||||
|
- build python3 subpackage
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 3 15:24:29 UTC 2017 - lars@linux-schulserver.de
|
Mon Jul 3 15:24:29 UTC 2017 - lars@linux-schulserver.de
|
||||||
|
|
||||||
|
|||||||
47
newt.spec
47
newt.spec
@@ -16,6 +16,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1320
|
||||||
|
%bcond_without python3
|
||||||
|
%else
|
||||||
|
%bcond_with python3
|
||||||
|
%endif
|
||||||
|
|
||||||
%define libname lib%{name}
|
%define libname lib%{name}
|
||||||
%define libsoname %{libname}0_52
|
%define libsoname %{libname}0_52
|
||||||
Name: newt
|
Name: newt
|
||||||
@@ -46,6 +52,9 @@ BuildRequires: texlive-helvetic
|
|||||||
BuildRequires: texlive-jadetex
|
BuildRequires: texlive-jadetex
|
||||||
BuildRequires: texlive-times
|
BuildRequires: texlive-times
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with python3}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Newt is a programming library for color text-mode, widget-based user
|
Newt is a programming library for color text-mode, widget-based user
|
||||||
@@ -136,9 +145,21 @@ Obsoletes: %{name}-python < %{version}
|
|||||||
%py_requires
|
%py_requires
|
||||||
|
|
||||||
%description -n python-%{name}
|
%description -n python-%{name}
|
||||||
The newt-python package contains the Python bindings for the newt
|
The python-newt package contains the Python bindings for the newt
|
||||||
library providing a python API for creating text mode interfaces.
|
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+
|
||||||
|
Group: Development/Libraries
|
||||||
|
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
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
@@ -149,9 +170,14 @@ library providing a python API for creating text mode interfaces.
|
|||||||
## make depend
|
## make depend
|
||||||
make CPPFLAGS="%{optflags} -fPIC" %{?_smp_mflags} all
|
make CPPFLAGS="%{optflags} -fPIC" %{?_smp_mflags} all
|
||||||
#docbook2txt tutorial.sgml
|
#docbook2txt tutorial.sgml
|
||||||
|
chmod 0644 peanuts.py popcorn.py
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make PYTHONVERS="python%{py_ver}" instroot=%{buildroot} DESTDIR=%{buildroot} install install-sh
|
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
|
# currently we don't support these languages
|
||||||
for lang in ast bal sr@latin wo; do
|
for lang in ast bal sr@latin wo; do
|
||||||
rm -rf %{buildroot}%{_datadir}/locale/$lang
|
rm -rf %{buildroot}%{_datadir}/locale/$lang
|
||||||
@@ -175,6 +201,15 @@ rm tutorial.{aux,log,out} CATALOG.* *.dsl
|
|||||||
popd 1>/dev/null
|
popd 1>/dev/null
|
||||||
%find_lang %{name}
|
%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
|
%post -n %{libsoname} -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n %{libsoname} -p /sbin/ldconfig
|
%postun -n %{libsoname} -p /sbin/ldconfig
|
||||||
@@ -215,4 +250,12 @@ popd 1>/dev/null
|
|||||||
%doc %{_defaultdocdir}/%{name}/examples/*.py
|
%doc %{_defaultdocdir}/%{name}/examples/*.py
|
||||||
%{py_sitedir}/*
|
%{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
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user