Switch to new download format, update dependencies and source.sh script

This commit is contained in:
2025-12-06 17:41:14 +02:00
parent f3fda69750
commit ab0e2860b4
2 changed files with 17 additions and 9 deletions
+4 -7
View File
@@ -2,23 +2,20 @@
# 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://github.com/zyedidia/micro/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz"
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"
cd "$BPM_SOURCE"
# Modify Go build flags
sed -i 's/-trimpath/-buildmode=pie -trimpath/g;s/GS)/GS) -linkmode=external -extldflags \\"$(LDFLAGS)\\"/g' Makefile
# Download go modules
GOFLAGS="-modcacherw" go mod download
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
make VERSION="$BPM_PKG_VERSION"
make
}
# The check function is executed in the source directory