summaryrefslogtreecommitdiff
path: root/pcr/gnuhealth/PKGBUILD
blob: f9d822ad9f2e841587f34e789a54b32979c389c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Maintainer: André Silva <emulatorman@parabola.nu>
# Contributor (Arch): SpepS <dreamspepser at yahoo dot it>
# Contributor (Arch): Ander <anderraso@gmail.com>

pkgname=gnuhealth
pkgver=2.6.0
pkgrel=1
pkgdesc="A free Health and Hospital Information System"
arch=any
url=http://health.gnu.org/
license=GPL3
depends=(
          postgresql
          pygtk
          python2-dateutil
          python2-ldap 
          python2-pillow
          python2-pip
          python2-psycopg2
          python2-pytz
          python2-pywebdav
          python2-qrcode 
          python2-vobject
          "trytond>=3.2"
          "trytond-account-invoice>=3.2"
          "trytond-calendar>=3.2"
          "trytond-country>=3.2"
          "trytond-stock-lot>=3.2"
)
source=http://ftp.gnu.org/gnu/health/$pkgname-$pkgver.tar.gz
sha512sums=61ea1fdec5c7dcbc56f81f41e0b0e45f7ed9ffe7eb0d35ea5ebcb22e70b4ad0d3d317ea60c802d71c2f12b38106972d19e1e0cbe806818e45fed58a6e9b880a4

prepare() {
  # fix python2 problem
  sed -i 's|/usr/bin/env python|/usr/bin/env python2|' $(grep -rlI '/usr/bin/env python')
}

package() {
  MODULES=(
           health
           health_archives
           health_calendar
           health_crypto
           health_genetics
           health_gyneco
           health_history
           health_icd10
           health_icd10pcs
           health_icpm
           health_icu
           health_imaging
           health_inpatient
           health_inpatient_calendar
           health_lab
           health_lifestyle
           health_mdg6
           health_ntd
           health_ntd_chagas
           health_ntd_dengue
           health_nursing
           health_pediatrics
           health_pediatrics_growth_charts
           health_pediatrics_growth_charts_who
           health_profile
           health_qrcodes
           health_reporting
           health_services
           health_socioeconomics
           health_stock
           health_surgery
           health_who_essential_medicines
  )

  # build gnuhealth modules
    for module in ${MODULES[@]}
    do
      cd $srcdir/$pkgname-$pkgver/$module
      python2 setup.py install --root=$pkgdir
    done

  # put gnuhealth manual to man folder
    cd "$srcdir/$pkgname-$pkgver"

    install -Dm644 health/man/$pkgname.1 \
      $pkgdir/usr/share/man/man1/$pkgname.1
}