SHA256
8
0
forked from pool/newt

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
This commit is contained in:
Ismail Dönmez
2017-11-09 08:53:14 +00:00
committed by Git OBS Bridge
parent 30e2ede513
commit 41cfbbb06f
2 changed files with 19 additions and 39 deletions

View File

@@ -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 Mon Oct 2 21:35:26 UTC 2017 - jengelh@inai.de

View File

@@ -16,12 +16,6 @@
# #
%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
@@ -36,24 +30,20 @@ Source2: baselibs.conf
Source10: %{name}-rpmlintrc Source10: %{name}-rpmlintrc
# needed for tutorial.pdf # needed for tutorial.pdf
BuildRequires: docbook-toys BuildRequires: docbook-toys
BuildRequires: pkg-config BuildRequires: pkgconfig
BuildRequires: popt-devel BuildRequires: popt-devel
BuildRequires: python-devel BuildRequires: python3-devel
BuildRequires: slang-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-courier
BuildRequires: texlive-dvips BuildRequires: texlive-dvips
BuildRequires: texlive-ec BuildRequires: texlive-ec
BuildRequires: texlive-helvetic BuildRequires: texlive-helvetic
BuildRequires: texlive-jadetex BuildRequires: texlive-jadetex
BuildRequires: texlive-times BuildRequires: texlive-times
%endif %if 0%{?suse_version} > 1320
%if %{with python3} BuildRequires: python2-devel
BuildRequires: python3-devel %else
BuildRequires: python-devel
%endif %endif
%description %description
@@ -104,9 +94,7 @@ Summary: Tutorial for Nifty Erik's Windowing Toolkit
License: LGPL-2.1+ License: LGPL-2.1+
Group: Documentation/Howto Group: Documentation/Howto
Recommends: %{name} = %{version} Recommends: %{name} = %{version}
%if 0%{?suse_version} > 1120
BuildArch: noarch BuildArch: noarch
%endif
%description doc %description doc
This package contains a tutorial about the Newt windowing toolkit. 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, check boxes, radio buttons, labels, plain text fields, scrollbars,
etc., to text mode user interfaces. etc., to text mode user interfaces.
%package -n python-%{name} %package -n python2-%{name}
Summary: Python bindings for newt 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 Group: Development/Languages/Python
Requires: %{name} = %{version} Requires: %{name} = %{version}
Provides: 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 %py_requires
%description -n python-%{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
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} %package -n python3-%{name}
Summary: Python 3 bindings for newt Summary: Python 3 bindings for newt
License: LGPL-2.1+ License: LGPL-2.1+
@@ -158,7 +147,6 @@ Requires: %{name} = %{version}-%{release}
%description -n python3-%{name} %description -n python3-%{name}
The python3-newt package contains the Python 3 bindings for the newt library The python3-newt package contains the Python 3 bindings for the newt library
providing a python API for creating text mode interfaces. providing a python API for creating text mode interfaces.
%endif
%prep %prep
%setup -q %setup -q
@@ -174,9 +162,7 @@ chmod 0644 peanuts.py popcorn.py
%install %install
pyversions="python%{py_ver}" pyversions="python%{py_ver}"
%if %{with python3}
pyversions="$pyversions python%{py3_ver}" pyversions="$pyversions python%{py3_ver}"
%endif
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
for lang in ast bal sr@latin wo; do for lang in ast bal sr@latin wo; do
@@ -201,21 +187,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 %{buildroot}/%{python_sitearch}
%py_compile -O %{buildroot}/%{python_sitearch} %py_compile -O %{buildroot}/%{python_sitearch}
%if %{with python3}
%py3_compile %{buildroot}/%{python3_sitearch} %py3_compile %{buildroot}/%{python3_sitearch}
%py3_compile -O %{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
%files -f %{name}.lang %files -f %{name}.lang
%defattr (-,root,root)
%dir %{_defaultdocdir}/%{name} %dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/COPYING %doc %{_defaultdocdir}/%{name}/COPYING
%{_bindir}/whiptail %{_bindir}/whiptail
@@ -227,35 +207,28 @@ popd 1>/dev/null
%endif %endif
%files -n %{libsoname} %files -n %{libsoname}
%defattr (-,root,root)
%{_libdir}/%{libname}.so.* %{_libdir}/%{libname}.so.*
%files devel %files devel
%defattr (-,root,root)
%{_includedir}/%{name}.h %{_includedir}/%{name}.h
%{_libdir}/%{libname}.so %{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%files doc %files doc
%defattr (-,root,root)
%doc %{_defaultdocdir}/%{name}/tutorial.* %doc %{_defaultdocdir}/%{name}/tutorial.*
%files static %files static
%defattr (-,root,root)
%{_libdir}/%{libname}.a %{_libdir}/%{libname}.a
%files -n python-%{name} %files -n python2-%{name}
%defattr(-,root,root)
%dir %{_defaultdocdir}/%{name}/examples %dir %{_defaultdocdir}/%{name}/examples
%doc %{_defaultdocdir}/%{name}/examples/*.py %doc %{_defaultdocdir}/%{name}/examples/*.py
%{py_sitedir}/* %{py_sitedir}/*
%if %{with python3}
%files -n python3-%{name} %files -n python3-%{name}
%doc peanuts.py popcorn.py %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*
%endif
%changelog %changelog