[arch-commits] Commit in luaexpat/repos/community-x86_64 (PKGBUILD PKGBUILD)

Caleb Maclennan alerque at gemini.archlinux.org
Mon Mar 28 20:23:35 UTC 2022


    Date: Monday, March 28, 2022 @ 20:23:35
  Author: alerque
Revision: 1177405

archrelease: copy trunk to community-x86_64

Added:
  luaexpat/repos/community-x86_64/PKGBUILD
    (from rev 1177404, luaexpat/trunk/PKGBUILD)
Deleted:
  luaexpat/repos/community-x86_64/PKGBUILD

----------+
 PKGBUILD |  129 +++++++++++++++++++++++++++++--------------------------------
 1 file changed, 62 insertions(+), 67 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-03-28 20:23:27 UTC (rev 1177404)
+++ PKGBUILD	2022-03-28 20:23:35 UTC (rev 1177405)
@@ -1,67 +0,0 @@
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Maintainer: Daurnimator <daurnimator at archlinux.org>
-# Contributor: Lucas Hermann Negri <kkndrox at gmail.com>
-
-pkgbase=luaexpat
-pkgname=(lua-expat lua51-expat lua52-expat lua53-expat)
-pkgver=1.3.0
-pkgrel=5
-pkgdesc='SAX XML parser based on the Expat library'
-arch=('x86_64')
-url='http://matthewwild.co.uk/projects/luaexpat/'
-license=('MIT')
-depends=('expat')
-makedepends=('gcc' 'lua' 'lua51' 'lua52' 'lua53')
-source=("http://matthewwild.co.uk/projects/luaexpat/luaexpat-$pkgver.tar.gz")
-sha512sums=('91884653310e2dc89ade6d1653875ac8607640a21853d3ccb1fd0f833812e41981fad5c40101732ec249104d2c50c9a332208d1e44423b8428065a223c60b4ae')
-
-prepare() {
-  cp -a $pkgbase-$pkgver $pkgbase-$pkgver-51
-  cp -a $pkgbase-$pkgver $pkgbase-$pkgver-52
-  cp -a $pkgbase-$pkgver $pkgbase-$pkgver-53
-}
-
-build() {
-  # 5.1
-  cd "$srcdir"/$pkgbase-$pkgver-51
-  make LUA_V=5.1 COMMON_CFLAGS="$CPPFLAGS -fPIC"
-
-  # 5.2
-  cd "$srcdir"/$pkgbase-$pkgver-52
-  make LUA_V=5.2 COMMON_CFLAGS="$CPPFLAGS -fPIC"
-
-  # 5.3
-  cd "$srcdir"/$pkgbase-$pkgver-53
-  make LUA_V=5.3 COMMON_CFLAGS="$CPPFLAGS -fPIC"
-
-  # 5.4
-  cd "$srcdir"/$pkgbase-$pkgver
-  make LUA_V=5.4 COMMON_CFLAGS="$CPPFLAGS -fPIC"
-}
-
-package_lua-expat() {
-  cd $pkgbase-$pkgver
-  make LUA_V=5.4 DESTDIR="$pkgdir" install
-  install -Dm0644 doc/us/license.html "$pkgdir/usr/share/licenses/$pkgname/license.html"
-}
-
-package_lua51-expat() {
-  replaces=('luaexpat')
-  conflicts=('luaexpat')
-
-  cd $pkgbase-$pkgver-51
-  make LUA_V=5.1 DESTDIR="$pkgdir" install
-  install -Dm0644 doc/us/license.html "$pkgdir/usr/share/licenses/$pkgname/license.html"
-}
-
-package_lua52-expat() {
-  cd $pkgbase-$pkgver-52
-  make LUA_V=5.2 DESTDIR="$pkgdir" install
-  install -Dm0644 doc/us/license.html "$pkgdir/usr/share/licenses/$pkgname/license.html"
-}
-
-package_lua53-expat() {
-  cd $pkgbase-$pkgver-53
-  make LUA_V=5.3 DESTDIR="$pkgdir" install
-  install -Dm0644 doc/us/license.html "$pkgdir/usr/share/licenses/$pkgname/license.html"
-}

Copied: luaexpat/repos/community-x86_64/PKGBUILD (from rev 1177404, luaexpat/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-03-28 20:23:35 UTC (rev 1177405)
@@ -0,0 +1,62 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Maintainer: Daurnimator <daurnimator at archlinux.org>
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+# Contributor: Lucas Hermann Negri <kkndrox at gmail.com>
+
+pkgbase=luaexpat
+pkgname=(lua-expat lua51-expat lua52-expat lua53-expat)
+pkgver=1.4.0
+pkgrel=1
+_rockrel=1
+pkgdesc='SAX XML parser based on the Expat library'
+arch=('x86_64')
+url="https://github.com/lunarmodules/$pkgbase"
+license=('MIT')
+depends=(expat)
+options=(debug)
+makedepends=(lua
+             lua51
+             lua52
+             lua53
+             luarocks)
+_archive="$pkgbase-$pkgver"
+_rock="$_archive-$_rockrel.linux-$CARCH.rock"
+source=("$url/archive/$pkgver/$_archive.tar.gz")
+sha512sums=('ba1a98267757ec5f2464b8d5e903f69102ca991c4034939d02d871d014463a8e29815d1294edc7fa3a1c4b679c5e42fdc1a19b2a1c1654ed1f382f779a213375')
+
+build() {
+	cd "$_archive"
+	for LUAVER in 5.1 5.2 5.3 5.4; do
+		luarocks --lua-version "$LUAVER" \
+			CFLAGS="$CPPFLAGS $CFLAGS -fPIC" \
+			LIBFLAG="$LDFLAGS -shared" \
+			make --pack-binary-rock --deps-mode none -- "rockspecs/$_archive-$_rockrel.rockspec"
+		install -Dm0644 -t "lua$LUAVER/" "$_rock"
+	done
+}
+
+_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
+}
+
+package_lua-expat() {
+	_package 5.4
+}
+
+package_lua53-expat() {
+	_package 5.3
+}
+
+package_lua52-expat() {
+	_package 5.2
+}
+
+package_lua51-expat() {
+	replaces=(luaexpat)
+	conflicts=(luaexpat)
+	_package 5.1
+}



More information about the arch-commits mailing list