aboutsummaryrefslogtreecommitdiffstats
path: root/community/mruby/APKBUILD
blob: 0b2fdd4a39870b0a01cf851980c0553fb848a0d9 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=mruby
pkgver=1.2.0
pkgrel=0
pkgdesc="Lightweight Ruby"
url="http://mruby.org"
arch="all"
license="MIT"
depends=""
makedepends="$depends_dev bison ruby"
subpackages="$pkgname-tools $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/mruby/mruby/archive/$pkgver.tar.gz
	build_config.rb"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	MRUBY_CONFIG="$srcdir/build_config.rb" ./minirake --verbose
}

package() {
	cd "$builddir"

	install -d "$pkgdir"/usr/bin
	cp build/host-debug/bin/* "$pkgdir"/usr/bin/ || return 1
	cp build/host/bin/* "$pkgdir"/usr/bin/ || return 1

	install -d "$pkgdir"/usr/lib
	cp build/host/lib/*.a "$pkgdir"/usr/lib/
}

tools() {
	pkgdesc="$pkgdesc (tools)"

	install -d "$subpkgdir"/usr/bin

	mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/ \
		&& mv "$subpkgdir"/usr/bin/mruby "$pkgdir"/usr/bin/
}

md5sums="b5a3b7962d9db8cb8fb8105aa914d16c  mruby-1.2.0.tar.gz
c8acedbcf9a8a68b21bc9a32c20cb961  build_config.rb"
sha256sums="05ad0135a9c34158ff0cfd4631f4fbaed28cbb8243680d2c97ffdb9c246b1f3d  mruby-1.2.0.tar.gz
ed5291921f77e98517722a1692160a6e264bd9a181a31fbf6932e95efe790adf  build_config.rb"
sha512sums="bd5de32ba52b6642358752755329fa45a954082122a8983012930056c286ac328fb52fbdd11f34ff7c80af2c0e9a6348abcd5214602aca1150f2e7ae25cad1f2  mruby-1.2.0.tar.gz
9c51108d9766e3e3129ac89d76fc7dcc797b206bcc5660d60e89426adb93707fcf5acdffb24cd3438b3eabfcc02e3767a17e9233c25e0762ebe2ddab9f159252  build_config.rb"