aboutsummaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: f0da0a82ec306b3c961927312b3f29104728ee55 (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
pkgname=gstopwatch-git
pkgbase=gstopwatch
pkgver=2013.03.28
pkgrel=1
pkgdesc="A simple stopwatch, written in GTK3."
arch=(any)
url="https://github.com/Unia/gstopwatch"
license=(GPL)
depends=('gtk3')

_gitroot="https://github.com/Unia/$pkgbase"
_gitname="$pkgbase"

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

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

	make
}

pkgver() {
    cd "$srcdir/$_gitname"
    git log -1 --format="%cd" --date=short | sed 's\-\.\g'
}

package() {
	cd "$srcdir/$pkgbase/"

	make DESTDIR="$pkgdir" install
}