summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4a327fb5ddefd85a4380c4e0a6787a92e5c26856 (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
#Maintainer: louson

_name=yocto-cooker
pkgname=python-yocto-cooker-git
pkgver=1.4.0.r0.g1fc0160
pkgrel=1
url="https://github.com/cpb-/yocto-cooker"
pkgdesc="yocto-cooker is a easy yocto manager."
arch=(any)
depends=(python python-jsonschema python-urllib3 python-pyjson5)
makedepends=(git python-setuptools)
checkdepends=(cmake)
provides=(python-yocto-cooker)
conflicts=(python-yocto-cooker)

source=("${pkgname}::git+https://github.com/cpb-/yocto-cooker.git")
md5sums=('SKIP')
license=('GPL2')

pkgver() {
  cd "$srcdir/$pkgname"
  # cutting off 'v' prefix that presents in the git tag
  git describe --long | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}

build() {
    cd "$srcdir/$pkgname"
    python setup.py build
}

package() {
    cd "$srcdir/$pkgname"
    python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
    install -d "$pkgdir/usr/share/$pkgname"
    install -Dm644 sample-menus/* "$pkgdir/usr/share/$pkgname"
}

check() {
    mkdir "tests" && cd tests
    cmake "$srcdir/$pkgname/test/"
    make
    ctest
}