From e7b9c9697e6a50c3b9e78941fa95ba11c716d238 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Jun 2011 22:46:45 +0000 Subject: Wed Jun 1 22:46:45 UTC 2011 --- testing/perl-dbd-mysql/PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 testing/perl-dbd-mysql/PKGBUILD (limited to 'testing/perl-dbd-mysql/PKGBUILD') diff --git a/testing/perl-dbd-mysql/PKGBUILD b/testing/perl-dbd-mysql/PKGBUILD new file mode 100644 index 000000000..42d22d211 --- /dev/null +++ b/testing/perl-dbd-mysql/PKGBUILD @@ -0,0 +1,49 @@ +# $Id: PKGBUILD 125309 2011-05-25 19:54:00Z remy $ +# Maintainer: kevin +# Contributor: Eric Johnson + +pkgname=perl-dbd-mysql +_realname=DBD-mysql +pkgver=4.019 +pkgrel=1 +pkgdesc="Perl/CPAN DBD::mysql module for interacting with MySQL via DBD" +arch=(i686 x86_64) +license=('GPL' 'PerlArtistic') +url="http://search.cpan.org/dist/${_realname}/" +depends=('libmysqlclient' 'perl-dbi' 'perl>=5.14.0') +makedepends=('mysql') +options=(!emptydirs) +source=(http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/${_realname}-${pkgver}.tar.gz) +md5sums=('566d98ab8ffac9626a31f6f6d455558e') + +build() { + cd ${srcdir}/${_realname}-${pkgver} + + # install module in vendor directories. + perl Makefile.PL INSTALLDIRS=vendor --testsocket=/tmp/socket.mysql + make +} + +check() { + cd ${srcdir}/${_realname}-${pkgver} + mkdir -p /tmp/mysql_test + mysql_install_db \ + --basedir=/usr \ + --datadir=/tmp/mysql_test + mysqld -P 17999 \ + --socket=/tmp/socket.mysql \ + --datadir=/tmp/mysql_test & + sleep 10 + DAEMON_PORT=$! + make test || true + kill -9 $DAEMON_PORT +} + +package() { + cd ${srcdir}/${_realname}-${pkgver} + make install DESTDIR=${pkgdir} + + # remove perllocal.pod and .packlist + find ${pkgdir} -name perllocal.pod -delete + find ${pkgdir} -name .packlist -delete +} -- cgit v1.2.3-54-g00ecf