Initial commit

This commit is contained in:
2025-12-30 20:43:43 +02:00
commit a8cca6b1e0
4 changed files with 112 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# Exclude bpm archives
*.bpm
+31
View File
@@ -0,0 +1,31 @@
name: lua-lpeg
description: Parsing Expression Grammars For Lua
version: 1.1.0
revision: 1
url: https://www.inf.puc-rio.br/~roberto/lpeg/
license: MIT
architecture: any
type: source
make_depends:
- lua
- lua5.1
- lua5.2
- lua5.3
downloads:
- url: https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-${BPM_PKG_VERSION}.tar.gz
extract_to: ${BPM_SOURCE}/lua5.4
extract_strip_components: 1
checksum: 4b155d67d2246c1ffa7ad7bc466c1ea899bbc40fef0257cc9c03cecbaed4352a
split_packages:
- name: lua-lpeg
depends:
- lua
- name: lua5.3-lpeg
depends:
- lua5.3
- name: lua5.2-lpeg
depends:
- lua5.2
- name: lua5.1-lpeg
depends:
- lua5.1
+7
View File
@@ -0,0 +1,7 @@
Copyright © 2007-2023 Lua.org, PUC-Rio.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+72
View File
@@ -0,0 +1,72 @@
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The prepare function is executed in the root of the temp directory
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
cd "$BPM_SOURCE"
for ver in 5.3 5.2 5.1; do
cp -a lua5.4 lua$ver
done
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
pushd lua5.4
make DLLFLAGS="-I/usr/include -fPIC" LUADIR="/usr/include"
popd
for ver in 5.3 5.2 5.1; do
pushd lua$ver
make DLLFLAGS="-I/usr/include/lua${ver} -fPIC" LUADIR="/usr/include/lua${ver}"
popd
done
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package_lua-lpeg() {
install -Dm755 lua5.4/lpeg.so -t "$BPM_OUTPUT"/usr/lib/lua/5.4
install -Dm644 lua5.4/re.lua -t "$BPM_OUTPUT"/usr/share/lua/5.4
# Install documentation
install -Dm644 lua5.4/lpeg.html "$BPM_OUTPUT"/usr/share/doc/lpeg-lua5.4/lpeg.html
# Install package license
install -Dm644 "$BPM_WORKDIR"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/lua-lpeg/LICENSE
}
package_lua5.3-lpeg() {
install -Dm755 lua5.3/lpeg.so -t "$BPM_OUTPUT"/usr/lib/lua/5.3
install -Dm644 lua5.3/re.lua -t "$BPM_OUTPUT"/usr/share/lua/5.3
# Install documentation
install -Dm644 lua5.3/lpeg.html "$BPM_OUTPUT"/usr/share/doc/lpeg-lua5.3/lpeg.html
# Install package license
install -Dm644 "$BPM_WORKDIR"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/lua5.3-lpeg/LICENSE
}
package_lua5.2-lpeg() {
install -Dm755 lua5.2/lpeg.so -t "$BPM_OUTPUT"/usr/lib/lua/5.2
install -Dm644 lua5.2/re.lua -t "$BPM_OUTPUT"/usr/share/lua/5.2
# Install documentation
install -Dm644 lua5.2/lpeg.html "$BPM_OUTPUT"/usr/share/doc/lpeg-lua5.2/lpeg.html
# Install package license
install -Dm644 "$BPM_WORKDIR"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/lua5.2-lpeg/LICENSE
}
package_lua5.1-lpeg() {
install -Dm755 lua5.1/lpeg.so -t "$BPM_OUTPUT"/usr/lib/lua/5.1
install -Dm644 lua5.1/re.lua -t "$BPM_OUTPUT"/usr/share/lua/5.1
# Install documentation
install -Dm644 lua5.1/lpeg.html "$BPM_OUTPUT"/usr/share/doc/lpeg-lua5.1/lpeg.html
# Install package license
install -Dm644 "$BPM_WORKDIR"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/lua5.1-lpeg/LICENSE
}