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
|
|
|
#
|
2017-02-16 17:07:26 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-09-23 11:30:38 +02:00
|
|
|
# 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/
|
2016-10-02 00:09:49 +02:00
|
|
|
#
|
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
|
|
|
|
%define majorver 3.0
|
|
|
|
|
|
|
|
Name: gnuhealth
|
|
|
|
|
|
|
|
# List of additional build dependencies
|
|
|
|
BuildRequires: python-setuptools
|
|
|
|
|
2017-02-16 17:07:26 +01:00
|
|
|
Version: %{majorver}.6
|
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
|
|
|
|
Source1: GNUHealth.README.SUSE
|
|
|
|
Source2: gnuhealth_control
|
2016-09-23 11:30:38 +02:00
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
Requires(pre): /usr/sbin/groupadd
|
|
|
|
Requires(pre): /usr/sbin/useradd
|
|
|
|
|
|
|
|
Summary: A Health and Hospital Information System
|
2016-10-02 00:09:49 +02:00
|
|
|
License: GPL-3.0+
|
|
|
|
Group: Productivity/Office/Management
|
2016-09-23 11:30:38 +02:00
|
|
|
|
2016-10-02 00:09:49 +02:00
|
|
|
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
|
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
|
|
|
|
Suggests: tryton
|
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.
|
|
|
|
You would need the Tryton frontend as well, on the same or a different machine
|
|
|
|
|
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
|
|
|
|
python setup.py build
|
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
|
|
|
|
#pdq
|
2017-02-16 17:07:26 +01:00
|
|
|
# cd pdq
|
|
|
|
# python setup.py build
|
|
|
|
# cd ..
|
2016-10-02 00:09:49 +02:00
|
|
|
|
2016-09-23 11:30:38 +02:00
|
|
|
%install
|
|
|
|
for i in h*; do
|
|
|
|
cd $i
|
|
|
|
python setup.py install --prefix=%_prefix --root=%buildroot
|
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
#pdq
|
2017-02-16 17:07:26 +01:00
|
|
|
# cd pdq
|
|
|
|
# python setup.py install --prefix=%_prefix --root=%buildroot
|
|
|
|
# cd ..
|
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
|
|
|
|
|
|
|
|
# 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
|