summaryrefslogtreecommitdiff
path: root/pcr/mycron-git/PKGBUILD
blob: c80b79b1d12b7a038ca17c3bac83891fdba3a27c (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
# Contributor (Arch): Dirk Sohler <spam@0x7be.de>               
# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>

pkgname=mycron-git
pkgver=20121116
pkgrel=1
pkgdesc='A standards compliant and convenient crontab management system.'

url='https://dev.0x7be.de/mycron'
arch=('any')
license=('GPL')

depends=('python>=3.0')
makedepends=('git')

install=mycron.install

source=('mycron.install')
sha256sums=('a5406ae03412d3a1aaf6aadb902b4dd40bb6eadb21aa2ffb7c21ae95d656f598')

_gitroot='https://github.com/dsohler/mycron'
_gitname='master'

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

	if [[ -d "$_gitname" ]]; then
		cd "$_gitname" && git pull origin
		msg "The local files are updated."
	else
		git clone "$_gitroot" "$_gitname"
	fi

	msg "GIT checkout done or server timeout"
	msg "Starting build..."

	rm -rf "$srcdir/$_gitname-build"
	git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
}

package() {
	cd "$srcdir/$_gitname-build"
	install -Dm 755 mycron.py $pkgdir/usr/bin/mycron
	install -Dm 644 example-config.cfg \
		$pkgdir/usr/share/doc/mycron/example-config.cfg
	install -Dm 644 example.crontab \
		$pkgdir/usr/share/doc/mycron/example.crontab
}