2006-12-21 15:29:33 +00:00
|
|
|
#
|
2011-03-17 13:44:19 +00:00
|
|
|
# spec file for package newt
|
2006-12-21 15:29:33 +00:00
|
|
|
#
|
2018-01-09 13:46:12 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2006-12-21 15:29:33 +00:00
|
|
|
#
|
2008-09-05 18:30:59 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2006-12-21 15:29:33 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
2012-02-01 11:06:46 +00:00
|
|
|
|
2011-03-17 13:44:19 +00:00
|
|
|
%define libname lib%{name}
|
|
|
|
|
%define libsoname %{libname}0_52
|
2018-01-09 13:46:12 +00:00
|
|
|
%bcond_without python2
|
2015-03-01 09:41:00 +00:00
|
|
|
Name: newt
|
2017-07-03 15:25:35 +00:00
|
|
|
Version: 0.52.20
|
2015-03-01 09:41:00 +00:00
|
|
|
Release: 0
|
2011-08-08 11:48:08 +00:00
|
|
|
Summary: A library for text mode user interfaces
|
2012-01-29 19:49:48 +00:00
|
|
|
License: LGPL-2.1+
|
2015-03-01 10:16:54 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2018-01-09 13:46:12 +00:00
|
|
|
Url: https://pagure.io/newt
|
2015-03-01 09:41:00 +00:00
|
|
|
Source: https://fedorahosted.org/releases/n/e/newt/%{name}-%{version}.tar.gz
|
2010-02-18 15:44:27 +00:00
|
|
|
Source2: baselibs.conf
|
2010-01-14 17:26:05 +00:00
|
|
|
Source10: %{name}-rpmlintrc
|
2015-03-01 09:41:00 +00:00
|
|
|
# needed for tutorial.pdf
|
|
|
|
|
BuildRequires: docbook-toys
|
2017-11-09 08:53:14 +00:00
|
|
|
BuildRequires: pkgconfig
|
2012-01-29 19:49:48 +00:00
|
|
|
BuildRequires: popt-devel
|
2017-11-09 08:53:14 +00:00
|
|
|
BuildRequires: python3-devel
|
2011-08-08 11:48:08 +00:00
|
|
|
BuildRequires: slang-devel
|
2012-07-12 11:07:37 +00:00
|
|
|
BuildRequires: texlive-courier
|
|
|
|
|
BuildRequires: texlive-dvips
|
2012-07-30 15:46:58 +00:00
|
|
|
BuildRequires: texlive-ec
|
2012-07-12 11:07:37 +00:00
|
|
|
BuildRequires: texlive-helvetic
|
|
|
|
|
BuildRequires: texlive-jadetex
|
|
|
|
|
BuildRequires: texlive-times
|
2018-01-09 13:46:12 +00:00
|
|
|
%if %{with python2}
|
2017-11-09 08:53:14 +00:00
|
|
|
BuildRequires: python-devel
|
2017-09-26 08:37:49 +00:00
|
|
|
%endif
|
2007-10-11 20:00:42 +00:00
|
|
|
|
2007-12-18 17:51:42 +00:00
|
|
|
%description
|
2008-09-05 18:30:59 +00:00
|
|
|
Newt is a programming library for color text-mode, widget-based user
|
2007-12-18 17:51:42 +00:00
|
|
|
interfaces. Newt can be used to add stacked windows, entry widgets,
|
2008-09-05 18:30:59 +00:00
|
|
|
checkboxes, radio buttons, labels, plain text fields, scrollbars, etc.,
|
|
|
|
|
to text mode user interfaces.
|
2007-10-11 20:00:42 +00:00
|
|
|
|
2008-09-05 18:30:59 +00:00
|
|
|
This package also contains a Dialog replacement called whiptail. Newt
|
|
|
|
|
is based on the slang library.
|
2007-10-11 20:00:42 +00:00
|
|
|
|
2011-03-17 13:44:19 +00:00
|
|
|
%package -n %{libsoname}
|
2007-12-18 17:51:42 +00:00
|
|
|
Summary: Shared libraries for Nifty Erik's Windowing Toolkit
|
2012-02-01 10:31:18 +00:00
|
|
|
License: LGPL-2.1+
|
2007-10-11 20:00:42 +00:00
|
|
|
Group: System/Libraries
|
2007-12-18 17:51:42 +00:00
|
|
|
|
2011-03-17 13:44:19 +00:00
|
|
|
%description -n %{libsoname}
|
2007-12-18 17:51:42 +00:00
|
|
|
This package contains the shared libraries needed by programs built
|
|
|
|
|
with newt.
|
2006-12-21 15:29:33 +00:00
|
|
|
|
|
|
|
|
Newt is a programming library for color text-mode widget-based user
|
|
|
|
|
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.
|
|
|
|
|
|
2007-12-18 17:51:42 +00:00
|
|
|
%package devel
|
|
|
|
|
Summary: Development files for the Newt windowing toolkit
|
2012-02-01 10:31:18 +00:00
|
|
|
License: LGPL-2.1+
|
2010-01-14 17:26:05 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2011-03-17 13:44:19 +00:00
|
|
|
Requires: %{libsoname} = %{version}
|
2012-07-12 11:07:37 +00:00
|
|
|
Requires: popt-devel
|
2018-01-09 13:46:12 +00:00
|
|
|
Requires: python3-devel
|
2008-04-08 22:38:42 +00:00
|
|
|
Requires: slang-devel
|
2011-03-17 13:44:19 +00:00
|
|
|
Recommends: %{name} = %{version}
|
2007-12-18 17:51:42 +00:00
|
|
|
|
2006-12-21 15:29:33 +00:00
|
|
|
%description devel
|
|
|
|
|
This package contains the header files and libraries necessary for
|
|
|
|
|
developing applications which use newt.
|
|
|
|
|
|
|
|
|
|
Newt is a development library for text mode user interfaces.
|
|
|
|
|
|
|
|
|
|
Install newt-devel if you want to develop applications which depend on
|
|
|
|
|
newt.
|
|
|
|
|
|
2007-12-18 17:51:42 +00:00
|
|
|
%package doc
|
|
|
|
|
Summary: Tutorial for Nifty Erik's Windowing Toolkit
|
2017-07-03 15:25:35 +00:00
|
|
|
# the examples need the main package:
|
2012-02-01 10:31:18 +00:00
|
|
|
License: LGPL-2.1+
|
2007-12-18 17:51:42 +00:00
|
|
|
Group: Documentation/Howto
|
2012-02-01 11:06:46 +00:00
|
|
|
Recommends: %{name} = %{version}
|
2015-03-01 09:41:00 +00:00
|
|
|
BuildArch: noarch
|
2007-12-18 17:51:42 +00:00
|
|
|
|
2007-06-28 17:36:00 +00:00
|
|
|
%description doc
|
|
|
|
|
This package contains a tutorial about the Newt windowing toolkit.
|
|
|
|
|
|
2008-09-05 18:30:59 +00:00
|
|
|
Newt is a programming library for color text-mode, widget-based user
|
2007-06-28 17:36:00 +00:00
|
|
|
interfaces. Newt can be used to add stacked windows, entry widgets,
|
|
|
|
|
check boxes, radio buttons, labels, plain text fields, scrollbars,
|
2008-09-05 18:30:59 +00:00
|
|
|
etc., to text mode user interfaces. Newt is based on the slang library.
|
2007-06-28 17:36:00 +00:00
|
|
|
|
2012-01-29 19:49:48 +00:00
|
|
|
%package static
|
2011-03-17 13:44:19 +00:00
|
|
|
# Please keep the static package as this is requested by another
|
|
|
|
|
# vendor for his tool. It shouldn't be a problem to keep this
|
|
|
|
|
# special package. (lrupp)
|
2007-12-18 17:51:42 +00:00
|
|
|
Summary: Static libraries of Nifty Erik's Windowing Toolkit
|
2012-02-01 10:31:18 +00:00
|
|
|
License: LGPL-2.1+
|
2007-12-18 17:51:42 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2011-03-17 13:44:19 +00:00
|
|
|
Requires: %{name}-devel = %{version}
|
2007-12-18 17:51:42 +00:00
|
|
|
|
2007-03-07 22:15:32 +00:00
|
|
|
%description static
|
2008-04-08 22:38:42 +00:00
|
|
|
This package contains the static libraries needed to compile programs
|
2008-09-05 18:30:59 +00:00
|
|
|
based on newt which don't need the shared libraries. Install it if you
|
2011-03-17 13:44:19 +00:00
|
|
|
need to link statically with %{libname}.
|
2007-12-18 17:51:42 +00:00
|
|
|
|
2007-03-07 22:15:32 +00:00
|
|
|
Newt is a programming library for color text-mode widget-based user
|
|
|
|
|
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.
|
|
|
|
|
|
2017-11-09 08:53:14 +00:00
|
|
|
%package -n python2-%{name}
|
2007-12-18 17:51:42 +00:00
|
|
|
Summary: Python bindings for newt
|
2017-11-09 08:53:14 +00:00
|
|
|
License: GPL-2.0 AND GPL-2.0+ AND LGPL-2.1+
|
2017-10-03 14:11:41 +00:00
|
|
|
Group: Development/Languages/Python
|
2010-01-14 17:26:05 +00:00
|
|
|
Requires: %{name} = %{version}
|
2017-11-09 08:53:14 +00:00
|
|
|
Provides: python-%{name} = %{version}
|
|
|
|
|
Obsoletes: python-%{name} < %{version}
|
2010-01-14 17:26:05 +00:00
|
|
|
Provides: %{name}-python = %{version}
|
2011-03-17 13:44:19 +00:00
|
|
|
Obsoletes: %{name}-python < %{version}
|
2007-12-18 17:51:42 +00:00
|
|
|
|
2017-11-09 08:53:14 +00:00
|
|
|
%description -n python2-%{name}
|
2017-09-26 08:37:49 +00:00
|
|
|
The python-newt package contains the Python bindings for the newt
|
2008-09-05 18:30:59 +00:00
|
|
|
library providing a python API for creating text mode interfaces.
|
2007-10-11 20:00:42 +00:00
|
|
|
|
2017-09-26 08:37:49 +00:00
|
|
|
%package -n python3-%{name}
|
|
|
|
|
Summary: Python 3 bindings for newt
|
|
|
|
|
License: LGPL-2.1+
|
2017-10-03 14:11:41 +00:00
|
|
|
Group: Development/Languages/Python
|
2017-09-26 08:37:49 +00:00
|
|
|
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.
|
|
|
|
|
|
2006-12-21 15:29:33 +00:00
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
|
|
%build
|
2007-06-14 13:44:43 +00:00
|
|
|
# gpm support seems to smash the stack
|
|
|
|
|
# --with-gpm-support
|
2008-09-05 18:30:59 +00:00
|
|
|
%configure --without-tcl
|
2007-06-28 17:36:00 +00:00
|
|
|
## make depend
|
2015-03-01 09:41:00 +00:00
|
|
|
make CPPFLAGS="%{optflags} -fPIC" %{?_smp_mflags} all
|
2011-08-08 11:48:08 +00:00
|
|
|
#docbook2txt tutorial.sgml
|
2017-09-26 08:37:49 +00:00
|
|
|
chmod 0644 peanuts.py popcorn.py
|
2006-12-21 15:29:33 +00:00
|
|
|
|
|
|
|
|
%install
|
2018-01-09 13:46:12 +00:00
|
|
|
%if %{with python2}
|
2017-09-26 08:37:49 +00:00
|
|
|
pyversions="python%{py_ver}"
|
2018-01-09 13:46:12 +00:00
|
|
|
%else
|
|
|
|
|
pyversions=""
|
|
|
|
|
%endif
|
2017-09-26 08:37:49 +00:00
|
|
|
pyversions="$pyversions python%{py3_ver}"
|
|
|
|
|
make PYTHONVERS="$pyversions" instroot=%{buildroot} DESTDIR=%{buildroot} install install-sh
|
2006-12-21 15:29:33 +00:00
|
|
|
# currently we don't support these languages
|
2010-01-14 17:26:05 +00:00
|
|
|
for lang in ast bal sr@latin wo; do
|
2015-03-01 09:41:00 +00:00
|
|
|
rm -rf %{buildroot}%{_datadir}/locale/$lang
|
2008-04-08 22:38:42 +00:00
|
|
|
done
|
2011-03-17 13:44:19 +00:00
|
|
|
|
2007-12-18 17:51:42 +00:00
|
|
|
# prepare defaultdocdir with examples and scripts
|
|
|
|
|
#
|
2015-03-01 09:41:00 +00:00
|
|
|
install -d -m 755 %{buildroot}%{_defaultdocdir}/%{name}/examples
|
2007-10-11 20:00:42 +00:00
|
|
|
# install COPYING file
|
2015-03-01 09:41:00 +00:00
|
|
|
install -m 644 COPYING %{buildroot}%{_defaultdocdir}/%{name}/
|
2007-10-11 20:00:42 +00:00
|
|
|
# install example scripts
|
2015-03-01 09:41:00 +00:00
|
|
|
install -m 755 peanuts.py %{buildroot}%{_defaultdocdir}/%{name}/examples/
|
|
|
|
|
install -m 755 popcorn.py %{buildroot}%{_defaultdocdir}/%{name}/examples/
|
2007-12-18 17:51:42 +00:00
|
|
|
#
|
2007-10-11 20:00:42 +00:00
|
|
|
# create tutorial.pdf documentation
|
2007-12-18 17:51:42 +00:00
|
|
|
#
|
2015-03-01 09:41:00 +00:00
|
|
|
install -m 644 tutorial.sgml %{buildroot}%{_defaultdocdir}/%{name}/
|
2010-01-14 17:26:05 +00:00
|
|
|
pushd %{buildroot}%{_defaultdocdir}/%{name}/ 1>/dev/null
|
2007-06-28 17:36:00 +00:00
|
|
|
db2pdf tutorial.sgml
|
2015-03-01 09:41:00 +00:00
|
|
|
rm tutorial.{aux,log,out} CATALOG.* *.dsl
|
2007-06-28 17:36:00 +00:00
|
|
|
popd 1>/dev/null
|
2006-12-21 15:29:33 +00:00
|
|
|
%find_lang %{name}
|
|
|
|
|
|
2018-01-09 13:46:12 +00:00
|
|
|
%if %{with python2}
|
2017-09-26 08:37:49 +00:00
|
|
|
%py_compile %{buildroot}/%{python_sitearch}
|
|
|
|
|
%py_compile -O %{buildroot}/%{python_sitearch}
|
2018-01-09 13:46:12 +00:00
|
|
|
%endif
|
2017-09-26 08:37:49 +00:00
|
|
|
%py3_compile %{buildroot}/%{python3_sitearch}
|
|
|
|
|
%py3_compile -O %{buildroot}/%{python3_sitearch}
|
2018-01-09 13:46:12 +00:00
|
|
|
# pointless examples
|
|
|
|
|
rm %{buildroot}%{_defaultdocdir}/%{name}/examples/*.py
|
2017-09-26 08:37:49 +00:00
|
|
|
|
2011-03-17 13:44:19 +00:00
|
|
|
%post -n %{libsoname} -p /sbin/ldconfig
|
|
|
|
|
%postun -n %{libsoname} -p /sbin/ldconfig
|
2006-12-21 15:29:33 +00:00
|
|
|
|
|
|
|
|
%files -f %{name}.lang
|
2010-01-14 17:26:05 +00:00
|
|
|
%dir %{_defaultdocdir}/%{name}
|
|
|
|
|
%doc %{_defaultdocdir}/%{name}/COPYING
|
2006-12-21 15:29:33 +00:00
|
|
|
%{_bindir}/whiptail
|
|
|
|
|
%{_mandir}/man1/whiptail.1*
|
2011-02-04 19:26:31 +00:00
|
|
|
|
2011-03-17 13:44:19 +00:00
|
|
|
%files -n %{libsoname}
|
|
|
|
|
%{_libdir}/%{libname}.so.*
|
2007-12-18 17:51:42 +00:00
|
|
|
|
2006-12-21 15:29:33 +00:00
|
|
|
%files devel
|
2011-03-17 13:44:19 +00:00
|
|
|
%{_includedir}/%{name}.h
|
|
|
|
|
%{_libdir}/%{libname}.so
|
2010-01-14 17:26:05 +00:00
|
|
|
%{_libdir}/pkgconfig/*.pc
|
2006-12-21 15:29:33 +00:00
|
|
|
|
2007-06-28 17:36:00 +00:00
|
|
|
%files doc
|
2010-01-14 17:26:05 +00:00
|
|
|
%doc %{_defaultdocdir}/%{name}/tutorial.*
|
2007-06-28 17:36:00 +00:00
|
|
|
|
2007-03-07 22:15:32 +00:00
|
|
|
%files static
|
2011-03-17 13:44:19 +00:00
|
|
|
%{_libdir}/%{libname}.a
|
2007-03-07 22:15:32 +00:00
|
|
|
|
2018-01-09 13:46:12 +00:00
|
|
|
%if %{with python2}
|
2017-11-09 08:53:14 +00:00
|
|
|
%files -n python2-%{name}
|
2018-01-09 13:46:12 +00:00
|
|
|
%{python2_sitearch}/*
|
|
|
|
|
%endif
|
2007-12-18 17:51:42 +00:00
|
|
|
|
2017-09-26 08:37:49 +00:00
|
|
|
%files -n python3-%{name}
|
|
|
|
|
%{python3_sitearch}/*.so
|
|
|
|
|
%{python3_sitearch}/*.py*
|
|
|
|
|
%{python3_sitearch}/__pycache__/*.py*
|
|
|
|
|
|
2007-03-07 22:15:32 +00:00
|
|
|
%changelog
|