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
|
|
|
#
|
2020-02-27 20:14:26 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
|
|
|
# Copyright (c) 2014-2020 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
|
|
|
|
2019-11-29 15:18:47 +01:00
|
|
|
%define t_version %(rpm -q --qf '%%{VERSION}' trytond)
|
|
|
|
%define majorver 3.6
|
2016-09-23 11:30:38 +02:00
|
|
|
Name: gnuhealth
|
|
|
|
|
2020-05-16 18:35:48 +02:00
|
|
|
Version: %{majorver}.4
|
2018-12-28 15:01:07 +01:00
|
|
|
Release: 0
|
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
# List of additional build dependencies
|
2020-02-29 16:17:48 +01:00
|
|
|
BuildRequires: fdupes
|
2019-11-29 15:18:47 +01:00
|
|
|
BuildRequires: python3-rpm-macros
|
2017-07-05 23:56:18 +02:00
|
|
|
BuildRequires: python3-setuptools
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2018-12-28 15:01:07 +01:00
|
|
|
# For the variables:
|
|
|
|
BuildRequires: trytond
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2019-11-29 15:18:47 +01:00
|
|
|
URL: http://health.gnu.org
|
2020-03-31 18:09:56 +02:00
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
###http://ftp.gnu.org/gnu/health/%{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
|
2020-03-31 18:09:56 +02:00
|
|
|
Source7: gnuhealth-rpmlintrc
|
2020-02-27 20:14:26 +01:00
|
|
|
Patch0: shebang.diff
|
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
|
|
|
|
2019-03-01 13:38:25 +01:00
|
|
|
Requires: bsdtar
|
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-hl7apy
|
|
|
|
Requires: python3-ldap3
|
2020-05-18 10:57:41 +02:00
|
|
|
Requires: python3-matplotlib
|
2019-11-29 15:18:47 +01:00
|
|
|
Requires: python3-passlib
|
2017-07-05 23:56:18 +02:00
|
|
|
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_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
|
|
|
|
2019-11-29 15:18:47 +01:00
|
|
|
%package -n %{name}-orthanc
|
|
|
|
Summary: Integration module for Orthanc
|
|
|
|
Group: Productivity/Office/Management
|
|
|
|
Requires: gnuhealth
|
|
|
|
Requires: python3-beren
|
|
|
|
Requires: python3-pendulum
|
|
|
|
|
|
|
|
%description -n %{name}-orthanc
|
|
|
|
This package provides the interface to Orthanc
|
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}
|
2020-02-29 16:17:48 +01:00
|
|
|
%patch0 -p1
|
2016-09-23 11:30:38 +02:00
|
|
|
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
|
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
|
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
|
2019-11-11 19:24:26 +01:00
|
|
|
install -p -m 755 scripts/demo/install_demo_database.sh %{buildroot}%{_bindir}/install_demo_database.sh
|
|
|
|
|
|
|
|
#delete empty demo directory
|
|
|
|
rm -rf scripts/demo
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2020-03-31 18:09:56 +02:00
|
|
|
mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
install -p -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
|
|
|
|
install -p -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}-webdav@.service
|
2017-07-05 23:56:18 +02:00
|
|
|
|
2020-03-31 18:09:56 +02:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/tryton
|
2018-12-28 15:01:07 +01:00
|
|
|
|
2020-03-31 18:09:56 +02:00
|
|
|
#remove double license file:
|
|
|
|
rm backend/fhir/client/COPYING
|
|
|
|
|
2020-04-22 12:09:41 +02:00
|
|
|
#Move FHIR server to examples directory
|
2020-03-31 18:09:56 +02:00
|
|
|
mkdir -p -m 755 %{buildroot}%{_docdir}/%{name}/examples/
|
|
|
|
mv backend/fhir* %{buildroot}%{_docdir}/%{name}/examples/.
|
|
|
|
rmdir backend
|
2020-03-14 16:26:35 +01:00
|
|
|
|
2020-05-18 10:57:41 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}https://search.opensuse.org/
|
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
|
|
|
|
|
2018-12-28 15:01:07 +01:00
|
|
|
#Write GH Variable /etc/tryton/gnuhealthrc
|
|
|
|
cat > /etc/tryton/gnuhealthrc << "EOF"
|
|
|
|
GNUHEALTH_VERSION=%{version}
|
|
|
|
TRYTON_VERSION=%{t_version}
|
|
|
|
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
|
2020-03-31 18:09:56 +02:00
|
|
|
%service_del_preun gnuhealth-webdav@.service
|
2017-07-05 23:56:18 +02:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun gnuhealth.service
|
2020-03-31 18:09:56 +02:00
|
|
|
%service_del_postun gnuhealth-webdav@.service
|
2017-07-05 23:56:18 +02:00
|
|
|
|
2019-11-29 15:18:47 +01:00
|
|
|
%files -n %{name}-orthanc
|
|
|
|
%{python3_sitelib}/%{name}_orthanc*
|
|
|
|
%{python3_sitelib}/trytond/modules/health_orthanc*
|
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
%files
|
2020-04-22 12:09:41 +02:00
|
|
|
%defattr(-,root,root)
|
2020-04-22 12:25:41 +02:00
|
|
|
%{_bindir}/gnuhealth
|
2016-09-23 11:30:38 +02:00
|
|
|
%{_bindir}/gnuhealth-control
|
2020-04-22 12:38:20 +02:00
|
|
|
%{_bindir}/gnuhealth-webdav-server
|
2018-07-19 15:11:08 +02:00
|
|
|
%{_bindir}/openSUSE-gnuhealth-setup
|
2019-11-11 21:37:25 +01:00
|
|
|
%{_bindir}/install_demo_database.sh
|
2017-07-05 23:56:18 +02:00
|
|
|
%{_unitdir}/%{name}.service
|
2017-08-18 15:03:55 +02:00
|
|
|
%{_unitdir}/%{name}-webdav@.service
|
2020-03-31 18:09:56 +02:00
|
|
|
%doc README Changelog gnuhealth-setup version gnuhealthrc GNUHealth.README.SUSE scripts/* config/* doc/*
|
|
|
|
%{_docdir}/%{name}/examples*
|
|
|
|
%dir %{_sysconfdir}/tryton
|
2018-12-28 15:01:07 +01:00
|
|
|
%license COPYING
|
2019-11-29 15:18:47 +01:00
|
|
|
%exclude %{python3_sitelib}/%{name}_orthanc*
|
|
|
|
%exclude %{python3_sitelib}/trytond/modules/health_orthanc*
|
2016-09-23 11:30:38 +02:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|