commit f9a84cb9dd0526e31a7f9cd52a0f50f4fe0b6d9b Author: EnumDev Date: Fri Oct 31 12:04:44 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..0ca3286 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +URL="ftp://ftp.gnu.org/gnu/libidn/" + +# Get version number from FTP server +VERSION=$(curl -s --list-only "$URL" | grep -E '^libidn-[0-9]{1,}\.[0-9]{1,}(\.[0-9]{1,})?.tar.gz$' | cut -d '-' -f2 | sort -V | tail -n1) + +# Remove '.tar.gz' suffix from VERSION variable +VERSION=${VERSION//.tar.gz/} + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..c88d175 --- /dev/null +++ b/pkg.info @@ -0,0 +1,15 @@ +name: libidn +description: Implementation of the Stringprep, Punycode and IDNA specifications +version: "1.43" +revision: 1 +url: https://www.gnu.org/software/libidn/ +license: GPL2-or-later,LGPL3-or-later +architecture: any +type: source +depends: + - glibc +downloads: + - url: https://ftpmirror.gnu.org/gnu/libidn/libidn-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: bdc662c12d041b2539d0e638f3a6e741130cdb33a644ef3496963a443482d164 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..0d544be --- /dev/null +++ b/source.sh @@ -0,0 +1,29 @@ +# 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 + 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 documentation + install -d "$BPM_OUTPUT"/usr/share/gtk-doc/html/libidn + cp -r doc/reference/html/* -t "$BPM_OUTPUT"/usr/share/gtk-doc/html/libidn + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING* -t "$BPM_OUTPUT"/usr/share/licenses/libidn/ +}