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

Caleb Maclennan alerque at gemini.archlinux.org
Fri Mar 25 09:59:46 UTC 2022


    Date: Friday, March 25, 2022 @ 09:59:46
  Author: alerque
Revision: 1176184

upgpkg: luasocket 1:3.0.0-1

Modified:
  luasocket/trunk/PKGBUILD

----------+
 PKGBUILD |   84 +++++++++++++++++++++++++++++--------------------------------
 1 file changed, 40 insertions(+), 44 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-03-25 09:17:14 UTC (rev 1176183)
+++ PKGBUILD	2022-03-25 09:59:46 UTC (rev 1176184)
@@ -1,63 +1,59 @@
 # Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Maintainer: Caleb Maclennana <caleb at alerque.com>
 # Contributor: Anders Bergh <anders1 at gmail.com>
 
 pkgbase=luasocket
 pkgname=(lua-socket lua51-socket lua52-socket lua53-socket)
-pkgver=20200329
-_commit=5b18e475f38fcf28429b1cc4b17baee3b9793a62
+pkgver=3.0.0
 pkgrel=1
+_rockrel=1
+epoch=1
 pkgdesc='Networking support library for the Lua language'
-arch=('x86_64')
-url='https://github.com/diegonehab/luasocket'
-license=('MIT')
-#options=('debug')
-makedepends=('lua' 'lua51' 'lua52' 'lua53' 'git')
-source=("git+https://github.com/diegonehab/luasocket.git#commit=${_commit}")
-md5sums=('SKIP')
+arch=(x86_64)
+url="https://github.com/lunarmodules/$pkgbase"
+license=(MIT)
+options=(debug)
+makedepends=(lua
+             lua51
+             lua52
+             lua53
+             luarocks)
+_archive="$pkgbase-$pkgver"
+_rock="$_archive-$_rockrel.linux-$CARCH.rock"
+source=("$url/archive/v$pkgver/$_archive.tar.gz")
+sha256sums=('04d98e40edcee7c7c5f83f0e8ba5503d14b56280e20daceee9e34ed7cf8f1b15')
 
-prepare() {
-  cp -a luasocket luasocket-51
-  cp -a luasocket luasocket-52
-  cp -a luasocket luasocket-53
+build() {
+	cd "$_archive"
+	for LUAVER in 5.1 5.2 5.3 5.4; do
+		luarocks --lua-version "$LUAVER" \
+			make --pack-binary-rock --deps-mode none -- "rockspecs/$_archive-$_rockrel.rockspec"
+		install -Dm0644 -t "lua$LUAVER/" "$_rock"
+	done
 }
 
-build() {
-  cd "$srcdir"/luasocket-51
-  MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.1 linux
+_package() {
+	cd "$_archive"
+	depends=("${pkgname%-*}")
+	luarocks --lua-version "$1" --tree "$pkgdir/usr/" \
+		install --deps-mode none --no-manifest -- "lua$1/$_rock"
+	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
+}
 
-  cd "$srcdir"/luasocket-52
-  MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.2 linux
-
-  cd "$srcdir"/luasocket-53
-  MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.3 linux
-
-  cd "$srcdir"/luasocket
-  MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.4 linux
+package_lua-socket() {
+	_package 5.4
 }
 
-package_lua51-socket() {
-  replaces=('luasocket')
-  conflicts=('luasocket')
-
-  cd luasocket-51
-  make DESTDIR="$pkgdir" LUAV=5.1 prefix=/usr install-unix
-  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+package_lua53-socket() {
+	_package 5.3
 }
 
 package_lua52-socket() {
-  cd luasocket-52
-  make DESTDIR="$pkgdir" LUAV=5.2 prefix=/usr install-unix
-  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+	_package 5.2
 }
 
-package_lua53-socket() {
-  cd luasocket-53
-  make DESTDIR="$pkgdir" LUAV=5.3 prefix=/usr install-unix
-  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+package_lua51-socket() {
+	replaces=(luasocket)
+	conflicts=(luasocket)
+	_package 5.1
 }
-
-package_lua-socket() {
-  cd luasocket
-  make DESTDIR="$pkgdir" LUAV=5.4 prefix=/usr install-unix
-  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}



More information about the arch-commits mailing list