summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 719dac46708beca2434a8f0976e6d857c00a94f9 (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
43
44
45
46
47
48
49
50
51
# Maintainer: Joonatan Saarhelo <joon.saar@gmail.com>
pkgname=phz-ric-git
pkgver=0.1.r0.g62388c7
pkgrel=1
pkgdesc="An image resizing and caching server."
arch=('any')
url=""
license=('GPL')
groups=()
depends=('imagemagick')
makedepends=('go>=1.3.0')
optdepends=()
provides=('phz-ric')
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("git+https://github.com/phzfi/RIC.git")
noextract=()
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/RIC"
  git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

build() {
  cd $srcdir

  export GOPATH=$srcdir
  mkdir -p $GOPATH/src/github.com/phzfi/
  mv $srcdir/RIC $GOPATH/src/github.com/phzfi/

  go get github.com/phzfi/RIC/server
}

check() {
  cd $srcdir

  export GOPATH=$srcdir
  go test github.com/phzfi/RIC/server
}

package() {
  cd $srcdir

  mkdir -p $pkgdir/usr/bin
  mv -T bin/server $pkgdir/usr/bin/phz-ric
}