updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / perl-data-stream-bulk / PKGBUILD
blobd7b807726b0757ff9c4c1449581d417b66f415ec
1 # PKGBUILD generated by pacpan
2 pkgname=perl-data-stream-bulk
3 _realname=Data-Stream-Bulk
4 pkgver=0.04
5 pkgrel=1
6 pkgdesc="~"
7 arch=(i686 x86_64)
8 license=('unknown')
9 url="http://search.cpan.org/~nuffin/Data-Stream-Bulk"
10 options=(!emptydirs)
12 depends=('perl-namespace-clean' 'perl-test-use-ok' 'perl-sub-exporter' 'perl-moose')
13 makedepends=('perl')
15 #provides=('Data-Stream-Bulk')
16 provides=('data-stream-bulk=0.04' 'Data::Stream::Bulk::Path::Class=undef' 'perl-data-stream-bulk-path-class=undef' 'Data::Stream::Bulk::Cat=undef' 'perl-data-stream-bulk-cat=undef' 'Data::Stream::Bulk::DBIC=undef' 'perl-data-stream-bulk-dbic=undef' 'Data::Stream::Bulk::DBI=undef' 'perl-data-stream-bulk-dbi=undef' 'Data::Stream::Bulk::Util=undef' 'perl-data-stream-bulk-util=undef' 'Data::Stream::Bulk::Array=undef' 'perl-data-stream-bulk-array=undef' 'Data::Stream::Bulk::Callback=undef' 'perl-data-stream-bulk-callback=undef' 'Data::Stream::Bulk::Filter=undef' 'perl-data-stream-bulk-filter=undef' 'Data::Stream::Bulk::DoneFlag=undef' 'perl-data-stream-bulk-doneflag=undef' 'Data::Stream::Bulk=0.04' 'perl-data-stream-bulk=0.04' 'Data::Stream::Bulk::Nil=undef' 'perl-data-stream-bulk-nil=undef')
18 source=(http://search.cpan.org/CPAN/authors/id/N/NU/NUFFIN/Data-Stream-Bulk-0.04.tar.gz)
19 md5sums=('7eeb5d96a87d346b8774f0aa146b8442')
21 build() {
22   _expected_dir="${srcdir}/${_realname}-${pkgver}"
23   if [ -d "$_expected_dir" ]; then
24     cd "$_expected_dir"
25   else
26     _expected_dir="${srcdir}/$(bsdtar -t -f $(basename $source) | head -n1)"
27     if [ -d "$_expected_dir" ]; then
28       cd "$_expected_dir"
29     else
30       _makefile=$(find $srcdir -iname Makefile.PL)
31       if [ ! -z "$_makefile" ]; then
32         _expected_dir=$(dirname $_makefile)
33         if [ -d "$_expected_dir" ]; then
34           cd "$_expected_dir"
35         else
36           echo "\e[1;31mERROR\e[0m unable to detect source directory"
37           echo "\e[1;34m-->\e[0m this is often due to CPAN's lack of standard naming conventions"
38           echo "\e[1;34m-->\e[0m it may be possible to fix this by adjusting the build function in the PKGBUILD"
39         fi
40       fi
41     fi
42   fi
43   # install module in vendor directories.
44   PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
45   make  || return 1
46   make install DESTDIR=${pkgdir} || return 1
48   # remove perllocal.pod and .packlist
49   find ${pkgdir} -name perllocal.pod -delete
50   find ${pkgdir} -name .packlist -delete
52 # END OF PACPAN PKGBUILD