summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: de39904546d03520d6d22af21e6e83cea6ee2521 (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: Frederic Bezies <fredbezies at gmail dot com>
# Contributor: Colin Pitrat <colin dot pitrat at gmail dot com>
pkgname=caprice32-git
pkgver=4.5.0.r601.g1074f59
pkgrel=1
pkgdesc="An emulator of the Amstrad CPC 8bit home computer range (CPC 464, 664, 6128)"
arch=('i686' 'x86_64')
url="https://github.com/ColinPitrat/caprice32"
license=('GPL2')
makedepends=('git' 'glu')
depends=('sdl2' 'freetype2')
source=(git+https://github.com/ColinPitrat/caprice32
caprice32.desktop)
sha256sums=('SKIP'
            '6ebca670aad7cf21582297725d242d2fc7b730e6ddf50b6710c3851d5c7cfa15')

pkgver() {
  cd caprice32
  git describe --long | sed 's/^latest-//;s/\([^-]*-g\)/r\1/;s/-/./g' | cut -c2-48
}

build() {
  cd caprice32
  make 
  sed -i 's,rom_path=.*,rom_path=/usr/share/caprice32/rom/,' cap32.cfg
  sed -i 's,resources_path=.*,resources_path=/usr/share/caprice32/resources/,' cap32.cfg
  sed -i 's,cart_path=.*,cart_path=/usr/share/caprice32/rom/,' cap32.cfg
}

package() {
  cd caprice32
  mkdir -p $pkgdir/usr/share/caprice32/{rom,resources}
  cp rom/* $pkgdir/usr/share/caprice32/rom/
  cp -r resources/* $pkgdir/usr/share/caprice32/resources
  mkdir -p $pkgdir/usr/share/{applications,man}
  cp $srcdir/caprice32.desktop $pkgdir/usr/share/applications/
  cp -r doc/* $pkgdir/usr/share/man
  install -Dm755 cap32.cfg "$pkgdir/etc/cap32.cfg"
  install -Dm755 cap32 "$pkgdir/usr/bin/cap32"
}