summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 212a5e4affc28c02ba019d5fca7e14c51183dd04 (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: Shiv Upadhyay <shivnupadhyay@gmail.com>
pkgname=rigetti-quilc-git
_pkgname=quilc
pkgver=r493.d102d70
pkgrel=1
pkgdesc="The @rigetti optimizing Quil compiler."
arch=('x86_64' 'i686')
url="https://github.com/rigetti/quilc"
license=('Apache')
depends=('sbcl' 'quicklisp' 'zeromq' )
makedepends=( 'git' )
checkdepends=()
optdepends=()
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+https://github.com/rigetti/quilc.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname"

  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd "$_pkgname"
}

build() {
	cd "$_pkgname"
	make quilc
}

check() {
	cd "$_pkgname"
	make test
}

package() {
	cd "$_pkgname"
    mkdir -p "$pkgdir/usr/bin"
	make DESTDIR="$pkgdir/usr" PREFIX="" install
    install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}