commit 9c24fddca3fa243c157bf87a9790f9ce7a2830b1 Author: EnumDev Date: Sun Sep 14 13:17:12 2025 +0300 Initial Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e58e5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Exclude bpm archives +*.bpm \ No newline at end of file diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..bdf3fa7 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Sourceforge project +REPO="mpg123" + +# Get version using best_release.json +VERSION=$(curl -s -L https://sourceforge.net/projects/"$REPO"/best_release.json | jq '.platform_releases.linux.filename' | cut -d'/' -f3) + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..b9a040f --- /dev/null +++ b/pkg.info @@ -0,0 +1,10 @@ +name: mpg123 +description: Fast console MPEG Audio Player and decoder library +version: 1.33.2 +url: https://mpg123.de/ +license: LGPL2.1-only +architecture: any +depends: ["alsa-lib","jack","libpulse"] +optional_dependds: ["perl","sdl2-compat"] +make_depends: ["sdl2-compat"] +type: source diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..0716641 --- /dev/null +++ b/source.sh @@ -0,0 +1,35 @@ +# 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 + +DOWNLOAD="https://downloads.sourceforge.net/mpg123/mpg123-${BPM_PKG_VERSION}.tar.bz2" +FILENAME="${DOWNLOAD##*/}" + +# The prepare function is executed in the root of the temp directory +# This function is used for downloading files and putting them into the correct location +prepare() { + wget "$DOWNLOAD" + tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + ./configure --prefix=/usr --enable-int-quality --with-audio="alsa oss sdl jack pulse" + make +} + +# The check function is executed in the source directory +# This function is used to run tests to verify the package has been compiled correctly +check() { + make check +} + +# 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 + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/mpg123/COPYING +}