summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4662eb6315b9e434a2c0ca3d73545f0035e8eaa9 (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
# Maintainer: MithicSpirit <rpc01234 at gmail dot com>
# Contributor: Chih-Hsuan Yen <yan12125@gmail.com>

_pkgname=spim
pkgname="$_pkgname-svn"
pkgver=latest
pkgrel=1
pkgdesc='A MIPS32 simulator (SVN version)'
arch=('i686' 'x86_64')
url='https://spimsimulator.sourceforge.net/'
license=('custom:BSD')
groups=('emulators')
depends=('glibc')
makedepends=('subversion')
conflicts=("$_pkgname")
provides=("$_pkgname")

source=("$_pkgname::svn+https://svn.code.sf.net/p/spimsimulator/code/")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/$_pkgname/$_pkgname"
	local ver="$(svnversion)"
	printf '%s' "${ver//[[:alpha:]]}"
}

build() {
	cd "$srcdir/$_pkgname/$_pkgname"
	make
}

check() {
	cd "$srcdir/$_pkgname/$_pkgname"
	make test
}

package() {
	provides=("$_pkgname-$pkgver")

	cd "$srcdir/$_pkgname/$_pkgname"
	make DESTDIR="$pkgdir" install
	install -Dm644 README "$pkgdir/usr/share/licenses/$pkgname/README"
}