From a118bd38aa084f932ecc938830efc03f1ee9632f Mon Sep 17 00:00:00 2001 From: Miguel Mota Date: Tue, 23 Apr 2019 00:36:51 -0700 Subject: [PATCH] update rpm spec --- .rpm/cointop.spec | 9 +++++---- Makefile | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.rpm/cointop.spec b/.rpm/cointop.spec index 6d059d4..e871091 100644 --- a/.rpm/cointop.spec +++ b/.rpm/cointop.spec @@ -1,8 +1,9 @@ -%global commit cbf81aa5e31ab334714c6cf93541170e659b710a +%define version 1.1.5 +%global commit 4cc578ed3665800aa73b0824582b3265805e435c %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: cointop -Version: 1.0.6 +Version: %{version} Release: 6%{?dist} Summary: Terminal based application for tracking cryptocurrencies License: Apache-2.0 @@ -10,7 +11,7 @@ URL: https://cointop.sh Source0: https://github.com/miguelmota/%{cointop}/archive/%{version}.tar.gz BuildRequires: gcc -BuildRequires: golang >= 1.9-10 +BuildRequires: golang >= 1.10 %description cointop is a fast and lightweight interactive terminal based UI application for tracking and monitoring cryptocurrency coin stats in real-time. @@ -23,7 +24,7 @@ mkdir -p ./_build/src/github.com/miguelmota ln -s $(pwd) ./_build/src/github.com/miguelmota/%{name} export GOPATH=$(pwd)/_build:%{gopath} -go build -ldflags=-linkmode=external -o x . +go build -ldflags="-linkmode=external -compressdwarf=false" -o x . %install install -d %{buildroot}%{_bindir} diff --git a/Makefile b/Makefile index 2f8b6a9..44593fa 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,14 @@ VERSION = $$(git describe --abbrev=0 --tags) +COMMIT_REV = $$(git rev-list -n 1 $(VERSION)) all: build version: @echo $(VERSION) +commit_rev: + @echo $(COMMIT_REV) + run: go run main.go @@ -109,6 +113,7 @@ rpm/lint: rpmlint ~/rpmbuild/SPECS/cointop.spec rpm/dirs: + chmod -R a+rwx ~/rpmbuild mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} rpm/download: