diff --git a/pkg.info b/pkg.info index 73f427d..2b7d630 100644 --- a/pkg.info +++ b/pkg.info @@ -1,9 +1,20 @@ name: micro description: A modern and intuitive terminal-based text editor version: 2.0.14 -revision: 4 +revision: 5 url: https://micro-editor.github.io/ license: MIT architecture: any -make_depends: ["golang"] type: source +optional_depends: + - wl-clipboard + - xclip +make_depends: + - git + - golang +downloads: + - url: https://github.com/zyedidia/micro.git + type: git + clone_to: ${BPM_SOURCE} + git_branch: v${BPM_PKG_VERSION} + checksum: 04c577049ca898f097cd6a2dae69af0b4d4493e1 diff --git a/source.sh b/source.sh index a66de75..3e7ca54 100644 --- a/source.sh +++ b/source.sh @@ -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