Jan Alexander Steffens (heftig) pushed to branch main at Arch Linux / Packaging 
/ Packages / lgi


Commits:
211c5071 by Jan Alexander Steffens (heftig) at 2023-10-04T03:16:41+02:00
0.9.2-8: add lua51-lgi for libpeas-2

- - - - -


2 changed files:

- + .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -0,0 +1,40 @@
+pkgbase = lgi
+       pkgdesc = Lua bindings for gnome/gobject using gobject-introspection 
library
+       pkgver = 0.9.2
+       pkgrel = 8
+       url = https://github.com/pavouk/lgi
+       arch = x86_64
+       license = MIT
+       makedepends = gobject-introspection
+       makedepends = lua
+       makedepends = lua51
+       makedepends = lua53
+       depends = glibc
+       depends = glib2
+       depends = libffi
+       depends = gobject-introspection-runtime
+       source = https://github.com/pavouk/lgi/archive/0.9.2/lgi-0.9.2.tar.gz
+       source = lgi-lua54.patch::https://github.com/pavouk/lgi/pull/249.patch
+       sha256sums = 
cfc4105482b4730b3a40097c9d9e7e35c46df2fb255370bdeb2f45a886548c4f
+       sha256sums = 
eaa5a39883bc76c77bea3fbf4ec0a8d60444bf78c6ff8e2096a550d30b986f29
+
+pkgname = lua-lgi
+       depends = glibc
+       depends = glib2
+       depends = libffi
+       depends = gobject-introspection-runtime
+       depends = lua
+
+pkgname = lua51-lgi
+       depends = glibc
+       depends = glib2
+       depends = libffi
+       depends = gobject-introspection-runtime
+       depends = lua51
+
+pkgname = lua53-lgi
+       depends = glibc
+       depends = glib2
+       depends = libffi
+       depends = gobject-introspection-runtime
+       depends = lua53


=====================================
PKGBUILD
=====================================
@@ -4,25 +4,29 @@
 # Contributor: Sébastien Luttringer
 
 pkgbase=lgi
-pkgname=(lua-lgi lua53-lgi)
+pkgname=(lua-lgi lua51-lgi lua53-lgi)
 pkgver=0.9.2
-pkgrel=7
+pkgrel=8
 pkgdesc='Lua bindings for gnome/gobject using gobject-introspection library'
 url="https://github.com/pavouk/$pkgbase";
 arch=(x86_64)
 license=(MIT)
 depends=(glibc glib2 libffi gobject-introspection-runtime)
-makedepends=(gobject-introspection lua lua53)
+makedepends=(gobject-introspection lua lua51 lua53)
 _archive="$pkgbase-$pkgver"
 source=("$url/archive/$pkgver/$_archive.tar.gz"
         "$pkgbase-lua54.patch::$url/pull/249.patch")
 sha256sums=('cfc4105482b4730b3a40097c9d9e7e35c46df2fb255370bdeb2f45a886548c4f'
-            '44d472e96f3645dba786dc62f4a40fb352c6b6fe86d2be888ad181e887d98b31')
+            'eaa5a39883bc76c77bea3fbf4ec0a8d60444bf78c6ff8e2096a550d30b986f29')
 
 prepare() {
        cd "$_archive"
        patch -p1 < ../${source[1]%::*}
+       cp -a lgi{,51}
        cp -a lgi{,53}
+       sed -i Makefile \
+               -e '16{p;s/lgi/lgi51/};16i all51 :' \
+               -e '28{p;s/lgi/lgi51/};28i install51 :'
        sed -i Makefile \
                -e '16{p;s/lgi/lgi53/};16i all53 :' \
                -e '28{p;s/lgi/lgi53/};28i install53 :'
@@ -31,6 +35,7 @@ prepare() {
 build() {
        cd "$_archive"
        CFLAGS="$CFLAGS -I/usr/include" make all
+       CFLAGS="$CFLAGS -I/usr/include/lua5.1" make all51
        CFLAGS="$CFLAGS -I/usr/include/lua5.3" make all53
 }
 
@@ -54,6 +59,20 @@ package_lua-lgi() {
        install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
 }
 
+package_lua51-lgi() {
+       depends+=(lua51)
+       cd "$_archive"
+       make \
+               LUA_LIBDIR=/usr/lib/lua/5.1 \
+               LUA_SHAREDIR=/usr/share/lua/5.1 \
+               DESTDIR="$pkgdir/" install51
+       # install -Dm0755 tools/dump-typelib.lua "$pkgdir/usr/bin/dump-typelib"
+       install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md docs/*
+       install -Dm0644 -t "$pkgdir/usr/share/$pkgname/samples/" samples/*.lua
+       install -Dm0644 -t "$pkgdir/usr/share/$pkgname/samples/gtk-demo/" 
samples/gtk-demo/*
+       install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
+}
+
 package_lua53-lgi() {
        depends+=(lua53)
        cd "$_archive"



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/lgi/-/commit/211c5071e43eff8372fda55bff3e2b67417efa31

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/lgi/-/commit/211c5071e43eff8372fda55bff3e2b67417efa31
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to