forked from Daenyth/pkgtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD-git
42 lines (36 loc) · 1.11 KB
/
PKGBUILD-git
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
# Contributor: Daenyth <Daenyth+Arch AT gmail DOT com>
pkgname=pkgtools-git
pkgver=20110116
pkgrel=1
pkgdesc="A collection of scripts for Arch Linux packages"
arch=('i686' 'x86_64')
url="http://github.com/Daenyth/pkgtools"
license=('GPL')
source=()
depends=('bash>=4' 'libarchive' 'pcre' 'python2' 'python' 'python-yaml')
makedepends=(git)
provides=(pkgtools)
conflicts=(pkgtools)
backup=('etc/pkgtools/newpkg.conf' 'etc/pkgtools/pkgfile.conf' 'etc/pkgtools/spec2arch.conf')
install=pkgtools.install
optdepends=('cron: For pkgfile --update entry')
_gitroot="git://github.com/Daenyth/pkgtools.git"
_gitname="pkgtools"
build() {
cd ${srcdir}
msg "Connecting to GIT server...."
if [ -d ${srcdir}/$_gitname ] ; then
cd $srcdir/$_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
[[ -d $srcdir/$_gitname-build ]] && rm -r ${srcdir}/$_gitname-build
cp -r ${srcdir}/$_gitname ${srcdir}/$_gitname-build
cd ${srcdir}/$_gitname-build
make
make DESTDIR=${pkgdir} install
}
# vim:set ts=2 sw=2 et: