99d0ba9918
- boo#1096706 requirement for postgres96 fixed copyright to log file added - Version 4.2.11 - Bugfix Release - requires postgres96, otherwise trytond-admin fails (Leap 15) - Version 4.2.10 - Bugfix Release - user_login.patch replaced by trytond_get_login.patch see boo#1078111 - Version 4.2.9 - Bugfix Release - Version 4.2.8 - Bugfix Release - Version 4.2.7 - Bugfix Release - Documentation updated - Version 4.2.6 bugfix release typo in trytond.conf removed - default setting for database access in trytond.conf - Version 4.2.5 - Patch for user login user_login.patch from GNU Health 3.20 applied trytond_server.diff removed as not needed anymore - Version 4.2.4 - Version 4.2.3 - Version 4.2.2 - Version 4.2.1 - Tryton Release 4.2 - Update description - Add missing %service_add_pre and convert open-coded other three scriptlets to %service_*. - version 4.0.2 - Tryton Release 4.0 - patch for security vulnerability applied, see https://savannah.gnu.org/forum/forum.php?forum_id=8482 - Installation of sao (webfrontend) documented - Tryton Release 3.8 - version 3.6.1 * clean up of specfile - Tryton Release 3.6 - sample file for confirguration added (trytond.conf.example) tryton-server.README.SUSE updated - systemd startup file corrected, sample file for log config added - added trytond.conf - version 3.4 - new branch 3.0, added python-sql - Tryton 3.0, spec file adapted * - new spec with regard to systemd - setup of user tryton if not existing * - packaged tryton version 1.0.3 using the buildservice spec file wizard OBS-URL: https://build.opensuse.org/request/show/615204 OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=19
140 lines
4.4 KiB
RPMSpec
140 lines
4.4 KiB
RPMSpec
#
|
|
# spec file for package trytond
|
|
#
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
# Copyright (c) 2015, 2016 Dr. Axel Braun
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%define majorver 4.2
|
|
%define base_name tryton
|
|
Name: trytond
|
|
Version: %{majorver}.11
|
|
Release: 0
|
|
|
|
Summary: An Enterprise Resource Planning (ERP) system
|
|
License: GPL-3.0-or-later
|
|
Group: Productivity/Office/Management
|
|
Url: http://www.tryton.org/
|
|
Source0: http://downloads.tryton.org/%{majorver}/%{name}-%{version}.tar.gz
|
|
#Patch0: trytond340.patch
|
|
Source1: tryton-server.README.SUSE
|
|
Source2: trytond.conf.example
|
|
Source3: %{name}.conf
|
|
Source4: %{name}_log.conf
|
|
# GNU Health patch for user login
|
|
Patch0: trytond_get_login.patch
|
|
Source20: %{name}.service
|
|
# List of additional build dependencies
|
|
BuildRequires: fdupes
|
|
BuildRequires: python3-Werkzeug
|
|
BuildRequires: python3-bcrypt
|
|
BuildRequires: python3-lxml
|
|
BuildRequires: python3-psycopg2
|
|
BuildRequires: python3-pydot3
|
|
BuildRequires: python3-python-sql
|
|
BuildRequires: python3-setuptools
|
|
#BuildRequires: python3-simplejson
|
|
BuildRequires: python3-wrapt
|
|
BuildRequires: systemd-rpm-macros
|
|
Requires: postgresql96-server
|
|
Requires: python3-Genshi
|
|
Requires: python3-lxml
|
|
Requires: python3-psycopg2
|
|
Requires: libreoffice-pyuno
|
|
Requires: python3-Levenshtein
|
|
Requires: python3-dateutil
|
|
Requires: python3-polib
|
|
Requires: python3-python-sql
|
|
Requires: python3-relatorio
|
|
Requires: unoconv
|
|
Requires: python3-Sphinx
|
|
Requires: python3-Werkzeug
|
|
Requires: python3-bcrypt
|
|
Requires: python3-mock
|
|
Requires: python3-simpleeval
|
|
Requires: python3-wrapt
|
|
Requires(pre): /usr/sbin/groupadd
|
|
Requires(pre): /usr/sbin/useradd
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildArch: noarch
|
|
|
|
Conflicts: postgresql10-server
|
|
Conflicts: postgresql10
|
|
|
|
%{?systemd_requires}
|
|
|
|
%description
|
|
This package contains the server of the Tryton application platform,
|
|
the latter of which is a three-tier high-level general purpose
|
|
application platform written in Python, using Postgresql as the
|
|
database engine. Tryton provides modularity, scalability and
|
|
security.
|
|
|
|
%prep
|
|
%setup -q
|
|
cp %{S:1} .
|
|
cp %{S:2} .
|
|
%patch0 -p0
|
|
|
|
%build
|
|
python3 setup.py build
|
|
|
|
%install
|
|
python3 setup.py install --prefix=%_prefix --root=%buildroot --record-rpm=filelist
|
|
# only for systemd
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{base_name}
|
|
install -p -m 640 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{base_name}/%{name}.conf
|
|
install -p -m 640 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{base_name}/%{name}_log.conf
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
|
install -p -m 644 %{SOURCE20} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{lib,log}/%{base_name}
|
|
%fdupes -s %{buildroot}
|
|
|
|
%pre
|
|
getent group tryton > /dev/null || %{_sbindir}/groupadd -r tryton
|
|
getent passwd tryton > /dev/null || %{_sbindir}/useradd -r -g tryton \
|
|
-d %{_localstatedir}/lib/%{name} -s /sbin/nologin \
|
|
-c 'Tryton ERP' tryton
|
|
%service_add_pre trytond.service
|
|
|
|
%post
|
|
%service_add_post trytond.service
|
|
##update-alternatives --set postgresql /usr/lib/postgresql96
|
|
|
|
%preun
|
|
%service_del_preun trytond.service
|
|
|
|
%postun
|
|
%service_del_postun trytond.service
|
|
|
|
%files
|
|
#%files -f filelist
|
|
%defattr(-,root,root)
|
|
%doc README tryton-server.README.SUSE trytond.conf.example LICENSE doc/*
|
|
%{python3_sitelib}/*
|
|
%dir %{_sysconfdir}/%{base_name}
|
|
%{_bindir}/%{name}
|
|
%{_bindir}/%{name}-admin
|
|
%{_bindir}/%{name}-cron
|
|
%{_unitdir}/%{name}.service
|
|
%attr(640,root,tryton) %config(noreplace)%{_sysconfdir}/%{base_name}/%{name}.conf
|
|
%attr(640,root,tryton) %config(noreplace)%{_sysconfdir}/%{base_name}/%{name}_log.conf
|
|
%attr(755,tryton,tryton) %dir %{_localstatedir}/lib/%{base_name}
|
|
%attr(755,tryton,tryton) %dir %{_localstatedir}/log/%{base_name}
|
|
|
|
%changelog
|