forked from Daenyth/pkgtools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
PKGBUILD-git
45 lines (39 loc) · 1.2 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
43
44
45
# Contributor: Daenyth <Daenyth+Arch AT gmail DOT com>
pkgname=pkgtools-git
pkgver=20110902
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' 'python')
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'
'abs: Provides proto packaging files for newpkg'
'python-yaml: for gem2arch')
options=('!strip')
_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: