summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e9f5a04fb7a68acfa2a74a7df80164d39cafbe8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer: Bradley Cicenas <bradley.cicenas@gmail.com>
pkgname=slackcat
pkgver=1.7.3
pkgrel=${PKGREL:-1}
pkgdesc="Commandline utility for posting snippets to Slack"
arch=('i686' 'x86_64')
url='https://github.com/bcicen/slackcat'
license=('GPL')
depends=(
)
makedepends=(
	'go'
	'git'
)

source=(
	"slackcat::git://github.com/vektorlab/slackcat.git#tag=$pkgver"
)

md5sums=(
	'SKIP'
)

backup=(
)

build() {
	cd "$srcdir/$pkgname"

	git submodule init
	git submodule update

	echo "Running 'go mod download'..."
  go mod download

	echo "Running 'go build'..."
  go build -tags osusergo,netgo -ldflags "-s -X main.version=${pkgver} -X main.build=${pkgrel}" -o slackcat
}

package() {
  install -DT "$srcdir/$pkgname/slackcat" "$pkgdir/usr/bin/slackcat"
}