summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 24f45ba10eb2a7a398a77d9e7e66747341eec0d5 (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
# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>

pkgname=9cc-git
pkgver=r267.ea2f4b8
pkgrel=1
pkgdesc='Simple and clean C11 compiler'
arch=(i686 x86_64)
url='https://github.com/rui314/9cc'
license=(MIT)
depends=(glibc)
makedepends=(git)
source=(git+http://github.com/rui314/9cc)
sha1sums=('SKIP')

pkgver() {
  cd 9cc
  echo r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd 9cc
}

build() {
  cd 9cc
  make
}

check() {
  cd 9cc
  make test
}

package() {
  cd 9cc

  install -Dm755 9cc "$pkgdir/usr/bin/9cc"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}