[arch-commits] Commit in penlight/trunk (PKGBUILD)

Levente Polyak anthraxx at archlinux.org
Tue Sep 22 19:26:42 UTC 2020


    Date: Tuesday, September 22, 2020 @ 19:26:41
  Author: anthraxx
Revision: 711405

upgpkg: penlight 1.9.0-1

Modified:
  penlight/trunk/PKGBUILD

----------+
 PKGBUILD |   65 +++++++++++++++++++++++++++++++++----------------------------
 1 file changed, 36 insertions(+), 29 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-09-22 18:47:56 UTC (rev 711404)
+++ PKGBUILD	2020-09-22 19:26:41 UTC (rev 711405)
@@ -5,38 +5,39 @@
 # Contributor: Donald Ephraim Curtis <dcurtis at gmail.com>
 
 pkgbase=penlight
-pkgname=('lua-penlight' 'lua53-penlight')
-pkgver=1.6.0
-pkgrel=2
+pkgname=('lua-penlight' 'lua53-penlight' 'lua52-penlight' 'lua51-penlight')
+pkgver=1.9.0
+pkgrel=1
 pkgdesc='Lua libraries focusing on input data handling'
 url='https://github.com/stevedonovan/penlight'
 arch=('any')
 license=('custom')
-makedepends=('lua' 'lua-filesystem' 'lua53' 'lua53-filesystem')
-source=(https://github.com/stevedonovan/penlight/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
-        penlight-lua-5.4.patch)
-sha256sums=('a552d0a314f7aa94c9579746996a7aad4ed59f3187f33b4735d3e323e27354b0'
-            'bdb1fb023240b717b3fd800ebd9cf9ee51e94a073769e5c4b6e19c9dc4713b6c')
-sha512sums=('4f9988e9e5d66aad1c7137a5b8a36e4eaa2dba5408c90ee0253ce3db69980b2e0be8c9ba38f1e88f269da96d09a908115e0e9c2bd0667393f950fdfc1e232ff0'
-            'eec7d1c61a4ca2cbea7760f18e15d4634ca9eca451bc4a101ace7efd672ffe061141f0d028c459b72a4834cf8dbe0ca29942b5c871885636dfec18dc10515c67')
+makedepends=(
+  'lua' 'lua-filesystem'
+  'lua53' 'lua53-filesystem'
+  'lua52' 'lua52-filesystem'
+  'lua51' 'lua51-filesystem'
+)
+source=(https://github.com/stevedonovan/penlight/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
+sha256sums=('3d7aee1df25ce8014051d508c7cd8e5c1f9bd7e0f4a51150be6820d4d731d341')
+sha512sums=('0bdf107f0c10bb36262cb4a48652a229d9bbdfb3ad563ec5574cbd69a14e85b013cffafb6c1a61424a75e19f4c4e6bba2605fee59a1ae12fef7ccdd95895fd14')
 
-prepare() {
-  cd Penlight-${pkgver}
-  patch -p1 -i ../penlight-lua-5.4.patch
-}
-
 check() {
   cd Penlight-${pkgver}
-  export LUA_PATH="${PWD}/lua/?/init.lua;${PWD}/lua/?.lua;$(lua -e 'print(package.path)')"
-  lua run.lua
-  export LUA_PATH="${PWD}/lua/?/init.lua;${PWD}/lua/?.lua;$(lua5.3 -e 'print(package.path)')"
-  lua5.3 run.lua
+  local _version
+  for _version in 5.4 5.3 5.2 5.1; do
+    export LUA_PATH="${PWD}/lua/?/init.lua;${PWD}/lua/?.lua;$(lua${_version} -e 'print(package.path)')"
+    lua5.3 run.lua
+  done
 }
 
-package_lua-penlight() {
-  depends=('lua' 'lua-filesystem')
+_package() {
+  lua_version="$1"
+  lib_version="$2"
+
+  depends=("${lua_version}" "${lua_version}-filesystem")
   cd Penlight-${pkgver}
-  install -Dm 644 lua/pl/* -t "${pkgdir}/usr/share/lua/5.4/pl"
+  install -Dm 644 lua/pl/* -t "${pkgdir}/usr/share/lua/${lib_version}/pl"
   install -Dm 644 CONTRIBUTING.md CHANGELOG.md README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
   install -Dm 644 docs/manual/* -t "${pkgdir}/usr/share/doc/${pkgname}/manual"
   install -Dm 644 examples/* -t "${pkgdir}/usr/share/doc/${pkgname}/examples"
@@ -43,14 +44,20 @@
   install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
 }
 
+package_lua-penlight() {
+  _package lua 5.4
+}
+
 package_lua53-penlight() {
-  depends=('lua53' 'lua53-filesystem')
-  cd Penlight-${pkgver}
-  install -Dm 644 lua/pl/* -t "${pkgdir}/usr/share/lua/5.3/pl"
-  install -Dm 644 CONTRIBUTING.md CHANGELOG.md README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
-  install -Dm 644 docs/manual/* -t "${pkgdir}/usr/share/doc/${pkgname}/manual"
-  install -Dm 644 examples/* -t "${pkgdir}/usr/share/doc/${pkgname}/examples"
-  install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  _package lua53 5.3
 }
 
+package_lua52-penlight() {
+  _package lua52 5.2
+}
+
+package_lua51-penlight() {
+  _package lua51 5.1
+}
+
 # vim: ts=2 sw=2 et:


More information about the arch-commits mailing list