summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 48a8940e13e74c45865695137d57a9ded0d9512f (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
# Maintainer: Jose Riha <jose 1711 gmail com>

pkgname=mqrg-git
pkgver=20140617
pkgrel=2
pkgdesc="microqrcode generator draws QR codes into the text terminal"
url="https://github.com/trezor/microqrcode"
arch=('i686' 'x86_64')
license=('MIT')
source=()
depends=('glibc')
makedepends=('git' 'check')

_gitname="microqrcode"
_gitroot="git://github.com/trezor/${_gitname}.git"


build() {
  cd $srcdir
  msg "Connecting to GIT (${_gitroot}) ..."

  if [ -d $_gitname ]; then
    cd $_gitname && git pull origin
    msg "The local files of ${_gitname} were updated."
  else
    git clone $_gitroot $_gitname
  fi
  
  msg "GIT checkout done or server timeout"

  cd ${srcdir}/$_gitname
  make
}

package() {
  cd ${srcdir}/$_gitname
  install -Dm755 ./test ${pkgdir}/usr/bin/${_gitname}
}