Package Details: lua51-luaprompt 0.8-1

Git Clone URL: https://aur.archlinux.org/lua-luaprompt.git (read-only, click to copy)
Package Base: lua-luaprompt
Description: An embeddable Lua command prompt as well as a stand-alone interpreter with pretty-printing and autocompletion.
Upstream URL: https://github.com/dpapavas/luaprompt
Licenses: MIT
Submitter: phijor
Maintainer: phijor (Freed)
Last Packager: Freed
Votes: 2
Popularity: 0.000000
First Submitted: 2016-02-18 12:36 (UTC)
Last Updated: 2024-07-14 11:50 (UTC)

Dependencies (5)

Required by (1)

Sources (1)

Latest Comments

Freed commented on 2024-10-28 02:19 (UTC)

https://luarocks.org/modules/dpapavas/luaprompt

0.9 is coming!

shmilee commented on 2024-10-14 03:04 (UTC)

Maybe, for different lua version, depends and pkgdesc should be different. Like this,

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,20 +4,30 @@
 _lua_version=5.4
 _lua_name=luaprompt

-pkgname=(lua-${_lua_name} lua53-${_lua_name} lua52-${_lua_name} lua51-${_lua_name})
+pkgname=(
+  lua-${_lua_name}
+  lua53-${_lua_name}
+  lua52-${_lua_name}
+#  lua51-${_lua_name}
+)
 pkgver=0.8
 pkgrel=1
-pkgdesc="An embeddable Lua command prompt as well as a stand-alone interpreter with pretty-printing and autocompletion."
 arch=(i686 x86_64)
 url="https://github.com/dpapavas/luaprompt"
 license=('MIT')
