summaryrefslogtreecommitdiff
path: root/demeter/PKGBUILD
blob: b80998fc40ea624c7573488a0d1adeb1d1e6a72b (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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Maintainer: Erich Eckner <arch at eckner dot net>
pkgname=demeter
pkgver=0.9.25
pkgrel=2
pkgdesc="Data Analysis Tools for X-ray Spectroscopy"
arch=('x86_64' 'i686')
url="https://bruceravel.github.io/demeter"
license=('BSD')
groups=()
depends=(
    'ifeffit'
    'perl-module-build'
    'perl-archive-zip'
    'perl-capture-tiny'
    'perl-chemistry-elements'
    'perl-config-ini'
    'perl-const-fast'
    'perl-datetime'
    'perl-encoding-fixlatin'
    'perl-file-copy-recursive'
    'perl-file-countlines'
    'perl-file-touch'
    'perl-file-which'
    'perl-graph'
    'perl-html-parser'
    'perl-heap'
    'perl-json'
    'perl-math-combinatorics'
    'perl-math-derivative'
    'perl-math-random'
    'perl-math-round'
    'perl-math-spline'
    'perl-moose'
    'perl-moosex-aliases'
    'perl-moosex-types'
    'perl-moosex-types-laxnum'
    'perl-pdl'
    'perl-pdl-stats'
    'perl-pod-pom'
    'perl-regexp-assemble'
    'perl-regexp-common'
    'perl-spreadsheet-writeexcel'
    'perl-statistics-descriptive'
    'perl-text-template'
    'perl-tree-simple'
    'perl-want'
    'perl-xmlrpc-lite'
    'perl-yaml-tiny'
    'perl-encoding-fixlatin-xs'
    'perl-file-monitor-lite'
    'perl-graphics-gnuplotif'
    'perl-term-sk'
    'perl-term-twiddle'
    'perl-wx'
    'perl-xmlrpc-lite'
)
makedepends=(
    'perl-capture-tiny'
    'perl-file-copy-recursive'
    'perl-file-slurper'
    'perl-image-size'
    'perl-ppi'
    'perl-ppi-html'
    'perl-pod-projectdocs'
    'perl-syntax-highlight-perl'
    'perl-template-toolkit'
    'perl-text-unidecode'
)
checkdepends=()
[ -z "$DISPLAY" ] && checkdepends+=('xorg-server-xvfb')
optdepends=(
    'perl-encoding-fixlatin-xs'
    'perl-file-monitor-lite'
    'perl-graphics-gnuplotif'
    'perl-term-sk'
    'perl-term-twiddle'
    'perl-wx'
)
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=(
    "${pkgname}-${pkgver}.tar.gz::https://github.com/bruceravel/${pkgname}/archive/${pkgver}.tar.gz"
)
sha512sums=('501538d1504e7af9738c1da28725ad71a078db47d527ad8d6f7ce37fd8fdaba3a7ea3eae344e9b33241cb006d642470f5fbb7ab4b181d07c64619406fed61f3a')

prepare() {

    cd ${pkgname}-${pkgver}
    export PGPLOT_DIR='/usr/lib'

}

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'"     \
      PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
      MODULEBUILDRC=/dev/null                                \
      PERL_USE_UNSAFE_INC=1

    cd ${pkgname}-${pkgver}
    if [ -z "$DISPLAY" ]; then
      warning "Empty \$DISPLAY - falling back to xvfb-run (xorg-server-xvfb)"
      xvfb-run -a -s "+extension GLX -screen 0 1280x1024x24" perl ./Build.PL
      xvfb-run -a -s "+extension GLX -screen 0 1280x1024x24" ./Build
    else
      perl ./Build.PL
      ./Build
    fi
  )
}

check() {

    cd ${pkgname}-${pkgver}
    if [ -z "$DISPLAY" ]; then
      warning "Empty \$DISPLAY - falling back to xvfb-run (xorg-server-xvfb)"
      xvfb-run -a -s "+extension GLX -screen 0 1280x1024x24" ./Build test
    else
      ./Build test
    fi

}

package() {

    cd ${pkgname}-${pkgver}
    ./Build install

}