summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 47873316e23ddcebc1b433daf822fd1fa945b6dd (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
# Maintainer: Darks <l.gatin@protonmail.com>
pkgname="gint-devel-git"
pkgver=1.1
pkgrel=1
pkgdesc='Set of tools and libraries based on gcc, fxsdk and gint to build native programs for Casio calculators'
arch=('i686' 'x86_64')
depends=('sh-elf-gcc-casio' 'fxsdk-git' 'gint-git' 'mkg3a')
_libraries=('libprof' 'libimg')
source=("libprof::git+https://gitea.planet-casio.com/Lephenixnoir/libprof.git"
        "libimg::git+https://gitea.planet-casio.com/Lephenixnoir/libimg.git")
options=("!strip")
sha256sums=("SKIP" "SKIP")

prepare() {
  for i in ${_libraries[@]}; do
    cd "$srcdir/${i}"
    # Ensure clean build
    make clean
  done
}

build() {
  for i in ${_libraries[@]}; do
    cd "$srcdir/${i}"
    make
  done
}

package() {
  _prefix=$(sh-elf-gcc -print-search-dirs | sed -rn "s#install: (.+)/#\1#p")
  mkdir -p $pkgdir${_prefix}/include

  for i in ${_libraries[@]}; do
    cd "$srcdir/${i}"
    make DESTDIR=$pkgdir install
  done
}