APKBUILD 1.04 KB
Newer Older
1
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Natanael Copa's avatar
Natanael Copa committed
3
pkgname=lua-uuid
4 5
_realname=uuid
pkgver=0.2.0
6
pkgrel=1
7 8 9 10 11 12 13 14 15 16 17 18 19
pkgdesc="A pure Lua uuid generator (modified from a Rackspace module)"
url="https://tieske.github.io/uuid/"
arch="noarch"
license="Apache-2.0"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/Tieske/uuid/archive/version_$pkgver.tar.gz"
builddir="$srcdir/uuid-version_$pkgver"

_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
	makedepends="$makedepends lua$_v-dev"
	subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
done
Natanael Copa's avatar
Natanael Copa committed
20

21 22
package() {
	mkdir -p "$pkgdir"
Natanael Copa's avatar
Natanael Copa committed
23 24
}

25 26 27 28 29
_subpackage() {
	local lver="${subpkgname:3:3}"
	pkgdesc="$pkgdesc (for Lua $lver)"
	depends="lua$lver"
	install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
Natanael Copa's avatar
Natanael Copa committed
30

31 32
	install -Dm644 "$builddir"/src/uuid.lua \
		"$subpkgdir"/usr/share/lua/$lver/uuid.lua
Natanael Copa's avatar
Natanael Copa committed
33 34
}

35
sha512sums="1117c76dbbabee6de01d1657339236810822040e20afd974dec302b9d2035ca087d33ef47029c6184203c3e694cc9282a303ce19eadffc71b0f48c6a4a5ef5b0  lua-uuid-0.2.0.tar.gz"