summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-term-readkey/PKGBUILD
blob: aeda3a6dcef13912021a7998da16e4b68f6c102e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
# Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org>
# Contributor: Francois Charette <francois.archlinux.org>

pkgname=perl-term-readkey
_realname=TermReadKey
pkgver=2.37
pkgrel=4
pkgdesc="Provides simple control over terminal driver modes"
arch=('x86_64')
license=('custom')
depends=('perl' 'glibc')
url="http://search.cpan.org/~jstowe/${_realname}/"
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/J/JS/JSTOWE/${_realname}-$pkgver.tar.gz)
md5sums=('e8ea15c16333ac4f8d146d702e83cc0c')

build() {
  cd "${srcdir}/TermReadKey-$pkgver"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/TermReadKey-$pkgver"
  make test
}

package() {
  cd "${srcdir}/TermReadKey-$pkgver"
  make DESTDIR="${pkgdir}" install
  install -d "${pkgdir}/usr/share/licenses/$pkgname/"
  head -7 README > "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
# template start; name=perl-binary-module-dependency; version=1;
if [[ $(find "$pkgdir/usr/lib/perl5/" -name "*.so") ]]; then
	_perlver_min=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);')
	_perlver_max=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]+1);')
	depends+=("perl>=$_perlver_min" "perl<$_perlver_max")
fi
# template end;
}