summaryrefslogtreecommitdiff
path: root/os-autoinst/PKGBUILD
blob: 61dd56f3c80e7870b310dc530ddaf45304c753ad (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
# Maintainer: Erich Eckner <arch at eckner dot net>
pkgname=os-autoinst
pkgver=4.3
pkgrel=1
pkgdesc="automated test tool for operating systems and the engine at the heart of openSUSE's automated testing initiative"
arch=('any')
url="http://open.qa/"
license=('GPLv2')
groups=()
depends=(
  'opencv'
  'optipng'
  'perl-carp-always'
  'perl-data-dump'
  'perl-json'
  'perl-yaml'
  'qemu'
  'tesseract-data-eng'
)
makedepends=(
  'fftw'
)
checkdepends=(
  'perl-class-accessor-fast'
  'perl-crypt-des'
  'perl-ipc-run'
  'perl-ipc-system-simple'
  'perl-json'
  'perl-mojolicious'
  'perl-net-dbus'
  'perl-net-ssh2'
  'perl-perl-critic'
  'perl-test-compile'
  'perl-universal-require'
  'perl-xml-libxml'
)
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=(
    "${pkgname}-${pkgver}.tar.gz::https://github.com/os-autoinst/${pkgname}/archive/${pkgver}.tar.gz"
)
sha512sums=('f52ac89baaf2e93fbf3bc4d19b3de0f85b160a38cce9d01d30a99feb1c31d70c151b26e3f595610026a4585567726be3ec5ffe52eee5e5afdf99c8a343e08e2a')

prepare() {
    sed -i \
      '
        /^#include <highgui\.h>$/a#include <opencv2/imgcodecs.hpp>
      ' \
      "${srcdir}/${pkgname}-${pkgver}/snd2png/snd2png.cpp"
}

build() {

    # Setting these env variables overwrites any command-line-options we don't want...
    export PERL_MM_USE_DEFAULT=1 PERL5LIB="${srcdir}/${pkgname}-${pkgver}" PERL_AUTOINSTALL=--skipdeps \
        PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='${pkgdir}'" \
        PERL_MB_OPT="--installdirs vendor --destdir '${pkgdir}'" \
        MODULEBUILDRC=/dev/null
               
    cd "${pkgname}-${pkgver}"
    ./autogen.sh
    ./configure
    make

}

check() {

    # Setting these env variables overwrites any command-line-options we don't want...
    export PERL_MM_USE_DEFAULT=1 PERL5LIB="${srcdir}/${pkgname}-${pkgver}" PERL_AUTOINSTALL=--skipdeps \
        PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='${pkgdir}'" \
        PERL_MB_OPT="--installdirs vendor --destdir '${pkgdir}'" \
        MODULEBUILDRC=/dev/null
               
    cd "${pkgname}-${pkgver}"
    if ! make check; then
        sed 's|^|t/test-suite.log: |' "t/test-suite.log"
        return 1
    fi

}

package() {

    # Setting these env variables overwrites any command-line-options we don't want...
    export PERL_MM_USE_DEFAULT=1 PERL5LIB="${srcdir}/${pkgname}-${pkgver}" PERL_AUTOINSTALL=--skipdeps \
        PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='${pkgdir}'" \
        PERL_MB_OPT="--installdirs vendor --destdir '${pkgdir}'" \
        MODULEBUILDRC=/dev/null
               
    cd ${pkgname}-${pkgver}
    make DESTDIR=${pkgdir} prefix=/usr install

}