summaryrefslogtreecommitdiff
path: root/wcc-git/PKGBUILD
blob: 9765d928357534cb5eefe348dddd60501d1fc6fa (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
45
46
47
48
49
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: epitron <chris@ill-logic.com>

pkgname=wcc-git
_pkgname=wcc
pkgver=0.0.2.r33.g503f6df
pkgrel=1
pkgdesc="The Witchcraft Compiler Collection"
arch=('i486' 'i686' 'pentium4' 'x86_64')
license=('MIT')
_pinned_dependencies=(
  'glibc>=2.33'
  'libcapstone.so=4'
  'libelf=0.187'
  'zlib=1:1.2.13'
)
depends=(binutils readline gsl "${_pinned_dependencies[@]}")
makedepends=(git make)
provides=(wcc=${pkgver%.r*.g*})
conflicts=(wcc)
url=https://github.com/endrazine/wcc
source=("git+https://github.com/endrazine/wcc.git")
sha512sums=('SKIP')

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

prepare() {
  cd "$_pkgname"
  git submodule init
  git submodule update
}

build() {
  cd "$_pkgname"
  make
}

package() {
  cd "$_pkgname"
  install -d "${pkgdir}/usr/bin"
  make DESTDIR="${pkgdir}/" install

  # install manpages
  install -d "${pkgdir}/usr/share/man/man1/"
  install -pm 644 doc/manpages/* $pkgdir/usr/share/man/man1
}