File newt.spec of Package newt

#
# spec file for package newt (Version 0.52.7)
#
# Copyright (c) 2009 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/
#

# norootforbuild


Name:           newt
Url:            ftp://download.fedora.redhat.com/pub/fedora/linux/development/source/SRPMS/newt-0.52.7-1.fc8.src.rpm
Summary:        Nifty Erik's Windowing Toolkit
Version:        0.52.7
Release:        36.<RELEASE1>
License:        LGPL v2.1 or later
Group:          System/Libraries
Source:         %{name}-%{version}.tar.bz2
Source10:       %name-rpmlintrc
Patch1:         newt-CVE-2009-2905.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel slang-devel
# needed for tutorial.pdf
BuildRequires:  docbook-toys
%{py_requires}
####################
# Distribution parts
####################
#
# SUSE
#
%if 0%{?suse_version}
BuildRequires:  popt-devel
%endif
#
# Mandriva
#
%if 0%{?mandriva_version}
BuildRequires:  popt-devel
%endif
#

%package devel
License:        LGPL v2.1 or later
Summary:        Development files for the Newt windowing toolkit
Provides:       newtd = %{version}
Requires:       newt = %{version}
Requires:       python
Requires:       slang-devel %{name} = %{version}
Group:          Development/Libraries/C and C++
Obsoletes:      newtd <= %{version}
#

%package doc
License:        LGPL v2.1 or later
Summary:        Tutorial for Nifty Erik's Windowing Toolkit
Group:          Documentation/Howto
#

%package static
License:        LGPL v2.1 or later
Summary:        Nifty Erik's Windowing Toolkit
Requires:       newt-devel = %{version}
Group:          Development/Libraries/C and C++

%description
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.

This package also contains the shared library needed by programs built
with newt, as well as a Dialog replacement called whiptail.



Authors:
--------
    Erik Troan <ewt@redhat.com>

%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.



Authors:
--------
    Erik Troan <ewt@redhat.com>

%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.



Authors:
--------
    Erik Troan <ewt@redhat.com>

%description static
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.

This package also contains the shared library needed by programs built
with newt, as well as a Dialog replacement called whiptail.



Authors:
--------
    Erik Troan <ewt@redhat.com>

%prep
%setup -q
%patch1 -p0

%build
export CFLAGS="$RPM_OPT_FLAGS -fPIC -Wall -fno-strict-aliasing"
%configure --without-tcl
# gpm support seems to smash the stack
# --with-gpm-support
## make depend
make PYTHONVERS=python%{py_ver} %{?_smp_mflags}
make shared PYTHONVERS=python%{py_ver} 

%install
make instroot=%buildroot install PYTHONVERS=python%{py_ver}
make instroot=%buildroot install-sh PYTHONVERS=python%{py_ver}
# currently we don't support these languages
for lang in dz mg tl wo; do
  rm -rf %buildroot%_datadir/locale/$lang
done
# install documentation 
install -d -m 755 %buildroot/%_defaultdocdir/%name
for i in peanuts.py popcorn.py tutorial.sgml COPYING; do
	install -m 644 %_builddir/%name-%version/$i %buildroot/%_defaultdocdir/%name/
done
pushd %buildroot/%_defaultdocdir/%name/ 1>/dev/null
db2pdf tutorial.sgml
rm tutorial.{aux,log,out} CATALOG.* *.dsl
popd 1>/dev/null
%find_lang %{name}

%clean
rm -rf %buildroot

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang
%defattr (-,root,root)
%dir %_defaultdocdir/%name
%doc %_defaultdocdir/%name/COPYING
%{_bindir}/whiptail
%{_libdir}/libnewt.so.*
%{py_sitedir}/*
%{_mandir}/man1/whiptail.1*

%files devel
%defattr (-,root,root)
%doc %_defaultdocdir/%name/*.py
%{_includedir}/newt.h
%{_libdir}/libnewt.so

%files doc
%defattr (-,root,root)
%doc %_defaultdocdir/%name/tutorial.*

%files static
%defattr (-,root,root)
%{_libdir}/libnewt.a

%changelog
openSUSE Build Service is sponsored by