archrelease: copy trunk to extra-x86_64
[arch-packages.git] / perl-dbd-mariadb / trunk / PKGBUILD
blobe018e7fb8b8d7032f6fb30da4891e7f712a730c6
1 # Maintainer: Christian Hesse <mail@eworm.de>
3 pkgname=perl-dbd-mariadb
4 pkgver=1.21
5 pkgrel=2
6 pkgdesc='MariaDB and MySQL driver for the Perl5 Database Interface (DBI)'
7 arch=('x86_64')
8 license=('GPL' 'PerlArtistic')
9 url='https://metacpan.org/release/DBD-MariaDB'
10 depends=('mariadb-libs' 'perl-dbi')
11 makedepends=('perl-devel-checklib')
12 checkdepends=('mariadb' 'perl-test-deep')
13 source=("https://cpan.metacpan.org/authors/id/P/PA/PALI/DBD-MariaDB-${pkgver}.tar.gz")
14 sha512sums=('0378b33e9cd31ced6f2331967c7ea63a233340bb4a60ef2bbece4843b3a62624875aa1a5e61a9fa1b709ecc8d67810c6fa4fb9ccc01df341e6d94325078f360a')
16 build() {
17   cd DBD-MariaDB-${pkgver}
19   perl Makefile.PL INSTALLDIRS=vendor --testsocket=/tmp/socket.mysql
20   make
23 check() {
24   cd DBD-MariaDB-${pkgver}
26   mkdir -p /tmp/mysql_test
27   mariadb-install-db \
28      --basedir=/usr \
29      --datadir=/tmp/mysql_test
30   mariadbd -P 17999 \
31      --socket=/tmp/socket.mysql \
32      --datadir=/tmp/mysql_test &
33   sleep 10
34   DAEMON_PORT=$!
35   make test
36   kill -9 $DAEMON_PORT
39 package() {
40   cd DBD-MariaDB-${pkgver}
42   make install DESTDIR="${pkgdir}"