lua: fix .pc file and rename importlib to just liblua

The pc target in the make file is bogus, use the template from Arch
(or parts of it). And don't include the version in the import lib
to keep things simple.
This commit is contained in:
Christoph Reiter 2024-09-30 20:33:51 +02:00
parent 1e524f750b
commit 9ff49b6cae
2 changed files with 26 additions and 10 deletions

View File

@ -3,21 +3,27 @@
pkgname=lua
pkgver=5.4.7
_majorver=${pkgver%.*}
pkgrel=1
pkgrel=2
pkgdesc='Powerful lightweight programming language designed for extending applications'
arch=('x86_64')
url='https://www.lua.org/'
makedepends=('make' 'gcc')
license=('spdx:MIT')
source=(https://www.lua.org/ftp/lua-$pkgver.tar.gz)
sha256sums=('9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30')
source=(https://www.lua.org/ftp/lua-$pkgver.tar.gz
lua.pc)
sha256sums=('9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30'
'925fd82adde7e6a83a6f63531b7c21f5c5133436e8947aeaab0c707ef3972858')
prepare() {
sed "s/%VER%/$_majorver/g;s/%REL%/$pkgver/g" lua.pc > lua-$pkgver/lua.pc
}
build() {
cd "lua-$pkgver"
make \
CFLAGS="${CFLAGS}" \
AR="${CC} -shared -Wl,--out-implib,liblua${_majorver}.dll.a -o" \
AR="${CC} -shared -Wl,--out-implib,liblua.dll.a -o" \
RANLIB=: \
LUA_A="msys-lua-${_majorver}.dll" \
linux
@ -28,16 +34,12 @@ package() {
make \
TO_BIN="msys-lua-${_majorver}.dll lua.exe luac.exe" \
TO_LIB="liblua${_majorver}.dll.a" \
TO_LIB="liblua.dll.a" \
INSTALL_TOP="$pkgdir"/usr \
INSTALL_INC="$pkgdir"/usr/include \
INSTALL_LIB="$pkgdir"/usr/lib \
INSTALL_MAN="$pkgdir"/usr/share/man/man1 \
install
mkdir -p "$pkgdir/usr/lib/pkgconfig"
make pc \
INSTALL_TOP=/usr \
INSTALL_INC=/usr/include \
INSTALL_LIB=/usr/lib > "$pkgdir"/usr/lib/pkgconfig/lua.pc
install -Dm644 lua.pc "$pkgdir"/usr/lib/pkgconfig/lua.pc
}

14
lua/lua.pc Normal file
View File

@ -0,0 +1,14 @@
V=%VER%
R=%REL%
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
Libs: -L${libdir} -llua
Cflags: -I${includedir}