222 lines
6.7 KiB
RPMSpec
222 lines
6.7 KiB
RPMSpec
#
|
|
# spec file for package newt
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
|
|
Name: newt
|
|
%define libname lib%{name}
|
|
%define libsoname %{libname}0_52
|
|
|
|
Summary: A library for text mode user interfaces
|
|
Version: 0.52.13
|
|
Release: 1
|
|
License: LGPLv2.1+
|
|
Group: System/Libraries
|
|
Url: https://fedorahosted.org/newt/
|
|
Source: %{name}-%{version}.tar.bz2
|
|
Source2: baselibs.conf
|
|
Source10: %{name}-rpmlintrc
|
|
Patch0: newt-0.52.13-python_version.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: pkg-config
|
|
BuildRequires: popt-devel
|
|
BuildRequires: python-devel
|
|
BuildRequires: slang-devel
|
|
%if 0%{?suse_version} < 1020
|
|
BuildRequires: libpng-devel
|
|
%endif
|
|
# needed for tutorial.pdf
|
|
BuildRequires: docbook-toys
|
|
%if 0%{?sles_version} == 9
|
|
BuildRequires: jadetex
|
|
%endif
|
|
|
|
%description
|
|
Newt is a programming library for color text-mode, widget-based user
|
|
interfaces. Newt can be used to add stacked windows, entry widgets,
|
|
checkboxes, radio buttons, labels, plain text fields, scrollbars, etc.,
|
|
to text mode user interfaces.
|
|
|
|
This package also contains a Dialog replacement called whiptail. Newt
|
|
is based on the slang library.
|
|
|
|
%package -n %{libsoname}
|
|
|
|
License: LGPLv2.1+
|
|
Summary: Shared libraries for Nifty Erik's Windowing Toolkit
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libsoname}
|
|
This package contains the shared libraries needed by programs built
|
|
with newt.
|
|
|
|
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.
|
|
|
|
%package devel
|
|
License: LGPLv2.1+
|
|
Summary: Development files for the Newt windowing toolkit
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{libsoname} = %{version}
|
|
Requires: python-devel
|
|
Requires: slang-devel
|
|
Requires: popt-devel
|
|
Recommends: %{name} = %{version}
|
|
|
|
%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.
|
|
|
|
%package doc
|
|
License: LGPLv2.1+
|
|
Summary: Tutorial for Nifty Erik's Windowing Toolkit
|
|
Group: Documentation/Howto
|
|
|
|
%description doc
|
|
This package contains a tutorial about the Newt windowing toolkit.
|
|
|
|
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. Newt is based on the slang library.
|
|
|
|
# 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)
|
|
%package static
|
|
License: LGPLv2.1+
|
|
Summary: Static libraries of Nifty Erik's Windowing Toolkit
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{name}-devel = %{version}
|
|
|
|
%description static
|
|
This package contains the static libraries needed to compile programs
|
|
based on newt which don't need the shared libraries. Install it if you
|
|
need to link statically with %{libname}.
|
|
|
|
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.
|
|
|
|
%package -n python-%{name}
|
|
|
|
|
|
License: GPLv2 ; GPLv2+ ; LGPLv2.1+
|
|
Summary: Python bindings for newt
|
|
Group: System/Libraries
|
|
Requires: %{name} = %{version}
|
|
Provides: %{name}-python = %{version}
|
|
Obsoletes: %{name}-python < %{version}
|
|
%{py_requires}
|
|
|
|
%description -n python-%{name}
|
|
The newt-python package contains the Python bindings for the newt
|
|
library providing a python API for creating text mode interfaces.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0 -p1
|
|
|
|
%build
|
|
# gpm support seems to smash the stack
|
|
# --with-gpm-support
|
|
%configure --without-tcl
|
|
## make depend
|
|
%{__make} CPPFLAGS="%{optflags}" %{?_smp_mflags} all
|
|
#docbook2txt tutorial.sgml
|
|
|
|
%install
|
|
%{__make} PYTHONVERS="python%{py_ver}" instroot="%{buildroot}" DESTDIR="%{buildroot}" install install-sh
|
|
# currently we don't support these languages
|
|
# FIXME: add to filesystem
|
|
## and rpmlint
|
|
# invalid-lc-messages-dir /usr/share/locale/ast/
|
|
for lang in ast bal sr@latin wo; do
|
|
%{__rm} -rf %{buildroot}%{_datadir}/locale/$lang
|
|
done
|
|
|
|
# prepare defaultdocdir with examples and scripts
|
|
#
|
|
%{__install} -d -m 755 %{buildroot}%{_defaultdocdir}/%{name}/examples
|
|
# install COPYING file
|
|
%{__install} -m 644 COPYING %{buildroot}%{_defaultdocdir}/%{name}/
|
|
# install example scripts
|
|
%{__install} -m 755 peanuts.py %{buildroot}%{_defaultdocdir}/%{name}/examples/
|
|
%{__install} -m 755 popcorn.py %{buildroot}%{_defaultdocdir}/%{name}/examples/
|
|
#
|
|
# create tutorial.pdf documentation
|
|
#
|
|
%{__install} -m 644 tutorial.sgml %{buildroot}%{_defaultdocdir}/%{name}/
|
|
pushd %{buildroot}%{_defaultdocdir}/%{name}/ 1>/dev/null
|
|
db2pdf tutorial.sgml
|
|
%{__rm} tutorial.{aux,log,out} CATALOG.* *.dsl
|
|
popd 1>/dev/null
|
|
%find_lang %{name}
|
|
|
|
%post -n %{libsoname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libsoname} -p /sbin/ldconfig
|
|
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
%files -f %{name}.lang
|
|
%defattr (-,root,root)
|
|
%dir %{_defaultdocdir}/%{name}
|
|
%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}
|
|
%defattr (-,root,root)
|
|
%{_libdir}/%{libname}.so.*
|
|
|
|
%files devel
|
|
%defattr (-,root,root)
|
|
%{_includedir}/%{name}.h
|
|
%{_libdir}/%{libname}.so
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%files doc
|
|
%defattr (-,root,root)
|
|
%doc %{_defaultdocdir}/%{name}/tutorial.*
|
|
|
|
%files static
|
|
%defattr (-,root,root)
|
|
%{_libdir}/%{libname}.a
|
|
|
|
%files -n python-%{name}
|
|
%defattr(-,root,root)
|
|
%dir %{_defaultdocdir}/%{name}/examples
|
|
%doc %{_defaultdocdir}/%{name}/examples/*.py
|
|
%{py_sitedir}/*
|
|
|
|
%changelog
|