blob: 4f286696cc5812545865556f262c2509c1f3181f (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Generated by Xyne::Arch::CPAN 0.07
pkgname=perl-crypt-argon2
pkgver=0.012
pkgrel=1
pkgdesc="This module implements the Argon2 key derivation function."
arch=('any')
url="https://metacpan.org/pod/Crypt::Argon2"
license=('PerlArtistic')
source=("https://cpan.metacpan.org/authors/id/L/LE/LEONT/Crypt-Argon2-$pkgver.tar.gz")
md5sums=('9e0f0cad6b81721e117072462a464518')
sha256sums=('8bbd20c4dc7df4da5ebd6676d31f23c64545805d450965b1f6bf6cde37381be3')
depends=('perl')
makedepends=('perl-module-build')
options=(!emptydirs)
build() {
_dir=$(find $srcdir -maxdepth 2 -type f -name 'Makefile.PL')
if [ ! -z "$_dir" ]; then
cd $(dirname "$_dir")
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
make
else
_dir=$(find $srcdir -maxdepth 2 -type f -name 'Build.PL')
if [ ! -z "$_dir" ]; then
cd $(dirname "$_dir")
PERL_MM_USE_DEFAULT=1 perl Build.PL INSTALLDIRS=vendor
./Build
else
echo "error: failed to detect build method for $pkgname"
echo "you may be able to fix this by editing the PKGBUILD"
return 1
fi
fi
}
package() {
echo "pkg starts here"
_dir=$(find $srcdir -maxdepth 2 -type f -name 'Makefile.PL')
if [ ! -z "$_dir" ]; then
cd $(dirname "$_dir")
make install DESTDIR="${pkgdir}"
else
_dir=$(find $srcdir -maxdepth 2 -type f -name 'Build.PL')
if [ ! -z "$_dir" ]; then
cd $(dirname "$_dir")
./Build install destdir=${pkgdir}
else
echo "error: failed to detect build method for $pkgname"
echo "you may be able to fix this by editing the PKGBUILD"
return 1
fi
fi
# remove perllocal.pod and .packlist
find ${pkgdir} -name perllocal.pod -delete
find ${pkgdir} -name .packlist -delete
}
# vim:set ts=2 sw=2 et:
|