commit bb1186699a3563f0d6abed397547955e71cffe75 Author: EnumDev Date: Sun Oct 26 18:18:12 2025 +0200 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..8e39173 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +URL="https://www.bytereef.org/mpdecimal/" + +# Get version number from tag name +VERSION=$(curl -s -L "$URL" | grep -A1 'LATEST RELEASE' | grep -o -E '[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..f87ed32 --- /dev/null +++ b/pkg.info @@ -0,0 +1,16 @@ +name: mpdecimal +description: Package for correctly-rounded arbitrary precision decimal floating point arithmetic +version: 4.0.1 +revision: 1 +url: https://www.bytereef.org/mpdecimal/index.html +license: BSD-2-Clause +architecture: any +type: source +depends: + - gcc-libs + - glibc +downloads: + - url: https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 96d33abb4bb0070c7be0fed4246cd38416188325f820468214471938545b1ac8 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..8dc5699 --- /dev/null +++ b/source.sh @@ -0,0 +1,19 @@ +# 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() { + ./configure --prefix=/usr + LDXXFLAGS="$LDFLAGS" 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 + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYRIGHT.txt "$BPM_OUTPUT"/usr/share/licenses/mpdecimal/COPYRIGHT.txt +}