summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f5a7b671094aff6d061db642e337ea6b1a079c37 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Maintainer: Yunhui Fu <yhfudev@gmail.com>

_pkgbase="u8glib-git"
#pkgname=('libu8gwpi-git' 'libu8gsdl-git')
pkgname=('u8glib-git')
pkgver=910f4eb
pkgrel=1
pkgdesc="Universal Graphics Library for 8 Bit Embedded Systems"
arch=( 'i686' 'x86_64' 'armv5tel' 'armv7l' )
url='http://code.google.com/p/u8glib/'
license=('BSD')
depends=('wiringpi-git')
makedepends=('wiringpi-git')
#conflicts=('libu8gwpi-git' 'libu8gsdl-git')

source=("${_pkgbase}::git+https://github.com/yhfudev/u8glib.git"
    )
md5sums=('SKIP'
    )

pkgver_git() {
    cd "${srcdir}/${_pkgbase}"
    local ver="$(git show | grep commit | awk '{print $2}' )"
    #printf "r%s" "${ver//[[:alpha:]]}"
    echo ${ver:0:7}
}

pkgver_svn() {
    cd "${srcdir}/${_pkgbase}"
    local ver="$(svn info | grep Revision | awk '{print $2}' )"
    #printf "r%s" "${ver//[[:alpha:]]}"
    echo ${ver:0:7}
}

pkgver() {
    pkgver_git
}

prepare() {
    cd "${srcdir}/${_pkgbase}"
}

build() {
    cd "${srcdir}/${_pkgbase}"
    ./autogen.sh
    ./configure --prefix=/usr
    make $MAKEFLAGS
}

check() {
    make -C "${srcdir}/${_pkgbase}" check
}

package() {
    cd "${srcdir}/${_pkgbase}"
    make DESTDIR="$pkgdir" install
}

package_libu8gwpi-git() {
    conflicts=('libu8gwpi')
    provides=('libu8gwpi')
    #replaces=('libu8gwpi-git')

    cd "${srcdir}/${_pkgbase}"
    make DESTDIR="$pkgdir" install
}

package_libu8gsdl-git() {
    pkgdesc='Python 2 bindings for Google Protocol Buffers'
    #depends=('libu8g')
    conflicts=('libu8gsdl-git')
    provides=('libu8gsdl')
}