mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-01 19:42:55 +00:00
77 lines
2.4 KiB
Bash
77 lines
2.4 KiB
Bash
#! /bin/bash
|
|
|
|
# Lua 54
|
|
# Source: https://www.lua.org/ftp/lua-5.4.6.tar.gz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: NONE
|
|
# Recommended: NONE
|
|
# Optional: NONE
|
|
|
|
# Some packages check for the pkg-config file for Lua, which is created with:
|
|
cat > lua.pc << "EOF"
|
|
V=5.4
|
|
R=5.4.6
|
|
|
|
prefix=/usr
|
|
INSTALL_BIN=${prefix}/bin
|
|
INSTALL_INC=${prefix}/include
|
|
INSTALL_LIB=${prefix}/lib
|
|
INSTALL_MAN=${prefix}/share/man/man1
|
|
INSTALL_LMOD=${prefix}/share/lua/${V}
|
|
INSTALL_CMOD=${prefix}/lib/lua/${V}
|
|
exec_prefix=${prefix}
|
|
libdir=${exec_prefix}/lib
|
|
includedir=${prefix}/include
|
|
|
|
Name: Lua
|
|
Description: An Extensible Extension Language
|
|
Version: ${R}
|
|
Requires:
|
|
Libs: -L${libdir} -llua -lm -ldl
|
|
Cflags: -I${includedir}
|
|
EOF
|
|
|
|
patch -Np1 -i ../patches/lua54-lfs/lua-5.4.6-shared_library-1.patch
|
|
make linux
|
|
|
|
sudo make INSTALL_TOP=$BUILD/usr INSTALL_DATA="cp -d" \
|
|
INSTALL_MAN=$BUILD/usr/share/man/man1 \
|
|
TO_LIB="liblua.so liblua.so.5.4 liblua.so.5.4.6" \
|
|
install
|
|
sudo mkdir -pv $BUILD/usr/share/doc/lua-5.4.6 &&
|
|
sudo cp -v doc/*.{html,css,gif,png} $BUILD/usr/share/doc/lua-5.4.6 &&
|
|
|
|
sudo mkdir -pv $BUILD/usr/lib/pkgconfig
|
|
sudo install -v -m644 -D lua.pc $BUILD/usr/lib/pkgconfig/lua.pc
|
|
|
|
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
|
|
cat > /tmp/slack-desc << "EOF"
|
|
# HOW TO EDIT THIS FILE:
|
|
# The "handy ruler" below makes it easier to edit a package description. Line
|
|
# up the first '|' above the ':' following the base package name, and the '|'
|
|
# on the right side marks the last column you can put a character in. You must
|
|
# make exactly 11 lines for the formatting to be correct. It's also
|
|
# customary to leave one space after the ':' except on otherwise blank lines.
|
|
|
|
|-----handy-ruler------------------------------------------------------|
|
|
lua-54: Lua (a powerful, fast, light-weight, embeddable scripting language)
|
|
lua-54:
|
|
lua-54: Lua combines simple procedural syntax with powerful data description
|
|
lua-54: constructs based on associative arrays and extensible semantics.
|
|
lua-54: Lua is dynamically typed, runs by interpreting bytecode for a
|
|
lua-54: register-based virtual machine, and has automatic memory management
|
|
lua-54: with incremental garbage collection, making it ideal for
|
|
lua-54: configuration, scripting, and rapid prototyping.
|
|
lua-54:
|
|
lua-54:
|
|
lua-54:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
|
|
sudo -S makepkg -l y -c n $PKGS/lua-54-5.4.6-$PSUFFIX &&
|
|
sudo -S rm -rf ${BUILD}/*
|