2016-09-23 11:30:38 +02:00
|
|
|
#
|
2016-10-02 00:09:49 +02:00
|
|
|
# spec file for package gnuhealth
|
2016-09-23 11:30:38 +02:00
|
|
|
#
|
2018-01-28 20:32:14 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2018-06-20 15:22:28 +02:00
|
|
|
# Copyright (c) 2014-2018 Dr. Axel Braun
|
2016-09-23 11:30:38 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-11-15 10:30:56 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-10-02 00:09:49 +02:00
|
|
|
#
|
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2018-06-20 15:22:28 +02:00
|
|
|
%define majorver 3.2
|
2016-09-23 11:30:38 +02:00
|
|
|
Name: gnuhealth
|
|
|
|
|
|
|
|
# List of additional build dependencies
|
2017-07-05 23:56:18 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python3-setuptools
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2018-06-20 15:22:28 +02:00
|
|
|
Version: %{majorver}.10
|
2016-10-02 00:09:49 +02:00
|
|
|
Release: 0
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2016-10-02 00:09:49 +02:00
|
|
|
Url: http://health.gnu.org
|
|
|
|
Source: http://ftp.gnu.org/gnu/health/%{name}-%{version}.tar.gz
|
2017-07-05 23:56:18 +02:00
|
|
|
#Source: %{name}-%{version}.tar.gz
|
2016-10-02 00:09:49 +02:00
|
|
|
Source1: GNUHealth.README.SUSE
|
2017-03-02 19:36:56 +01:00
|
|
|
Source2: gnuhealth-control
|
2017-07-05 23:56:18 +02:00
|
|
|
Source3: gnuhealth.service
|
2017-08-18 15:03:55 +02:00
|
|
|
Source4: gnuhealth-webdav@.service
|
2018-06-20 11:28:00 +02:00
|
|
|
Source5: openSUSE-gnuhealth-setup
|
2018-08-27 16:08:26 +02:00
|
|
|
Source6: gnuhealth
|
2016-09-23 11:30:38 +02:00
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
Summary: A Health and Hospital Information System
|
2018-06-20 11:18:47 +02:00
|
|
|
License: GPL-3.0-or-later
|
2016-10-02 00:09:49 +02:00
|
|
|
Group: Productivity/Office/Management
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2016-10-02 00:09:49 +02:00
|
|
|
Requires: proteus
|
2017-07-05 23:56:18 +02:00
|
|
|
Requires: python3-PyWebDAV3-GNUHealth
|
|
|
|
Requires: python3-caldav
|
|
|
|
Requires: python3-cracklib
|
|
|
|
Requires: python3-hl7apy
|
|
|
|
Requires: python3-ldap3
|
|
|
|
Requires: python3-polib
|
|
|
|
Requires: python3-pyBarcode
|
|
|
|
Requires: python3-qrcode
|
|
|
|
Requires: python3-simpleeval
|
|
|
|
Requires: python3-six
|
|
|
|
Requires: python3-vobject
|
2016-10-02 00:09:49 +02:00
|
|
|
Requires: trytond
|
|
|
|
Requires: trytond_account
|
|
|
|
Requires: trytond_account_invoice
|
|
|
|
Requires: trytond_account_invoice_stock
|
|
|
|
Requires: trytond_account_product
|
|
|
|
Requires: trytond_calendar
|
|
|
|
Requires: trytond_company
|
|
|
|
Requires: trytond_country
|
|
|
|
Requires: trytond_currency
|
|
|
|
Requires: trytond_party
|
|
|
|
Requires: trytond_product
|
|
|
|
Requires: trytond_purchase
|
2017-07-05 23:56:18 +02:00
|
|
|
Requires: trytond_purchase_request
|
2016-10-02 00:09:49 +02:00
|
|
|
Requires: trytond_stock
|
|
|
|
Requires: trytond_stock_lot
|
|
|
|
Requires: trytond_stock_supply
|
2016-09-23 11:30:38 +02:00
|
|
|
|
|
|
|
# additional suggestion for a useable editor
|
2016-10-02 00:09:49 +02:00
|
|
|
Suggests: nano
|
2016-10-20 23:09:39 +02:00
|
|
|
# you may need a frontend to work with
|
2018-06-20 15:22:28 +02:00
|
|
|
Suggests: gnuhealth-client
|
2016-09-23 11:30:38 +02:00
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
GNU Health is the Hospital Information System adopted by the United
|
|
|
|
Nations University, International Institute for Global Health, for
|
|
|
|
the implementations and trainings.
|
|
|
|
|
2016-10-20 23:09:39 +02:00
|
|
|
This is the server component of GNU Health.
|
2018-11-04 17:08:43 +01:00
|
|
|
You would need the GNU Health Client as well, on the same or a different machine. You may use the Tryton Client either
|
2016-10-20 23:09:39 +02:00
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
#%patch0 -p1
|
|
|
|
cp %{S:1} .
|
|
|
|
cp %{S:2} .
|
|
|
|
|
|
|
|
%build
|
|
|
|
for i in h*; do
|
|
|
|
cd $i
|
2017-07-05 23:56:18 +02:00
|
|
|
python3 setup.py build
|
2016-09-23 11:30:38 +02:00
|
|
|
cd ..
|
|
|
|
done
|
2017-07-05 23:56:18 +02:00
|
|
|
for i in try*; do
|
|
|
|
cd $i
|
|
|
|
python3 setup.py build
|
|
|
|
cd ..
|
|
|
|
done
|
2016-10-02 00:09:49 +02:00
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
%install
|
|
|
|
for i in h*; do
|
|
|
|
cd $i
|
2017-07-05 23:56:18 +02:00
|
|
|
python3 setup.py install --prefix=%_prefix --root=%buildroot
|
2016-09-23 11:30:38 +02:00
|
|
|
cd ..
|
|
|
|
done
|
2017-07-05 23:56:18 +02:00
|
|
|
for i in try*; do
|
|
|
|
cd $i
|
|
|
|
python3 setup.py install --prefix=%_prefix --root=%buildroot
|
|
|
|
cd ..
|
|
|
|
done
|
2016-10-02 00:09:49 +02:00
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
mkdir -p -m 755 %{buildroot}%{_bindir}
|
|
|
|
install -p -m 755 gnuhealth-control %{buildroot}%{_bindir}/gnuhealth-control
|
2018-07-19 15:11:08 +02:00
|
|
|
install -p -m 755 %{S:5} %{buildroot}%{_bindir}/openSUSE-gnuhealth-setup
|
2018-08-27 16:08:26 +02:00
|
|
|
install -p -m 755 %{S:6} %{buildroot}%{_bindir}/gnuhealth
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2017-07-05 23:56:18 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
|
|
|
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
2017-08-18 15:03:55 +02:00
|
|
|
install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir}/%{name}-webdav@.service
|
2017-07-05 23:56:18 +02:00
|
|
|
|
|
|
|
%fdupes -s %{buildroot}
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2017-07-05 23:56:18 +02:00
|
|
|
%pre
|
2016-09-23 11:30:38 +02:00
|
|
|
#Write environment changes to /etc/bash.bashrc.local
|
|
|
|
cat > /etc/bash.bashrc.local << "EOF"
|
2017-08-18 15:03:55 +02:00
|
|
|
alias cdlogs='cd /var/log/tryton'
|
|
|
|
alias cdexe='cd $(ls -d /usr/lib/python3.* )/site-packages/trytond'
|
2016-09-23 11:30:38 +02:00
|
|
|
alias cdconf='cd /etc/tryton'
|
2017-08-18 15:03:55 +02:00
|
|
|
alias cdmods='cd $(ls -d /usr/lib/python3.* )/site-packages/trytond/modules'
|
2016-09-23 11:30:38 +02:00
|
|
|
alias editconf='${EDITOR} /etc/tryton/trytond.conf'
|
2017-08-18 15:03:55 +02:00
|
|
|
alias cdutil='cd /usr/bin'
|
2016-09-23 11:30:38 +02:00
|
|
|
EOF
|
|
|
|
|
2017-07-05 23:56:18 +02:00
|
|
|
%service_add_pre gnuhealth.service
|
2017-08-18 15:03:55 +02:00
|
|
|
%service_add_pre gnuhealth-webdav@.service
|
2017-07-05 23:56:18 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post gnuhealth.service
|
2017-08-18 15:03:55 +02:00
|
|
|
%service_add_post gnuhealth-webdav@.service
|
2017-07-05 23:56:18 +02:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun gnuhealth.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun gnuhealth.service
|
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
%files
|
|
|
|
%defattr(744,root,root)
|
|
|
|
%{_bindir}/gnuhealth-control
|
2018-07-19 15:11:08 +02:00
|
|
|
%{_bindir}/openSUSE-gnuhealth-setup
|
2017-07-05 23:56:18 +02:00
|
|
|
%{_unitdir}/%{name}.service
|
2017-08-18 15:03:55 +02:00
|
|
|
%{_unitdir}/%{name}-webdav@.service
|
2016-09-23 11:30:38 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README Changelog COPYING gnuhealth-setup version gnuhealthrc GNUHealth.README.SUSE scripts/* backend/* config/* doc/*
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|