summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5895b692bbeebda8948cfa5ef338c7560f8d966e (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
# Maintainer: xiretza <xiretza+aur@xiretza.xyz>

_srcname=litex
pkgname="python-$_srcname-git"
pkgver=2020.04.r867.g5097b7ae
pkgrel=1
pkgdesc="A Migen/MiSoC based Core/SoC builder"
arch=(any)
url="https://github.com/enjoy-digital/litex"
license=('MIT')
depends=(python-pyserial python-requests python-pythondata-software-compiler_rt python python-migen python-litex)
makedepends=(git python-setuptools)
provides=("${pkgname%%-git}=$pkgver")
conflicts=("${pkgname%%-git}")
replaces=("$_srcname-git")
source=("git+$url")
sha256sums=('SKIP')

pkgver() {
  cd "$_srcname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$_srcname"
  python setup.py build
}

package() {
  cd "$_srcname"
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set et ts=2 syntax=PKGBUILD: