summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2c0a9b01dcb00d723d5fa967bb9f1a8c3cf253b8 (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
# Maintainer: danieltetraquark
pkgname=service-tools-git
_pkgname=service-tools
pkgver=r54.48577a1
pkgrel=1
pkgdesc='A growing collection of convenient little tools to work with systemd services'
provides=('service-tools')
arch=('any')
url="https://github.com/muesli/service-tools"
license=('MIT')
makedepends=('go')
source=("git+https://github.com/muesli/service-tools")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/${_pkgname}"

  # Get the version number.
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${srcdir}/${_pkgname}/service-generator"
  go build
  cd ../service-monitor
  go build

#  go build \
#    -gcflags "all=-trimpath=$PWD" \
#    -asmflags "all=-trimpath=$PWD" \
##    -ldflags "-extldflags $LDFLAGS" \
#    -o $pkgname .
}

package() {
  cd "${srcdir}/${_pkgname}"
  install -Dm755 service-generator/service-generator "$pkgdir"/usr/bin/service-generator
  install -Dm755 service-monitor/service-monitor "$pkgdir"/usr/bin/service-monitor
}