-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPKGBUILD
56 lines (50 loc) · 1.13 KB
/
PKGBUILD
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
# Justin Davis <[email protected]>
pkgname=perl-alpm-git
pkgver=20130411
pkgrel=1
pkgdesc='Developer release for ALPM perl module'
arch=(i686 x86_64)
license=(PerlArtistic GPL)
options=('!emptydirs')
depends=(perl)
provides=(perl-alpm)
url='http://github.com/juster/perl-alpm'
md5sums=()
source=()
_gitroot='git://github.com/juster/perl-alpm.git'
_gitbranch=${BRANCH:-master}
build()
(
_dir="$startdir/$pkgname"
msg 'Creating ALPM developer package...'
if [ -d "$_dir" ] ; then
warning 'Repository directory already exists!'
msg2 'Attempting to pull from repo...'
cd "$_dir"
git pull origin "$_gitbranch"
else
msg2 "Cloning $_gitroot repository..."
git clone "$_gitroot" "$_dir"
cd "$_dir"
fi
msg2 "Checking out the $_gitbranch branch..."
git checkout "$_gitbranch"
if [ "$?" -ne 0 ] ; then
error "Failed to checkout the $_gitbranch branch... aborting."
return 1
fi
msg 'Building ALPM...'
/usr/bin/perl Makefile.PL
make
)
check()
{
cd "$startdir/$pkgname"
make test
}
package()
{
cd "$startdir/$pkgname"
make install INSTALLDIRS=vendor "DESTDIR=$pkgdir"
find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}