-makedepends=(lua lua53 lua52 lua51)
-depends=("lua-argparse")
-source=("${pkgname}-${pkgver}::https://github.com/dpapavas/luaprompt/archive/v${pkgver}.tar.gz")
+makedepends=(
+  lua
+  lua53
+  lua52
+#  lua51
+)
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/dpapavas/luaprompt/archive/v${pkgver}.tar.gz")
 # Upstream does not provide source archives with a stable checksum
 md5sums=('SKIP')

 _package() {
+  pkgdesc="An embeddable Lua command prompt as well as a stand-alone interpreter with pretty-printing and autocompletion for Lua $1"
+
   cp -a "$srcdir/$_lua_name-$pkgver" "$srcdir/$_lua_name-$pkgver-$1"
   cd "$srcdir/$_lua_name-$pkgver-$1"

@@ -40,18 +50,22 @@ _package() {
 }

 package_lua51-luaprompt() {
+  depends=("lua51-argparse")
   _package 5.1
 }

 package_lua52-luaprompt() {
+  depends=("lua52-argparse")
   _package 5.2
 }

 package_lua53-luaprompt() {
+  depends=("lua53-argparse")
   _package 5.3
 }

 package_lua-luaprompt() {
+  depends=("lua-argparse")
   _package $_lua_version
 }
 # vim:set ts=2 sw=2 et:

Freed commented on 2023-10-23 07:23 (UTC)

I can add you as a co-maintainer

Yes, I write some lua packages which depend on it, so I hope I can co-maintain it.

there are however some issues with your patch

You are right!

phijor commented on 2023-09-10 13:08 (UTC)

Hey, thanks @Freed for your suggestions, and please excuse the late reply. I do not actively depend on this package anymore. If you want, I can add you as a co-maintainer of the package, or even transfer ownership.

Packaging for different versions of lua seems worthwhile, there are however some issues with your patch:

  • I think lua-${_lua_name} should come first in pkgname so that its assigned to pkgbase
  • someone needs to bug upstream to provide source archives with a stable checksum, we shouldn't just skip it
  • _package $_lua_version is subtly wrong: it sets depends=(lua54-argparse), but lua54-argparse does not exist (it's lua-argparse)

Freed commented on 2023-07-31 12:34 (UTC) (edited on 2023-07-31 13:29 (UTC) by Freed)

How about provide different lua version?

❯ pacman -Ss lua51-argparse
extra/lua51-argparse 0.7.1-1
    Feature-rich command line parser for Lua 5.1
❯ pacman -Ss lua52-argparse
extra/lua52-argparse 0.7.1-1
    Feature-rich command line parser for Lua 5.2
diff --git a/PKGBUILD b/PKGBUILD
index a458ef8..9c54f56 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,35 +4,54 @@
 _lua_version=5.4
 _lua_name=luaprompt

-pkgname=lua-${_lua_name}
-pkgver=0.7
-pkgrel=3
+pkgname=(lua51-${_lua_name} lua52-${_lua_name} lua53-${_lua_name} lua-${_lua_name})
+pkgver=0.8
+pkgrel=1
 pkgdesc="An embeddable Lua command prompt as well as a stand-alone interpreter with pretty-printing and autocompletion."
 arch=(i686 x86_64)
 url="https://github.com/dpapavas/luaprompt"
 license=('MIT')
-depends=("lua" "lua-argparse")
+makedepends=(lua lua51 lua51 lua53)
 source=("${pkgname}-${pkgver}::https://github.com/dpapavas/luaprompt/archive/v${pkgver}.tar.gz")
-md5sums=('eca026f5b6d294c9e6828b67a7c3447f')
+md5sums=('SKIP')

-build() {
-  cd "$srcdir/$_lua_name-$pkgver"
-  
-  # prefix install-location with $(DESTDIR)
-  sed -ri 's:\$\((BIN|LIB|MAN1)DIR\):\$(DESTDIR)\$(\1DIR):g' Makefile
+_package() {
+  cp -a "$srcdir/$_lua_name-$pkgver" "$srcdir/$_lua_name-$pkgver-$1"
+  cd "$srcdir/$_lua_name-$pkgver-$1"
+
+  if [[ $1 != $_lua_version ]]; then
+    depends=("lua-argparse")
+    sed -i 's=\$(BINDIR)/luap=$(BINDIR)/luap'"$1=" Makefile
+    sed -i 's=\$(MAN1DIR)/luap.1=$(MAN1DIR)/luap'"$1.1=" Makefile
+  else
+    depends=("lua${1/\./}-argparse")
+  fi

   make PREFIX=/usr \
-    VERSION=${_lua_version}
-}
+    VERSION=$1

-package() {
-  cd "$srcdir/$_lua_name-$pkgver"
-  make PREFIX=/usr DESTDIR="$pkgdir/" MANDIR="/usr/share/man"\
-    VERSION=${_lua_version} install
+  make PREFIX="$pkgdir/usr" MANDIR="$pkgdir/usr/share/man"\
+    VERSION=$1 install

   # license
   install -Dm644 LICENSE \
     "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }

+package_lua51-luaprompt() {
+  _package 5.1
+}
+
+package_lua52-luaprompt() {
+  _package 5.2
+}
+
+package_lua53-luaprompt() {
+  _package 5.3
+}
+
+package_lua-luaprompt() {
+  _package $_lua_version
+}
+
 # vim:set ts=2 sw=2 et:

Freed commented on 2023-07-31 10:31 (UTC)

diff --git a/.SRCINFO b/.SRCINFO
index 76dc665..2c87341 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,14 @@
 pkgbase = lua-luaprompt
    pkgdesc = An embeddable Lua command prompt as well as a stand-alone interpreter with pretty-printing and autocompletion.
-   pkgver = 0.7
-   pkgrel = 3
+   pkgver = 0.8
+   pkgrel = 1
    url = https://github.com/dpapavas/luaprompt
    arch = i686
    arch = x86_64
    license = MIT
    depends = lua
    depends = lua-argparse
-   source = lua-luaprompt-0.7::https://github.com/dpapavas/luaprompt/archive/v0.7.tar.gz
-   md5sums = eca026f5b6d294c9e6828b67a7c3447f
+   source = lua-luaprompt-0.8::https://github.com/dpapavas/luaprompt/archive/v0.8.tar.gz
+   md5sums = be91fa1860c2e4359455d3c0a5e3bc13

 pkgname = lua-luaprompt
diff --git a/PKGBUILD b/PKGBUILD
index a458ef8..24088ea 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,15 +5,15 @@ _lua_version=5.4
 _lua_name=luaprompt

 pkgname=lua-${_lua_name}
-pkgver=0.7
-pkgrel=3
+pkgver=0.8
+pkgrel=1
 pkgdesc="An embeddable Lua command prompt as well as a stand-alone interpreter with pretty-printing and autocompletion."
 arch=(i686 x86_64)
 url="https://github.com/dpapavas/luaprompt"
 license=('MIT')
 depends=("lua" "lua-argparse")
 source=("${pkgname}-${pkgver}::https://github.com/dpapavas/luaprompt/archive/v${pkgver}.tar.gz")
-md5sums=('eca026f5b6d294c9e6828b67a7c3447f')
+md5sums=('be91fa1860c2e4359455d3c0a5e3bc13')

 build() {
   cd "$srcdir/$_lua_name-$pkgver"

Freed commented on 2023-03-30 03:38 (UTC)

license should be MIT, according to https://github.com/dpapavas/luaprompt/blob/master/LICENSE

Freed commented on 2023-01-20 05:52 (UTC)

Please update _lua_version from 5.3 to 5.4.

shmilee commented on 2021-05-16 11:20 (UTC) (edited on 2021-05-16 11:20 (UTC) by shmilee)

Lost depends lua? And _lua_version=5.4?

Package 'lua5.3', required by 'virtual:world', not found
cc -o prompt.so -shared -g -fPIC -Wall -Wextra -Wno-unused-parameter -DHAVE_ASPRINTF -DHAVE_LIBREADLINE -DHAVE_READLINE_HISTORY -D_GNU_SOURCE -DCOMPLETE_KEYWORDS      -DCOMPLETE_MODULES       -DCOMPLETE_TABLE_KEYS    -DCOMPLETE_METATABLE_KEYS  -DCOMPLETE_FILE_NAMES    '-DSAVE_RESULTS' '-DRESULTS_TABLE_NAME="_"'  module.c prompt.c -lreadline -lhistory 
module.c:27:10: fatal error: lualib.h: No such file or directory
   27 | #include <lualib.h>
      |          ^~~~~~~~~~
compilation terminated.
prompt.c:43:10: fatal error: lualib.h: No such file or directory
   43 | #include <lualib.h>
      |          ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:86: prompt.so] Error 1