File stoq.spec of Package stoq
#
# spec file for package stoq
#
# Copyright (c) 2016 SUSE LINUX 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: stoq
Version: 1.7.0
Release: 0
Summary: A powerful retail system
License: GPL-2.0 and LGPL-2.1
Group: Development/Languages/Python
Url: http://www.stoq.com.br
Source: http://pypi.python.org/packages/source/s/stoq/stoq-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-kiwi-gtk >= 1.9.38
BuildRequires: python-setuptools
Requires: iso-codes >= 3.12
Requires: postgresql
Requires: python-Mako >= 0.2.5
Requires: python-Twisted >= 10.0
Requires: python-WeasyPrint >= 0.15
Requires: python-cairo >= 1.8.2
Requires: python-gudev
Requires: python-imaging >= 1.1.5
Requires: python-kiwi-gtk >= 1.9.38
Requires: python-poppler >= 0.12.1
Requires: python-psycopg2 >= 2.0.5
Requires: python-python-dateutil >= 1.4.1
Requires: python-reportlab >= 2.4
Requires: python-stoqdrivers >= 0.9.19
Requires: python-storm-postgresql >= 0.19
Requires: python-webkitgtk >= 1.1.7
Requires: python-xlwt >= 0.7.2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%else
BuildArch: noarch
%endif
%description
Stoq is an advanced retails system which has as main goals the
usability, good devices support, and useful features for retails.
%prep
%setup -q -n stoq-%{version}
sed -i -e 's|share/doc/stoq|share/doc/packages/%{name}|' setup.py
%build
mkdir external
python setup.py build
# Fix wrong-file-end-of-line-encoding
sed -i 's|\r||' docs/copyright README
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%{__install} -d %{buildroot}%{_sysconfdir}/%{name}
%{find_lang} stoq
%files -f stoq.lang
%defattr(-,root,root,-)
%exclude %{_datadir}/doc
%doc AUTHORS CONTRIBUTORS COPYING* README docs/copyright
%attr(644,root,root) %config %{_datadir}/polkit-1/actions/br.com.stoq.createdatabase.policy
%{_bindir}/%{name}*
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_prefix}/lib/stoqlib
%{python_sitelib}/*
%dir %{_sysconfdir}/%{name}
%dir %{_datadir}/gnome
%dir %{_datadir}/gnome/help
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions
%changelog