summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b39961491b9c3cabbcad7a3132d4d431bfaa7582 (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
# Maintainer: SvartaHjarta <qi0cez9jf@mozmail.com>
# Contributor: Thorsten Wißmann <edu@thorsten-wissmann.de>
pkgname=kattis-problemtools-git
pkgver=1.20231016.r2.g92dcbf3
pkgrel=2
pkgdesc="Tools to manage problem packages using the Kattis problem package format"
arch=('i686' 'arm' 'x86_64')
url="https://github.com/Kattis/problemtools"
license=('MIT')
groups=()
depends=('python' 'python-yaml' 'python-unidecode' 'gmp' 'plastex' 'ghostscript' 'texlive-fontsrecommended' 'texlive-langcyrillic' 'texlive-latexextra' 'texlive-plaingeneric' 'tidy')
makedepends=('git' 'make' 'boost' 'python-setuptools')
checkdepends=('python-pytest')
provides=('problem2html'  'problem2pdf'  'verifyproblem')
conflicts=()
replaces=('kattis-problemtools')
backup=()
options=()
install=
source=('git+https://github.com/Kattis/problemtools')
noextract=()
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir"/problemtools
    git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "$srcdir"/problemtools
    python3 setup.py build
}

check() {
  cd "$srcdir"/problemtools
  PYTHONPATH=./ pytest
}

package() {
    cd "$srcdir"/problemtools
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    python3 setup.py install --prefix /usr --root="$pkgdir" || return 1
}