File python-kiwi.spec of Package python-kiwi
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define modname stoqlib
%define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
%if %is_redhat
%define dist %(cat /etc/redhat-release | cut -d " " -f 1 | tr '[A-Z]' '[a-z]')
%define disttag el
%endif
%if %is_mandrake
%define dist mandrake
%define disttag mdk
%endif
%if %is_suse
%define dist %(cat /etc/SuSE-release | head -n 1 | cut -d " " -f 1)
%define disttag suse
%endif
%if %is_fedora
%define dist fedora
%define disttag f
%endif
%define distver %(release="`rpm -q --queryformat='%{VERSION}' %{dist}-release 2> /dev/null | tr . : | sed s/://g`" ; if test $? != 0 ; then release="" ; fi ; echo "$release")
Name: python-kiwi
Version: 1.9.22
Release: 2.%{disttag}%{distver}.dobem
Summary: Framework for Python GUI applications
Group: Development/Libraries
License: LGPL
URL: http://www.async.com.br/projects/kiwi/
Source0: http://download.gnome.org/sources/kiwi/1.9/kiwi-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%if 0%{?fedora_version} >= 6 || 0%{?rhel_version} >=406 || 0%{?centos_version} >= 406 || 0%{?mandriva_version} >= 2006
BuildRequires: python-devel, pygtk2 >= 2.8, gettext
Requires: pygtk2 >= 2.8
%endif
%if 0%{?sles_version} >= 10 || 0%{?suse_version} >= 1010
BuildRequires: python-devel, python-gtk >= 2.8, gettext
Requires: python-gtk >= 2.8
%endif
%description
Kiwi consists of a set of classes and wrappers for PyGTK that were
developed to provide a sort of framework for applications. Fully
object-oriented, and roughly Smalltalk's MVC, Kiwi provides a simple,
practical way to build forms, windows and widgets that transparently
access and display your object data.
%package gazpacho
Group: Development/Libraries
Summary: Gazpacho integration for kiwi
Requires: python-gazpacho >= 0.6.6, %{name} = %{version}-%{release}
%description gazpacho
This package contains additional files necessary for integration with
Gazpacho glade editor.
%package docs
Group: Documentation
Summary: Documentation related to python-kiwi
Requires: %{name} = %{version}-%{release}
%description docs
This package contains documentation that contains APIs and related materials,
useful for reference when writing software using Kiwi.
%prep
%setup -q -n kiwi-%{version}
sed -i -e 's|share/doc/kiwi|share/doc/%{name}-%{version}|' setup.py
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot} --prefix=%{_prefix}
#%{__rm} -rf %{buildroot}%{_defaultdocdir}
# The install script mis-guesses where gazpacho is installed on
# non-x86 platforms
if [ "%{python_sitearch}" != "%{python_sitelib}" ]; then
mv %{buildroot}%{python_sitearch}/gazpacho \
%{buildroot}%{python_sitelib}/
fi
find %{buildroot} -name '*.egg-info' -print0 | xargs -0 %{__rm} -f
%{find_lang} kiwi
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_datadir}/doc/%{name}-%{version}/AUTHORS
%{_datadir}/doc/%{name}-%{version}/COPYING
%{_datadir}/doc/%{name}-%{version}/ChangeLog
%{_datadir}/doc/%{name}-%{version}/README
%{_datadir}/doc/%{name}-%{version}/NEWS
%{_bindir}/*
%{_datadir}/kiwi
%{python_sitelib}/kiwi
#%{python_sitelib}/*egg-info
%files gazpacho
%defattr(-,root,root,-)
%doc COPYING
%{_datadir}/locale/*/LC_MESSAGES/kiwi.mo
%{python_sitelib}/gazpacho/widgets/*
%{_datadir}/gazpacho/catalogs/*
%{_datadir}/gazpacho/resources/*
%files docs
%defattr(-,root,root,-)
%doc COPYING doc/* examples
%changelog
* Tue Jul 07 2007 Johan Dahlin <jdahlin@async.com.br> 1.9.16-1
- Upstream 1.9.13
* Tue Feb 04 2007 Johan Dahlin <jdahlin@async.com.br> 1.9.14-1
- Version 1.9.14
- Add .mo files
* Tue Feb 04 2007 Johan Dahlin <jdahlin@async.com.br> 1.9.13-1
- Upstream 1.9.13
* Sun Dec 17 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.9.11-1
- Upstream 1.9.11
- Do not manually provide python-abi
- Move docs into a subpackage
- Do a better job with gazpacho dir ownerships
* Sun Sep 03 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.9.9-1
- Version 1.9.9
- Do not ghost
- No more /etc/kiwi
* Wed Jul 12 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.9.8-1
- Fedora Extras rebuild.
* Fri Jul 07 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.9.8-0.4
- Build in slimmer build environments.
* Fri Jun 16 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.9.8-0.3
- Fix the incorrect gazpacho location on x86_64 (we are fully noarch)
* Fri May 19 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.9.8-0.2
- Initial packaging