summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 74138f01a529e8293934c8cf292c1f6f1dc00bd7 (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
50
51
52
53
54
55
56
57
58
59
60
  # Maintainer: Joey Dumont <joey.dumont@gmail.com>
pkgname=('n64-git' 'n64-tools-git')
pkgver=r110.23a6b60
pkgrel=1
arch=('x86_64' 'i686' 'mips64')
url="https://github.com/glankk/n64"
source=("git+https://github.com/glankk/n64.git#branch=n64-ultra"
        "gs.patch")
makedepends=('git')
sha256sums=('SKIP'
            'b36d4a851c5dd76ba3d56e4ab2370e5a8ac28dc0e8feef11fb6f32141abdc117')
options=('!buildflags' '!strip')
_prefix=/usr

pkgver() {
  cd ${srcdir}/n64/
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  # The gs binary conflicts with GhostScript on Linux. Rename it to gs.n64.
  patch --strip=1 --input=${srcdir}/gs.patch
  #pwd
}

build() {
  # cd to source directory.
  cd $srcdir/n64

  ./configure --prefix=$_prefix

  # Install the tools.
  make -j 4
}

package_n64-tools-git() {
  pkgdesc="A set of N64 development tools."
  depends=('jansson' 'lua' 'libusb')
  provides=('n64-tools')
  conflicts=('n64-tools')
  replaces=('n64-tools)')
  cd $srcdir/n64
  make DESTDIR="$pkgdir" install
  make DESTDIR="$pkgdir" install-local-exec
}

package_n64-git() {

  pkgdesc="A custom N64 development library"
  # Because the lib installs symlinks to the tools, the lib must depend on the
  # tools package.
  provides=('n64')
  conflicts=('n64')
  replaces=('n64)')
  depends+=('n64-tools')

  # Install the binaries that the makefile generates.
  cd $srcdir/n64
  make DESTDIR="$pkgdir" install-sys
}