summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dbbb3dbf5097ecc941867ab8f7d467e9862c23bf (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
# Maintainer: osch <oliver at luced de>
pkgname=lua53-lanes
pkgver=3.13.0
pkgrel=1
epoch=
pkgdesc="A solution for running Lua multithreaded"
arch=('x86_64')
url="https://github.com/LuaLanes/lanes"
license=('MIT')
groups=()
depends=('lua53')
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("$pkgname-$pkgver.tar.gz::https://github.com/LuaLanes/lanes/archive/v$pkgver.tar.gz")
noextract=()
md5sums=('d34a0a726b6f4f70d1b385fca85795f9')
validpgpkeys=()

prepare() {
	cd "lanes-$pkgver"
}

build() {
	cd "lanes-$pkgver"
	make LUA=/usr/bin/lua53 \
	     LUA_FLAGS=`pkg-config --cflags lua53` \
	     LUA_LIBS=`pkg-config --libs lua53` \
	     CFLAGS="-O2 -fPIC `pkg-config --cflags lua53`"
}

package() {
	cd "lanes-$pkgver"

	install -d                "$pkgdir`pkg-config --variable=INSTALL_CMOD lua53`/lanes"
	install src/lanes/core.so "$pkgdir`pkg-config --variable=INSTALL_CMOD lua53`/lanes/core.so"

	install -d                  "$pkgdir`pkg-config --variable=INSTALL_LMOD lua53`"
	install -m644 src/lanes.lua "$pkgdir`pkg-config --variable=INSTALL_LMOD lua53`"

	install -d                  "$pkgdir`pkg-config --variable=INSTALL_INC lua53`"
	install -m644 src/lanes.h   "$pkgdir`pkg-config --variable=INSTALL_INC lua53`"

	install -d "$pkgdir/usr/share/licenses/$pkgname"
	install -m644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname"
}