main/perl-mail-clamav: modernize

This commit is contained in:
Natanael Copa 2018-05-09 06:20:34 +00:00
parent d7a05202a4
commit 7678ddf678

View File

@ -17,26 +17,22 @@ subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/C/CO/CONVERTER/$_realname-$pkgver.tar.gz source="http://search.cpan.org/CPAN/authors/id/C/CO/CONVERTER/$_realname-$pkgver.tar.gz
0001.patch" 0001.patch"
_builddir="$srcdir/$_realname-$pkgver" builddir="$srcdir/$_realname-$pkgver"
prepare() { prepare() {
cd "$_builddir" cd "$builddir"
sed -i -e 's%\(clamav-config --version\)%sh /usr/bin/\1%' Makefile.PL || return 1 sed -i -e 's%\(clamav-config --version\)%sh /usr/bin/\1%' Makefile.PL
for i in $source; do default_prepare
case $i in PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
} }
build() { build() {
cd "$_builddir" cd "$builddir"
make -j1 || return 1 make -j1
} }
package() { package() {
cd "$_builddir" cd "$builddir"
make DESTDIR="$pkgdir" install make DESTDIR="$pkgdir" install
# creates file collision among perl modules # creates file collision among perl modules
find "$pkgdir" -name perllocal.pod -delete find "$pkgdir" -name perllocal.pod -delete