summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1ee4ecf363dd150b462ab215f6cb76a0dbe51b23 (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
# Maintainer: Vladimir Gorbunov <truedaemon@gmail.com>
pkgname=hy-git
_gitname=hy
pkgver=0.27.0.r23.g2d6d5f9c
pkgrel=1
pkgdesc="A dialect of Lisp that's embedded in Python"
arch=('any')
url="http://hylang.org/"
license=('MIT')
depends=('python-funcparserlib')
makedepends=('python-setuptools' 'python-build' 'python-wheel' 'python-installer')
conflicts=('hy')
provides=('hy')
options=(!emptydirs)
source=("git+https://github.com/hylang/hy.git")
md5sums=("SKIP")

pkgver() {
    cd "${_gitname}"
    local version=$(git describe --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g')
    echo "__version__ = '${version}'" > hy/version.py
    printf "%s" "$version"
}

build() {
    cd "${_gitname}"
    python -m build --wheel --no-isolation
}

package() {
    cd "${_gitname}"
    python -m installer --destdir="${pkgdir}/" dist/*.whl
    install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    rm -rf "$pkgdir/usr/get_version"
}