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
|
|
|
#
|
2023-04-07 22:10:07 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2023-01-09 20:48:32 +01:00
|
|
|
# Copyright (c) 2014-2023 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
|
|
|
#
|
2022-03-23 08:39:11 +01:00
|
|
|
|
|
|
|
|
2023-02-12 16:36:37 +01:00
|
|
|
%bcond_with tests 1
|
2016-10-02 00:09:49 +02:00
|
|
|
|
2022-03-07 15:18:27 +01:00
|
|
|
%define skip_python2 1
|
2019-11-29 15:18:47 +01:00
|
|
|
%define t_version %(rpm -q --qf '%%{VERSION}' trytond)
|
2023-02-12 16:36:37 +01:00
|
|
|
%define majorver 4.2
|
2022-03-07 15:18:27 +01:00
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
Name: gnuhealth
|
|
|
|
|
2023-09-24 21:21:53 +02:00
|
|
|
Version: %{majorver}.3
|
2018-12-28 15:01:07 +01:00
|
|
|
Release: 0
|
2020-05-18 13:43:07 +02:00
|
|
|
URL: https://health.gnu.org
|
2021-02-16 08:41:54 +01:00
|
|
|
Summary: A Health and Hospital Information System
|
|
|
|
License: GPL-3.0-or-later
|
|
|
|
Group: Productivity/Office/Management
|
|
|
|
|
2020-05-18 13:43:07 +02:00
|
|
|
Source0: https://ftp.gnu.org/gnu/health/%{name}-%{version}.tar.gz
|
2022-03-07 15:18:27 +01:00
|
|
|
## Source0: %{name}-%{version}.tar.gz
|
2020-07-21 14:19:32 +02:00
|
|
|
Source1: GNUHealth.README.openSUSE
|
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
|
2021-02-27 17:59:10 +01:00
|
|
|
Source8: https://ftp.gnu.org/gnu/health/%{name}-%{version}.tar.gz.sig
|
|
|
|
Source9: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=health&download=1#/%{name}.keyring
|
2020-02-27 20:14:26 +01:00
|
|
|
Patch0: shebang.diff
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2021-02-16 08:41:54 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-generators
|
2022-03-07 15:18:27 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: python3-pytest
|
2022-03-23 08:39:11 +01:00
|
|
|
BuildRequires: python3-setuptools
|
2022-03-07 15:18:27 +01:00
|
|
|
# For the tests:
|
2021-02-16 08:41:54 +01:00
|
|
|
BuildRequires: trytond
|
2022-03-07 15:18:27 +01:00
|
|
|
BuildRequires: trytond_company
|
|
|
|
BuildRequires: trytond_currency
|
|
|
|
BuildRequires: trytond_party
|
|
|
|
BuildRequires: trytond_product
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2022-03-07 15:18:27 +01:00
|
|
|
# new fonts for the forms:
|
|
|
|
Requires: gnu-free-fonts
|
2021-02-16 10:11:41 +01:00
|
|
|
Requires: bsdtar
|
|
|
|
Requires: proteus
|
2022-03-23 08:39:11 +01:00
|
|
|
Requires: python3-Pillow
|
2021-02-16 10:11:41 +01:00
|
|
|
Requires: python3-PyWebDAV3-GNUHealth
|
|
|
|
Requires: python3-caldav
|
|
|
|
Requires: python3-hl7apy
|
|
|
|
Requires: python3-ldap3
|
|
|
|
Requires: python3-matplotlib
|
|
|
|
Requires: python3-passlib
|
|
|
|
Requires: python3-pyBarcode
|
|
|
|
Requires: python3-qrcode
|
|
|
|
Requires: python3-simpleeval
|
|
|
|
Requires: python3-six
|
|
|
|
Requires: python3-vobject
|
|
|
|
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
|
|
|
|
Requires: trytond_purchase_request
|
|
|
|
Requires: trytond_stock
|
|
|
|
Requires: trytond_stock_lot
|
|
|
|
Requires: trytond_stock_supply
|
2021-02-16 08:41:54 +01:00
|
|
|
BuildArch: noarch
|
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
|
|
|
|
|
2021-02-16 10:11:41 +01:00
|
|
|
%{?systemd_ordering}
|
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
%description
|
|
|
|
GNU Health is the Hospital Information System adopted by the United
|
|
|
|
Nations University, International Institute for Global Health, for
|
|
|
|
the implementations and trainings.
|
|
|
|
|
2021-03-25 16:36:46 +01:00
|
|
|
This is the server component of GNU Health.
|
|
|
|
You would need the GNU Health Client as well, on the same or a different machine.
|
2020-12-22 15:42:57 +01:00
|
|
|
You may use the Tryton Client either
|
|
|
|
See https://en.opensuse.org/GNUHealth_on_openSUSE for instructions
|
|
|
|
|
2019-11-29 15:18:47 +01:00
|
|
|
%package -n %{name}-orthanc
|
|
|
|
Summary: Integration module for Orthanc
|
|
|
|
Group: Productivity/Office/Management
|
|
|
|
Requires: gnuhealth
|
2022-04-02 18:43:46 +02:00
|
|
|
Requires: python3-beren
|
2019-11-29 15:18:47 +01:00
|
|
|
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}
|
2022-06-16 17:57:33 +02:00
|
|
|
%patch0 -p1
|
2016-09-23 11:30:38 +02:00
|
|
|
cp %{S:1} .
|
|
|
|
cp %{S:2} .
|
|
|
|
|
|
|
|
%build
|
|
|
|
for i in h*; do
|
2022-03-07 15:18:27 +01:00
|
|
|
pushd $i
|
2021-02-16 08:41:54 +01:00
|
|
|
%python3_build
|
2022-03-07 15:18:27 +01:00
|
|
|
popd
|
2016-09-23 11:30:38 +02:00
|
|
|
done
|
2016-10-02 00:09:49 +02:00
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
%install
|
|
|
|
for i in h*; do
|
2022-03-07 15:18:27 +01:00
|
|
|
pushd $i
|
2021-03-25 16:36:46 +01:00
|
|
|
%python3_install --prefix=%_prefix --root=%buildroot
|
2022-03-07 15:18:27 +01:00
|
|
|
popd
|
2016-09-23 11:30:38 +02:00
|
|
|
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
|
2023-02-12 16:36:37 +01:00
|
|
|
install -p -m 755 scripts/demodb/install_demo_database.sh %{buildroot}%{_bindir}/install_demo_database.sh
|
2019-11-11 19:24:26 +01:00
|
|
|
|
|
|
|
#delete empty demo directory
|
2023-02-12 16:36:37 +01:00
|
|
|
rm -rf scripts/demodb
|
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:
|
2023-02-12 16:36:37 +01:00
|
|
|
## rm backend/fhir/client/COPYING
|
2020-03-31 18:09:56 +02:00
|
|
|
|
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/
|
2023-02-12 16:36:37 +01:00
|
|
|
mv doc/* %{buildroot}%{_docdir}/%{name}/examples/.
|
|
|
|
rmdir doc
|
2020-03-14 16:26:35 +01:00
|
|
|
|
2020-05-18 13:36:47 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2022-03-07 15:18:27 +01:00
|
|
|
%if %{with tests}
|
|
|
|
%check
|
|
|
|
cd %{buildroot}%{python3_sitelib}/trytond/modules
|
|
|
|
for i in h*; do
|
|
|
|
pushd $i
|
|
|
|
%pytest -rs tests
|
|
|
|
popd
|
|
|
|
done
|
|
|
|
%endif
|
|
|
|
|
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'
|
2021-04-22 15:52:06 +02:00
|
|
|
alias cdexe='cd %python3_sitelib/trytond'
|
2016-09-23 11:30:38 +02:00
|
|
|
alias cdconf='cd /etc/tryton'
|
2021-04-22 15:52:06 +02:00
|
|
|
alias cdmods='cd %python3_sitelib/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'
|
2021-03-25 16:36:46 +01:00
|
|
|
export EDITOR=nano
|
2016-09-23 11:30:38 +02:00
|
|
|
EOF
|
|
|
|
|
2021-03-25 16:36:46 +01:00
|
|
|
#Write GH Variable /etc/tryton/gnuhealthrc
|
2018-12-28 15:01:07 +01:00
|
|
|
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
|
2022-01-14 17:26:42 +01:00
|
|
|
%service_add_pre gnuhealth-webdav@.service
|
2017-07-05 23:56:18 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post gnuhealth.service
|
2022-01-14 17:26:42 +01:00
|
|
|
%service_add_post gnuhealth-webdav@.service
|
2017-07-05 23:56:18 +02:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun gnuhealth.service
|
2022-01-14 17:26:42 +01:00
|
|
|
%service_del_preun gnuhealth-webdav@.service
|
2017-07-05 23:56:18 +02:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun gnuhealth.service
|
2022-01-14 17:26:42 +01: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*
|
|
|
|
|
2021-03-25 16:36:46 +01: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
|
2023-04-07 22:10:07 +02:00
|
|
|
%doc README.rst Changelog gnuhealth-setup version gnuhealthrc GNUHealth.README.openSUSE scripts/* config/*
|
2021-03-25 16:36:46 +01:00
|
|
|
%{_docdir}/%{name}/examples*
|
2020-03-31 18:09:56 +02:00
|
|
|
%dir %{_sysconfdir}/tryton
|
2023-02-12 16:36:37 +01:00
|
|
|
%license COPYING LICENSES/*
|
2019-11-29 15:18:47 +01:00
|
|
|
%exclude %{python3_sitelib}/%{name}_orthanc*
|
|
|
|
%exclude %{python3_sitelib}/trytond/modules/health_orthanc*
|
2021-02-16 08:41:54 +01:00
|
|
|
%{python3_sitelib}/*
|
2016-09-23 11:30:38 +02:00
|
|
|
|
|
|
|
%changelog
|