updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / perl-search-gin / PKGBUILD
blob571fd4bff598e98a04a7b2cff67a6f744aef42cb
1 # PKGBUILD generated by pacpan
2 pkgname=perl-search-gin
3 _realname=Search-GIN
4 pkgver=0.03
5 pkgrel=1
6 pkgdesc="~"
7 arch=(i686 x86_64)
8 license=('unknown')
9 url="http://search.cpan.org/~nuffin/Search-GIN"
10 options=(!emptydirs)
12 depends=('perl-scope-guard' 'perl' 'perl-test-tempdir' 'perl-namespace-clean' 'perl-moosex-types-path-class' 'perl-moosex-types-set-object' 'perl-set-object' 'perl-test-use-ok' 'perl-data-stream-bulk' 'perl-mro-compat' 'perl-moose')
13 makedepends=('perl')
15 #provides=('Search-GIN')
16 provides=('search-gin=0.03' 'Search::GIN::SelfIDs=undef' 'perl-search-gin-selfids=undef' 'Search::GIN::Extract::Attributes=undef' 'perl-search-gin-extract-attributes=undef' 'Search::GIN::Query::Class=undef' 'perl-search-gin-query-class=undef' 'Search::GIN::Driver::Pack::Length=undef' 'perl-search-gin-driver-pack-length=undef' 'Search::GIN::Query::Attributes=undef' 'perl-search-gin-query-attributes=undef' 'Search::GIN::Extract::Multiplex=undef' 'perl-search-gin-extract-multiplex=undef' 'Search::GIN::Driver::TXN=undef' 'perl-search-gin-driver-txn=undef' 'Search::GIN::Driver::Pack::UUID=undef' 'perl-search-gin-driver-pack-uuid=undef' 'Search::GIN::Keys::Expand=undef' 'perl-search-gin-keys-expand=undef' 'Search::GIN::Driver::Pack::Values=undef' 'perl-search-gin-driver-pack-values=undef' 'Search::GIN::Indexable=undef' 'perl-search-gin-indexable=undef' 'Search::GIN::Keys=undef' 'perl-search-gin-keys=undef' 'Search::GIN::Keys::Deep=undef' 'perl-search-gin-keys-deep=undef' 'Search::GIN::Extract::Class=undef' 'perl-search-gin-extract-class=undef' 'Search::GIN::Query::Manual=undef' 'perl-search-gin-query-manual=undef' 'Search::GIN::Driver::Pack=undef' 'perl-search-gin-driver-pack=undef' 'Search::GIN::DelegateToIndexed=undef' 'perl-search-gin-delegatetoindexed=undef' 'Search::GIN::Core=undef' 'perl-search-gin-core=undef' 'Search::GIN::Driver::Pack::IDs=undef' 'perl-search-gin-driver-pack-ids=undef' 'Search::GIN::Callbacks=undef' 'perl-search-gin-callbacks=undef' 'Search::GIN::Extract=undef' 'perl-search-gin-extract=undef' 'Search::GIN::Driver::Pack::Delim=undef' 'perl-search-gin-driver-pack-delim=undef' 'Search::GIN::Extract::Callback=undef' 'perl-search-gin-extract-callback=undef' 'Search::GIN::Extract::Delegate=undef' 'perl-search-gin-extract-delegate=undef' 'Search::GIN::Driver::Hash=undef' 'perl-search-gin-driver-hash=undef' 'Search::GIN=0.03' 'perl-search-gin=0.03' 'Search::GIN::Query=undef' 'perl-search-gin-query=undef' 'Search::GIN::Driver=undef' 'perl-search-gin-driver=undef' 'Search::GIN::Keys::Join=undef' 'perl-search-gin-keys-join=undef')
18 source=(http://search.cpan.org/CPAN/authors/id/N/NU/NUFFIN/Search-GIN-0.03.tar.gz)
19 md5sums=('bd4b0de8d789646bf323fc1480360c77')
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