Switch to new download format, update dependencies and check-version.sh script
This commit is contained in:
+5
-6
@@ -1,12 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Git repository
|
URL="https://bitmath.org/code/mtdev/"
|
||||||
REPO="http://bitmath.org/git/mtdev.git"
|
|
||||||
|
|
||||||
# Get tag name using 'git ls-remote'
|
# Get version number from FTP server
|
||||||
TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" 2>/dev/null | tail -1 | cut -d'/' -f3)
|
VERSION=$(curl -L "$URL" | grep -oP "mtdev v(\d+.\d+.\d+)" | head -n1)
|
||||||
|
|
||||||
# Trim 'v' character in TAG_NAME variable
|
# Remove prefix
|
||||||
VERSION=$(echo "$TAG_NAME" | tr -d 'v')
|
VERSION=${VERSION//mtdev v/}
|
||||||
|
|
||||||
echo "$VERSION"
|
echo "$VERSION"
|
||||||
|
|||||||
@@ -1,8 +1,19 @@
|
|||||||
name: mtdev
|
name: mtdev
|
||||||
description: A stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol
|
description: A stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol
|
||||||
version: 1.1.7
|
version: 1.1.7
|
||||||
|
revision: 2
|
||||||
url: https://bitmath.se/org/code/mtdev/
|
url: https://bitmath.se/org/code/mtdev/
|
||||||
license: MIT
|
license: MIT
|
||||||
|
maintainers:
|
||||||
|
- [email protected]
|
||||||
architecture: any
|
architecture: any
|
||||||
depends: ["glibc"]
|
|
||||||
type: source
|
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
|
||||||
|
|||||||
@@ -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 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
|
# 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
|
# The build function is executed in the source directory
|
||||||
# This function is used to compile the source code
|
# This function is used to compile the source code
|
||||||
build() {
|
build() {
|
||||||
@@ -24,5 +14,6 @@ build() {
|
|||||||
package() {
|
package() {
|
||||||
make DESTDIR="$BPM_OUTPUT" install
|
make DESTDIR="$BPM_OUTPUT" install
|
||||||
|
|
||||||
|
# Install package license
|
||||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/mtdev/COPYING
|
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/mtdev/COPYING
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user