summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7f3d9f4aa8a3bbd69afc506e69aa2a17417466a0 (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
# Maintainer: veecue <veecue@ventos.tk>

pkgname=pacmon-git
_pkgname=pacmon
pkgver=20180604
pkgrel=1
pkgdesc="A zero-configuration, fast and simple pacman LAN-mirror as a replacement for pacserve"
arch=('x86_64' 'i686' 'armv6' 'armv7')
url="https://github.com/veecue/pacmon"
license=('GPL')
makedepends=('git' 'go')
options=('!strip' '!emptydirs')
source=("$_pkgname::git+https://github.com/veecue/pacmon")
sha256sums=('SKIP')
conflicts=("$_pkgname")
provides=("$_pkgname")
install=pacmon.install

prepare() {
  mkdir -p "$srcdir/src/github.com/veecue"
  ln -rTsf "$srcdir/$_pkgname" "$srcdir/src/github.com/veecue/pacmon"
}

build() {
  cd "$_pkgname"
  GOPATH="$srcdir" go build -ldflags='-s -w' 
}

package() {
  cd "$_pkgname"
  install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
  install -Dm644 "$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
  install -Dm644 "pacmon-mirrorlist.hook" "$pkgdir/usr/share/libalpm/hooks/pacmon-mirrorlist.hook"
  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et: