blob: 822b8322bb7f17d1cca09c975a61d0fa276030bc (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Maintainer: peippo <christoph.fink@gmail.com>
pkgname=perl-file-scan-clamav
_dist=File-Scan-ClamAV
pkgdesc="File::Scan::ClamAV - Connect to a local Clam Anti-Virus clamd service"
url="https://metacpan.org/release/$_dist"
pkgver=1.95
pkgrel=7
arch=('any')
license=('PerlArtistic')
depends=(
"clamav"
"perl"
)
checkdepends=(
"gzip"
"zip"
)
source=(
"https://cpan.metacpan.org/authors/id/E/ES/ESAYM/$_dist-$pkgver.tar.gz"
"streamscan-new-eicar-signature.patch"
)
sha256sums=(
"d2418fcc8022fb541da609df47393219514b02c4968bd92d6372d2f836639f85"
"8483ba0cdbdf0992c053b476fc82b9cbbea56e86f301464ffc38bc942e548233"
)
options=('!emptydirs' purge)
prepare() {
cd "$srcdir/$_dist-$pkgver"
patch --forward --strip=1 --input="${srcdir}/streamscan-new-eicar-signature.patch"
}
build() {
cd "$srcdir/$_dist-$pkgver"
unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
/usr/bin/perl Makefile.PL
make
}
check() {
# the .gz, .zip virus test signatures inside the package
# are not valid (anymore), only the uncompressed file is
# replace the compressed files with new archives
# containing the uncompressed test file
cd "$srcdir/$_dist-$pkgver/testfiles"
rm clamavtest.gz clamavtest.zip
gzip -k clamavtest
zip -q clamavtest.zip clamavtest
cd "$srcdir/$_dist-$pkgver"
unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
export PERL_MM_USE_DEFAULT=1
make test
}
package() {
cd "$srcdir/$_dist-$pkgver"
unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}
|