summaryrefslogtreecommitdiffstats
path: root/testing/lua-microlight/APKBUILD
blob: d65fb401ebc7e07a1fadc30ac8a82d82ce6c3596 (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
61
62
63
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-microlight
pkgver=1.1
pkgrel=0
pkgdesc="a really compact set of general Lua functions"
url="http://stevedonovan.github.com/microlight/"
arch="noarch"
license="MIT"
depends="lua"
makedepends=""
install=""
subpackages=""

_fmt=tar.gz

source="http://dev.alpinelinux.org/archive/lua-microlight/lua-microlight-$pkgver.$_fmt"

_giturl="git://github.com/stevedonovan/Microlight.git"
_upload=dev.alpinelinux.org:/archive/lua-microlight
_builddir="$srcdir"/lua-microlight-$pkgver

archivetag() {
	local _tag=$pkgver
	local _pkg=$pkgname-$_tag.$_fmt
	mkdir -p "$srcdir"
	cd "$srcdir"
	rm -rf "$pkgname"
	git clone  --bare $_giturl || return 1
	git --git-dir ${_giturl##*/} archive \
		--format $_fmt \
		--prefix $pkgname-$pkgver/ \
		--output $_pkg  \
		$_tag \
		|| return 1
	msg "New snapshot: $_pkg"
	if [ -n "$_upload" ]; then
		msg "Uploading to $_upload"
		scp $_pkg $_upload || return 1
		abump $pkgname-$_tag
	fi
}

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
}

package() {
	cd "$_builddir"
	install -Dm644 "$_builddir"/ml.lua "$pkgdir"/usr/share/lua/5.1/ml.lua
}

md5sums="73ad743254eebae85c97f76067f5b608  lua-microlight-1.1.tar.gz"