updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / perl-wx-perl-processstream / PKGBUILD
blob042db53b1d6e8258b94a52162d49176e992a78ac
1 # Maintainer : Netanel Shine <netanel at archlinux.org.il>
2 # Contributor: Eliran Gonen <eliran.gonen at gmail.com>
3 pkgname=perl-wx-perl-processstream
4 _realname=Wx-Perl-ProcessStream
5 pkgver=0.30
6 pkgrel=1
7 pkgdesc="access IO of external processes via events
9 arch=(i686 x86_64)
10 license=('~
12 url="http://search.cpan.org/~mdootson/Wx-Perl-ProcessStream"
13 options=(!emptydirs)
15 depends=('perl-wx' 'perl')
17 #provides=('Wx-Perl-ProcessStream')
18 provides=('wx-perl-processstream=0.30' 'Wx::Perl::ProcessStream=0.30' 'perl-wx-perl-processstream=0.30')
20 source=(http://search.cpan.org/CPAN/authors/id/M/MD/MDOOTSON/Wx-Perl-ProcessStream-0.30.tar.gz)
21 md5sums=('840e414aae1322253887900565a6c343')
23 build() {
24   _expected_dir="${srcdir}/${_realname}-${pkgver}"
25   if [ -d "$_expected_dir" ]; then
26     cd "$_expected_dir"
27   else
28     _expected_dir="${srcdir}/$(bsdtar -t -f $(basename $source) | head -n1)"
29     if [ -d "$_expected_dir" ]; then
30       cd "$_expected_dir"
31     else
32       _makefile=$(find $srcdir -iname Makefile.PL)
33       if [ ! -z "$_makefile" ]; then
34         _expected_dir=$(dirname $_makefile)
35         if [ -d "$_expected_dir" ]; then
36           cd "$_expected_dir"
37         else
38           echo "\e[1;31mERROR\e[0m unable to detect source directory"
39           echo "\e[1;34m-->\e[0m this is often due to CPAN's lack of standard naming conventions"
40           echo "\e[1;34m-->\e[0m it may be possible to fix this by adjusting the build function in the PKGBUILD"
41         fi
42       fi
43     fi
44   fi
45   # install module in vendor directories.
46   PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
47   make  || return 1
48   make install DESTDIR=${pkgdir} || return 1
50   # remove perllocal.pod and .packlist
51   find ${pkgdir} -name perllocal.pod -delete
52   find ${pkgdir} -name .packlist -delete