# # spec file for package gnuhealth # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2014-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 3.0 Name: gnuhealth # List of additional build dependencies BuildRequires: python-setuptools Version: %{majorver}.6 Release: 0 Url: http://health.gnu.org Source: http://ftp.gnu.org/gnu/health/%{name}-%{version}.tar.gz Source1: GNUHealth.README.SUSE Source2: gnuhealth_control BuildArch: noarch Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/useradd Summary: A Health and Hospital Information System License: GPL-3.0+ Group: Productivity/Office/Management Requires: proteus Requires: python-PyWebDAV Requires: python-caldav Requires: python-cracklib Requires: python-hl7apy Requires: python-imaging Requires: python-ldap Requires: python-polib Requires: python-qrcode Requires: python-simpleeval Requires: python-six Requires: python-vobject 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 Requires: trytond_stock Requires: trytond_stock_lot Requires: trytond_stock_supply # additional suggestion for a useable editor Suggests: nano # you may need a frontend to work with Suggests: tryton 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. This is the server component of GNU Health. You would need the Tryton frontend as well, on the same or a different machine %prep %setup -q -n %{name}-%{version} #%patch0 -p1 cp %{S:1} . cp %{S:2} . %build for i in h*; do cd $i python setup.py build cd .. done #pdq # cd pdq # python setup.py build # cd .. %install for i in h*; do cd $i python setup.py install --prefix=%_prefix --root=%buildroot cd .. done #pdq # cd pdq # python setup.py install --prefix=%_prefix --root=%buildroot # cd .. mkdir -p -m 755 %{buildroot}%{_bindir} install -p -m 755 gnuhealth-control %{buildroot}%{_bindir}/gnuhealth-control # create user %pre #getent group tryton > /dev/null || /usr/sbin/groupadd -r tryton #getent passwd gnuhealth > /dev/null || /usr/sbin/useradd -r -g tryton \ # -d %{_localstatedir}/lib/%{name} -c 'GNU Health' gnuhealth # Dont create as system user #getent passwd gnuhealth > /dev/null || /usr/sbin/useradd -g tryton \ # -c 'GNU Health' gnuhealth #: #Write environment changes to /etc/bash.bashrc.local cat > /etc/bash.bashrc.local << "EOF" alias cdlogs='cd /var/log/trytond' alias cdexe='cd /usr/lib/python/site-packages/trytond' alias cdconf='cd /etc/tryton' alias cdmods='cd /usr/lib/python/site-packages/trytond/modules' alias editconf='${EDITOR} /etc/tryton/trytond.conf' EOF %files %defattr(744,root,root) %{_bindir}/gnuhealth-control %defattr(-,root,root) %doc README Changelog COPYING gnuhealth-setup version gnuhealthrc GNUHealth.README.SUSE scripts/* backend/* config/* doc/* %{python_sitelib}/* %changelog