Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD-variable-magic-0.51

By: a guest on Sep 30th, 2012  |  syntax: Bash  |  size: 1.19 KB  |  views: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Maxwell Pray a.k.a. Synthead <synthead@gmail.com>
  2. # Contributor: Justin Davis <jrcd83@gmail.com>
  3.  
  4. pkgname=perl-variable-magic
  5. _cpanname="Variable-Magic"
  6. pkgver=0.51
  7. pkgrel=1
  8. pkgdesc="Associate user-defined magic to variables from Perl."
  9. arch=('i686' 'x86_64')
  10. license=('PerlArtistic' 'GPL')
  11. options=('!emptydirs')
  12. depends=('perl>=5.5.0')
  13. url="http://search.cpan.org/dist/$_cpanname"
  14. source=("http://search.cpan.org/CPAN/authors/id/V/VP/VPIT/$_cpanname-$pkgver.tar.gz")
  15. md5sums=('293ca7401f0d7ad8bb94424b916acfa6')
  16.  
  17. # Function to change to the working directory and set
  18. # environment variables to override undesired options.
  19. prepareEnvironment() {
  20.         cd "$srcdir/$_cpanname-$pkgver"
  21.         export \
  22.                 PERL_MM_USE_DEFAULT=1 \
  23.                 PERL_AUTOINSTALL=--skipdeps \
  24.                 PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
  25.                 PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
  26.                 MODULEBUILDRC=/dev/null
  27. }
  28.  
  29. build() {
  30.         prepareEnvironment
  31.         /usr/bin/perl Makefile.PL
  32.         make
  33. }
  34.  
  35. check() {
  36.         prepareEnvironment
  37.         make test
  38. }
  39.  
  40. package() {
  41.         prepareEnvironment
  42.         make install
  43.  
  44.         # Remove "perllocal.pod" and ".packlist".
  45.         find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
  46. }
clone this paste RAW Paste Data