commit 7e5c6e7cdcd3b2e7490310a87b0269d250c27bda Author: EnumDev Date: Mon Aug 10 13:19:55 2026 +0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f123a37 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Exclude bpm archives +*.bpm diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..6155d0a --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Git repository +REPO="https://git.musl-libc.org/git/musl" + +# Get tag name using 'git ls-remote' +TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | tail -1 | cut -d'/' -f3) + +# Trim 'v' character in VERSION variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/info.yml b/info.yml new file mode 100644 index 0000000..ad2b2bc --- /dev/null +++ b/info.yml @@ -0,0 +1,13 @@ +name: musl +description: Lightweight implementation of C standard library +version: 1.2.6 +revision: 1 +url: https://www.musl-libc.org/ +license: MIT +architecture: any +type: source +downloads: + - url: https://www.musl-libc.org/releases/musl-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: d585fd3b613c66151fc3249e8ed44f77020cb5e6c1e635a616d3f9f82460512a diff --git a/recipe.sh b/recipe.sh new file mode 100644 index 0000000..4646993 --- /dev/null +++ b/recipe.sh @@ -0,0 +1,30 @@ +# 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 build function is executed in the source directory +# This function is used to compile the source code +build() { + export CFLAGS="-ffat-lto-objects" + ./configure --prefix=/usr/lib/musl \ + --exec-prefix=/usr \ + --enable-wrapper=all \ + CFLAGS="-ffat-lto-objects" + make +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + make DESTDIR="$BPM_OUTPUT" install + + # Create symlink to musl-gcc + ln -sf musl-gcc "$BPM_OUTPUT"/usr/bin/${BPM_PKG_ARCH}-linux-musl-gcc + + # configure syslibdir with /lib for PT_INTERP compat, but install to /usr/lib + mv "$BPM_OUTPUT"/lib/ld-musl*.so* "$BPM_OUTPUT"/usr/lib/ + rmdir "$BPM_OUTPUT"/lib + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYRIGHT "$BPM_OUTPUT"/usr/share/licenses/musl/COPYRIGHT +}