Switch to new download format, update dependencies and check-version.sh script

This commit is contained in:
2026-04-30 17:01:43 +03:00
parent 3b3b095fcf
commit 830f3c492d
3 changed files with 18 additions and 17 deletions
+5 -6
View File
@@ -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"
+12 -1
View File
@@ -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:
- [email protected]
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
+1 -10
View File
@@ -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
}