archrelease: copy trunk to extra-x86_64
[arch-packages.git] / perl-dbd-mariadb / trunk / PKGBUILD
blob77bd462ca8408a860d8c6aed58b2f1c5ff7b844d
1 # Maintainer: Christian Hesse <mail@eworm.de>
3 pkgname=perl-dbd-mariadb
4 pkgver=1.22
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=('f2bd16fa609b94bd5eb538b38b122dec6a4484da062f2cc84fa6ca4a5dfc30e7ff754a00ece22a3a30297c92b4fd3f878ab0e2a581b7082cd1b9a00f33e2b2c7')
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}"