summaryrefslogtreecommitdiff
path: root/user/perl-dbd-mariadb/APKBUILD
blob: 12c3b0d1b2eae3c0c6fa44768128e7dc0d9a0561 (plain) (blame)
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
# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=perl-dbd-mariadb
_pkgreal=DBD-MariaDB
_author=PALI
_au=${_author%%"${_author#??}"}
_a=${_author%%"${_author#?}"}
pkgver=1.23
pkgrel=0
pkgdesc="Perl module for working with MariaDB and MySQL"
url="https://metacpan.org/dist/DBD-MariaDB"
arch="all"
options="!check"  # tests require running mysql/mariadb locally
license="Artistic-1.0-Perl OR GPL-1.0+"
depends="perl perl-dbi"
makedepends="perl-dev perl-devel-checklib mariadb-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor --testuser=test
	make
}

check() {
	# do the following before running tests:
	# mysql> grant all privileges on test.* to 'test'@'localhost' identified by 's3kr1t';
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="2217f36606caab477b8fa931a69b53b7f706a25cf013e4b62aa1b0b48905aba24b724604b4b99e83dea08d967848119447f35ff8e6b5eb80c7fea4e8c084de16  DBD-MariaDB-1.23.tar.gz"