Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > ca810e0251cadd894e456d5bdf775eec > files > 3

trytond-1.4.7-1.fc13.src.rpm

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%{!?_initddir: %define _initddir %{_initrddir}}

Name:           trytond
Version:        1.4.7
Release:        1%{?dist}
Summary:        Server for the Tryton application framework

Group:          System Environment/Daemons
License:        GPLv3+
URL:            http://www.tryton.org
Source0:        http://downloads.tryton.org/1.4/%{name}-%{version}.tar.gz
Source10:       %{name}.init
Source11:       %{name}.sysconfig
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-devel python-setuptools

Requires:       python-psycopg2 python-lxml python-relatorio mx pydot pytz pyOpenSSL
Requires(pre):  shadow-utils
Requires(post):  chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts

Provides:       tryton(kernel) = 1.4


%description
Tryton is a three-tiers high-level general purpose application framework
written in Python and use PostgreSQL as database engine. It is the core base
of an Open Source ERP. It provides modularity, scalability and security.

The core of Tryton (also called Tryton kernel) provides all the necessary
functionalities for a complete application framework: data persistence (i.e
an ORM with extensive modularity), users management (authentication, fine
grained control for data access, handling of concurrent access of resources),
workflow and report engines, web services and internationalisation. Thus
constituting a complete application platform which can be used for any
relevant purpose.


%package openoffice
Summary:        OpenOffice.org support for Tryton Server
Group:          System Environment/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       python-openoffice
%if 0%{?rhel}
ExcludeArch:    ppc
%endif

%description openoffice
OpenOffice.org support for Tryton Server.


%package webdav
Summary:        WebDAV support for Tryton Server
Group:          System Environment/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pywebdav

%description webdav
WebDAV support for Tryton Server.


%prep
%setup -q

# remove the shebang line
sed -i -e '1d' trytond/tests/test_tryton.py


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
install -p -m 640 etc/%{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}

mkdir -p $RPM_BUILD_ROOT%{_initddir}
install -p -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_initddir}/%{name}

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}

mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{lib,log}/%{name}


%clean
rm -rf $RPM_BUILD_ROOT


%pre
getent group tryton > /dev/null || /usr/sbin/groupadd -r tryton
getent passwd tryton > /dev/null || /usr/sbin/useradd -r -g tryton \
       -d %{_localstatedir}/lib/%{name} -s /sbin/nologin tryton
:

%post
/sbin/chkconfig --add %{name} || :

%preun
if [ "$1" -eq 0 ]; then
        /sbin/service %{name} stop &> /dev/null
        /sbin/chkconfig --del %{name}
fi
:

%postun
if [ "$1" -ge 1 ]; then
        /sbin/service %{name} condrestart &> /dev/null || :
fi


%files
%defattr(-,root,root,-)
%doc CHANGELOG COPYRIGHT INSTALL LICENSE README TODO
%{_initddir}/%{name}
%attr(0640,tryton,tryton) %config(noreplace) %{_sysconfdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_bindir}/%{name}
%{python_sitelib}/*
%attr(0750,tryton,tryton) %{_localstatedir}/lib/%{name}
%attr(0750,tryton,tryton) %{_localstatedir}/log/%{name}

%files openoffice
%defattr(-,root,root,-)

%files webdav
%defattr(-,root,root,-)


%changelog
* Sat Nov 13 2010 Dan Horák <dan[at]danny.cz> 1.4.7-1
- update to upstream version 1.4.7

* Thu Apr  1 2010 Dan Horák <dan[at]danny.cz> 1.4.5-1
- update to upstream version 1.4.5

* Fri Feb 19 2010 Dan Horák <dan[at]danny.cz> 1.4.4-1
- update to upstream version 1.4.4

* Thu Dec 10 2009 Dan Horák <dan[at]danny.cz> 1.4.3-1
- update to upstream version 1.4.3

* Sat Nov 28 2009 Dan Horák <dan[at]danny.cz> 1.4.2-1
- update to upstream version 1.4.2

* Wed Oct 21 2009 Dan Horák <dan[at]danny.cz> 1.4.1-1
- update to upstream version 1.4.1

* Mon Aug 31 2009 Dan Horák <dan[at]danny.cz> 1.2.2-1
- update to upstream version 1.2.2

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Jul 10 2009 Dan Horák <dan[at]danny.cz> 1.2.1-1
- update to upstream version 1.2.1

* Fri May 22 2009 Dan Horák <dan[at]danny.cz> 1.2.0-1
- update to upstream version 1.2.0

* Fri Mar  6 2009 Dan Horák <dan[at]danny.cz> 1.0.3-1
- update to upstream version 1.0.3

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Jan 21 2009 Dan Horák <dan[at]danny.cz> 1.0.2-2
- add modular support for webdav

* Thu Jan  8 2009 Dan Horák <dan[at]danny.cz> 1.0.2-1
- modularize the openoffice.org support
- update to upstream version 1.0.2

* Tue Dec  2 2008 Dan Horák <dan[at]danny.cz> 1.0.1-2
- add dependency on python-openoffice

* Mon Dec  1 2008 Dan Horák <dan[at]danny.cz> 1.0.1-1
- update to upstream version 1.0.1

* Fri Nov 28 2008 Dan Horák <dan[at]danny.cz> 1.0.0-2
- keep modules in %%python_sitelib after a discussion with upstream, user
  written and non packaged modules will be symlinked there

* Fri Nov 28 2008 Dan Horák <dan[at]danny.cz> 1.0.0-1
- initial Fedora version