diff --git a/check-version.sh b/check-version.sh index cf32722..b033b6c 100644 --- a/check-version.sh +++ b/check-version.sh @@ -1,12 +1,11 @@ #!/bin/bash -# Git repository -REPO="http://bitmath.org/git/mtdev.git" +URL="https://bitmath.org/code/mtdev/" -# Get tag name using 'git ls-remote' -TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" 2>/dev/null | tail -1 | cut -d'/' -f3) +# Get version number from FTP server +VERSION=$(curl -L "$URL" | grep -oP "mtdev v(\d+.\d+.\d+)" | head -n1) -# Trim 'v' character in TAG_NAME variable -VERSION=$(echo "$TAG_NAME" | tr -d 'v') +# Remove prefix +VERSION=${VERSION//mtdev v/} echo "$VERSION" diff --git a/pkg.info b/pkg.info index 9098f22..719c6a9 100644 --- a/pkg.info +++ b/pkg.info @@ -1,8 +1,19 @@ name: mtdev description: A stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol version: 1.1.7 +revision: 2 url: https://bitmath.se/org/code/mtdev/ license: MIT +maintainers: + - enumdev@enumerated.dev architecture: any -depends: ["glibc"] type: source +depends: + - glibc +make_depends: + - bzip2 +downloads: + - url: https://bitmath.org/code/mtdev/mtdev-${BPM_PKG_VERSION}.tar.bz2 + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: a107adad2101fecac54ac7f9f0e0a0dd155d954193da55c2340c97f2ff1d814e diff --git a/source.sh b/source.sh index 4178056..f8d23f4 100644 --- a/source.sh +++ b/source.sh @@ -2,16 +2,6 @@ # 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://bitmath.org/code/mtdev/mtdev-${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() { @@ -24,5 +14,6 @@ build() { package() { make DESTDIR="$BPM_OUTPUT" install + # Install package license install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/mtdev/COPYING }