summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Macabies2022-04-22 01:00:11 +0200
committerAlexandre Macabies2022-04-22 01:00:11 +0200
commitbd8844729724aa0baeb3ace4ca88ebf5a566566f (patch)
treea4f232da096ae7e690d1be65fa36011ad0ea0a69
parentaff70f26f972b78726e7d024bcab2ffc0e5e65c6 (diff)
downloadaur-bd8844729724aa0baeb3ace4ca88ebf5a566566f.tar.gz
Package for lua51, lua52, lua53 and lua54 (just 'lua').
Also, modernize the PKGBUILD a tad. Thanks to AUR user 'KaMeHb-UA' for the tip!
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD61
3 files changed, 58 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d936c20137ad..0bac998a76dd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,24 @@
pkgbase = lua-cjson
pkgdesc = A fast JSON parsing and encoding support for Lua.
pkgver = 2.1.0
- pkgrel = 4
+ pkgrel = 5
url = https://www.kyne.com.au/~mark/software/lua-cjson.php
- arch = i686
arch = x86_64
license = custom:MIT
- depends = lua
+ makedepends = lua
+ makedepends = lua51
+ makedepends = lua52
+ makedepends = lua53
optdepends = perl: UTF8 implementation test
source = https://www.kyne.com.au/~mark/software/download/lua-cjson-2.1.0.tar.gz
source = no-tests.patch
- md5sums = 24f270663e9f6ca8ba2a02cef19f7963
- md5sums = 39475544badeb963f0bf95acd69dce71
+ sha256sums = 51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778
+ sha256sums = f19c685cbc345c14c6df86979b3150e74c1e99da091f7b3c6d9841bf2fee4114
pkgname = lua-cjson
+pkgname = lua51-cjson
+
+pkgname = lua52-cjson
+
+pkgname = lua53-cjson
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..2125d9f968ca
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+*.tar.gz
+*.pkg.tar.*
diff --git a/PKGBUILD b/PKGBUILD
index 546096cc492e..ba7090f33cf5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,21 @@
# Maintainer: zopieux <web+oss at zopieux dot com>
-_lua_version=5.4
-
-pkgname=lua-cjson
+pkgbase=lua-cjson
+pkgname=(lua-cjson lua51-cjson lua52-cjson lua53-cjson)
pkgver=2.1.0
-pkgrel=4
-pkgdesc="A fast JSON parsing and encoding support for Lua."
-arch=(i686 x86_64)
-url="https://www.kyne.com.au/~mark/software/lua-cjson.php"
+pkgrel=5
+_tag=${pkgver}
+pkgdesc='A fast JSON parsing and encoding support for Lua.'
+arch=('x86_64')
+url='https://www.kyne.com.au/~mark/software/lua-cjson.php'
license=('custom:MIT')
-depends=("lua")
+makedepends=('lua' 'lua51' 'lua52' 'lua53')
optdepends=('perl: UTF8 implementation test')
source=(
"https://www.kyne.com.au/~mark/software/download/$pkgname-$pkgver.tar.gz"
- "no-tests.patch")
-md5sums=('24f270663e9f6ca8ba2a02cef19f7963'
- '39475544badeb963f0bf95acd69dce71')
+ 'no-tests.patch')
+sha256sums=('51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778'
+ 'f19c685cbc345c14c6df86979b3150e74c1e99da091f7b3c6d9841bf2fee4114')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
@@ -23,17 +23,40 @@ prepare() {
}
build() {
- cd "$srcdir/$pkgname-$pkgver"
- make PREFIX=/usr LUA_INCLUDE_DIR=/usr/include/lua${_lua_version} LUA_VERSION=${_lua_version}
+ cp -a lua-cjson-${_tag} lua-cjson-${_tag}-51
+ make -C lua-cjson-${_tag}-51 PREFIX=/usr LIB_OPTION="-shared ${LDFLAGS}" LUA_VERSION=5.1
+
+ cp -a lua-cjson-${_tag} lua-cjson-${_tag}-52
+ make -C lua-cjson-${_tag}-52 PREFIX=/usr LIB_OPTION="-shared ${LDFLAGS}" LUA_VERSION=5.2
+
+ cp -a lua-cjson-${_tag} lua-cjson-${_tag}-53
+ make -C lua-cjson-${_tag}-53 PREFIX=/usr LIB_OPTION="-shared ${LDFLAGS}" LUA_VERSION=5.3
+
+ make -C lua-cjson-${_tag} PREFIX=/usr LIB_OPTION="-shared ${LDFLAGS}" LUA_VERSION=5.4
}
-package() {
- cd "$srcdir/$pkgname-$pkgver"
- make PREFIX=/usr DESTDIR="$pkgdir/" LUA_INCLUDE_DIR=/usr/include/lua${_lua_version} LUA_VERSION=${_lua_version} install{,-extra}
+package_lua51-cjson() {
+ cd lua-cjson-${_tag}-51
+ make DESTDIR="$pkgdir" PREFIX=/usr LUA_VERSION=5.1 install{,-extra}
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_lua52-cjson() {
+ cd lua-cjson-${_tag}-52
+ make DESTDIR="$pkgdir" PREFIX=/usr LUA_VERSION=5.2 install{,-extra}
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_lua53-cjson() {
+ cd lua-cjson-${_tag}-53
+ make DESTDIR="$pkgdir" PREFIX=/usr LUA_VERSION=5.3 install{,-extra}
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
- # license
- install -Dm644 LICENSE \
- "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+package_lua-cjson() {
+ cd lua-cjson-${_tag}
+ make DESTDIR="$pkgdir" PREFIX=/usr LUA_VERSION=5.4 install{,-extra}
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
# vim:set ts=2 sw=2 et: