From 1ba1f0be4c6be6065b42219f68c0337b75424f84 Mon Sep 17 00:00:00 2001 From: lemmi Date: Fri, 29 Sep 2017 01:43:05 +0200 Subject: [PATCH] micro: update to 1.3.2. --- srcpkgs/micro/template | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/srcpkgs/micro/template b/srcpkgs/micro/template index d91178ffed2..266d42acb16 100644 --- a/srcpkgs/micro/template +++ b/srcpkgs/micro/template @@ -1,11 +1,11 @@ # Template file for 'micro' pkgname=micro -version=1.2.0 +version=1.3.2 revision=3 # This will need to be updated along with version as it cannot currently be -# obtained from the tarball, and is necessary if the user is to make error -# reports upsteam. -_commithash=be8124154b2b3e761578a186c42a18ace5a43865 +# obtained from git before fetching, and is necessary if the user is to make +# error reports upsteam. +_commithash=2f587c6d48fc00d00fee0f178170e7f2b0bbcf51 build_style=go go_import_path="github.com/zyedidia/micro" go_package="${go_import_path}/cmd/micro" @@ -15,8 +15,26 @@ short_desc="A modern and intuitive terminal-based text editor" maintainer="Diogo Leal " license="MIT" homepage="https://github.com/zyedidia/micro" -distfiles="https://github.com/zyedidia/micro/archive/v${version}.tar.gz" -checksum=108876de0d136b2ec2ffc7e2f8897338ae1f56ac5db88eff4ae1772191df03bb + +do_fetch() { + # We need the git repository since dependencies are vendored in submodules. + # These submodules aren't included in the tarball. Go get then tries to get + # the current versions which will cause the build to fail. + + git clone --branch v${version} https://github.com/zyedidia/micro $wrksrc + cd $wrksrc + + # Simulate normal fetch error messages + head=$(git rev-parse HEAD) + msg_normal "$pkgver: verifying checksum for https://github.com/zyedidia/micro" + if [[ "$_commithash" != "$head" ]]; then + echo + msg_red "SHA256 mismatch for 'https://github.com/zyedidia/micro' :\n$head\n" + exit 1 + fi + + git submodule update --init --recursive --recommend-shallow +} post_install() { vlicense LICENSE