aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-mail-clamav/APKBUILD
blob: 03b8a070b03f531c7d20fb3ac1c756a2aab7c8df (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
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-mail-clamav
_pkgname=Mail-ClamAV
pkgver=0.30
pkgrel=1
pkgdesc="Perl extension for the clamav virus scanner"
url="https://metacpan.org/pod/Mail::ClamAV"
arch="all"
license="Artistic-1.0-Perl OR GPL-1.0-or-later"
depends="perl clamav"
makedepends="bzip2-dev clamav-dev zlib-dev
	perl-dev perl-inline perl-inline-c perl-parse-recdescent
	"
options="!check" # requires clamav db in /var/lib/clamav
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/C/CA/CAVAC/Mail-ClamAV-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	sed -i -e 's%\(clamav-config --version\)%sh /usr/bin/\1%' Makefile.PL
	default_prepare
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	make -j1
}

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

sha512sums="0a6a029df2a46cbf09eeade22cd8b525f4e75c80f05a4833e41c52b4c1653f8f1cca6e19f6011354f053e3b4ec235d75bcf672bf91f63d0f5a92914f2e1f4e89  Mail-ClamAV-0.30.tar.gz"