Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Commit

Permalink
Work-in-progress adding nfpm
Browse files Browse the repository at this point in the history
  • Loading branch information
chiefy committed Oct 12, 2018
1 parent 32e257d commit 16c469d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

VERSION=$(shell awk '/([0-9]{1}.?){3}/ {print $$4;}' main.go)

build/gotop:
@go build

build/nfpm.rpm:
@docker run --rm \
-v "$(PWD)/build:/tmp/pkg" \
-e "VERSION=$(VERSION)" \
goreleaser/nfpm pkg \
--config /tmp/pkg/nfpm.yaml \
--target /tmp/pkg/nfpm.rpm
24 changes: 24 additions & 0 deletions build/nfpm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "gotop"
arch: "amd64"
platform: "linux"
version: "v${VERSION}"
section: "default"
priority: "extra"
maintainer: "Caleb Bassi <calebjbassi@gmail.com>"
description: |
A terminal based graphical activity monitor inspired by gtop and vtop
vendor: "Caleb Bassi"
homepage: "https://github.com/cjbassi/gotop"
license: "GNU Affero General Public License v3.0"
bindir: "/usr/local/bin"
files:
./gotop: "/usr/local/bin/gotop"
overrides:
rpm:
scripts:
preinstall: ./scripts/preinstall.sh
postremove: ./scripts/postremove.sh
deb:
scripts:
postinstall: ./scripts/postinstall.sh
preremove: ./scripts/preremove.sh

0 comments on commit 16c469d

Please sign in to comment.