updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / perl-b-c / PKGBUILD
blobe0d6ad119d8495f244850da5e2239deaf22bb64e
1 # Contributor: 3ED <krzysztof1987 at gmail dot com>
3 pkgname=perl-b-c
4 _lastauthor=R/RU/RURBAN
5 _pkgname=B-C
6 pkgver=1.38
7 pkgrel=1
8 pkgdesc="Perl compiler's C backend"
9 arch=('i686' 'x86_64')
10 license=('PerlArtistic' 'GPL')
11 options=('!emptydirs')
12 depends=('perl-ipc-run' 'perl-opcodes' 'perl-b-flags' 'perl-time-hires')
13 url="http://search.cpan.org/dist/${_pkgname}/"
14 source=(http://search.cpan.org/CPAN/authors/id/${_lastauthor}/${_pkgname}-${pkgver}.tar.gz)
15 sha256sums=('921f96b6e289ff2e81c7b96a97cafe6334190e1428abbf552ea3ad70255d2ebc')
17 build() {
18   cd "${srcdir}/${_pkgname}-${pkgver}"
20   export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL="--skipdeps" \
21     PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
22     PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
23     MODULEBUILDRC=/dev/null
25   if [ -f "Build.PL" ]; then
26     perl Build.PL
27     perl Build
28   elif [ -f "Makefile.PL" ]; then
29     perl Makefile.PL
30     make
31   else
32     return 1
33   fi
35 check() {
36   cd "${srcdir}/${_pkgname}-${pkgver}"
38   if [ -f "Build.PL" ]; then
39     perl Build test
40   elif [ -f "Makefile.PL" ]; then
41     make test
42   fi
44 package() {
45   cd "${srcdir}/${_pkgname}-${pkgver}"
47   if [ -f "Build.PL" ]; then
48     perl Build install
49   elif [ -f "Makefile.PL" ]; then
50     make install
51   fi
53   find "${pkgdir}" -name .packlist -o -name perllocal.pod -delete