diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..5c5dad8 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="util-linux/util-linux" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/"$REPO"/tags | jq -r '.[].name' | grep -v '-' | head -n1) + +# Trim 'v' character in TAG_NAME variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index f78738b..fa3aaf3 100644 --- a/pkg.info +++ b/pkg.info @@ -1,10 +1,10 @@ name: util-linux description: Linux system utilities -version: 2.39.3 +version: 2.41 revision: 3 url: https://github.com/util-linux/util-linux license: GPL2 architecture: any -depends: ["glibc","ncurses","readline","zlib"] -make_depends: ["bash","binutils","coreutils","diffutils","file","findutils","gawk","gcc","gettext","glibc","grep","make","ncurses","pkgconf","sed","zlib"] +depends: ["glibc","libcap","ncurses","pam","shadow","udev","zlib"] +make_depends: ["libxcrypt","readline"] type: source diff --git a/source.sh b/source.sh index beb6997..b17899c 100644 --- a/source.sh +++ b/source.sh @@ -2,7 +2,7 @@ # 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://www.kernel.org/pub/linux/utils/util-linux/v${BPM_PKG_VERSION%.*}/util-linux-${BPM_PKG_VERSION}.tar.xz" +DOWNLOAD="https://github.com/util-linux/util-linux/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz" FILENAME="${DOWNLOAD##*/}" # The prepare function is executed in the root of the temp directory @@ -15,7 +15,8 @@ prepare() { # The build function is executed in the source directory # This function is used to compile the source code build() { - sed -i '/test_mkfds/s/^/#/' tests/helpers/Makemodule.am + ./autogen.sh + ./configure --bindir=/usr/bin \ --libdir=/usr/lib \ --runstatedir=/run \ @@ -40,7 +41,7 @@ build() { # 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 -k check + SHELL=/bin/sh make check } # The package function is executed in the source directory @@ -48,4 +49,7 @@ check() { package() { make DESTDIR="$BPM_OUTPUT" install install -d "$BPM_OUTPUT"/var/lib/hwclock/ + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/util-linux/COPYING }