aboutsummaryrefslogtreecommitdiff
path: root/srcpkgs/lua54-luaexpat/template
blob: 8fe2209f758097378a8f1394ee070ab9c85601c5 (plain) (blame)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Template file for 'lua54-luaexpat'
pkgname=lua54-luaexpat
version=1.5.2
revision=1
make_build_args="EXPAT_INC=-I${XBPS_CROSS_BASE}/usr/include"
makedepends="lua51-devel lua52-devel lua53-devel lua54-devel expat-devel"
depends="lua54"
_desc="XML Expat parsing for the Lua programming language"
short_desc="${_desc} (5.4.x)"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="MIT"
homepage="https://lunarmodules.github.io/luaexpat/"
distfiles="https://github.com/lunarmodules/luaexpat/archive/refs/tags/${version}.tar.gz"
checksum=89d83f2141edec31be576425637216928221918fe95dc3854d1b7fd4c627213f

post_extract() {
	cd "${wrksrc}"
	mkdir -p lua5.1

	mv * lua5.1 || true
	cp -a lua5.1 lua5.2
	cp -a lua5.1 lua5.3
	cp -a lua5.1 lua5.4
}

do_build() {
	for luaver in 5.1 5.2 5.3 5.4; do
		pushd lua${luaver}
		make CC=$CC LUA_V=${luaver} ${make_build_args} ${makejobs} \
			LUA_INC=-I${XBPS_CROSS_BASE}/usr/include/lua${luaver}
		popd
	done
}

do_install() {
	for luaver in 5.1 5.2 5.3 5.4; do
		pushd lua${luaver}
		make DESTDIR=${DESTDIR} LUA_V=${luaver} install
		popd
	done
	vlicense lua5.4/LICENSE
}

lua51-luaexpat_package() {
	depends="lua51"
	short_desc="${_desc} (5.1.x)"
	pkg_install() {
		vlicense "${wrksrc}/lua5.1/LICENSE"
		vmove usr/lib/lua/5.1
		vmove usr/share/lua/5.1
	}
}

lua52-luaexpat_package() {
	depends="lua52"
	short_desc="${_desc} (5.2.x)"
	pkg_install() {
		vlicense "${wrksrc}/lua5.2/LICENSE"
		vmove usr/lib/lua/5.2
		vmove usr/share/lua/5.2
	}
}

lua53-luaexpat_package() {
	depends="lua53"
	short_desc="${_desc} (5.3.x)"
	pkg_install() {
		vlicense "${wrksrc}/lua5.3/LICENSE"
		vmove usr/lib/lua/5.3
		vmove usr/share/lua/5.3
	}
}

luaexpat_package() {
	depends="lua51-luaexpat>=${version}_${revision}"
	short_desc="${_desc} (5.1.x) (transitional dummy package)"
	build_style=meta
}