2018-07-25 12:52:50 +00:00

76 lines
1.9 KiB
Plaintext

# Automatically generated by apkbuild-cpan, template 1
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-encode
_pkgreal=Encode
pkgver=2.98
pkgrel=0
pkgdesc="character encodings in Perl"
url="http://search.cpan.org/dist/Encode/"
arch="all"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=""
depends="$cpandepends"
depends_dev="$pkgname-utils"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils::noarch"
source="http://search.cpan.org/CPAN/authors/id/D/DA/DANKOGAI/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
prepare() {
cd "$builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}
build() {
cd "$builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
make
}
check() {
cd "$builddir"
make test
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
utils() {
replaces="perl-utils"
pkgdesc="$pkgdesc (utilities)"
depends="$pkgname perl"
provides="$pkgname-piconv"
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
dev() {
default_dev
replaces="perl-dev"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/enc2xs "$subpkgdir"/usr/bin
local file; for file in $(find "$pkgdir" -name "*.e2x"); do
file=${file#$pkgdir/}
mkdir -p "$subpkgdir"/${file%/*} || return 1
mv "$pkgdir"/$file "$subpkgdir"/$file
done
}
doc() {
default_doc
replaces="perl-doc"
local file; for file in $(find "$pkgdir" -name "*.pod"); do
file=${file#$pkgdir/}
mkdir -p "$subpkgdir"/${file%/*} || return 1
mv "$pkgdir"/$file "$subpkgdir"/$file
done
}
sha512sums="ee43ed683bc5d03cbc383a3cb56895a4f1cd366ef47031efd1ea0f10124be9f7f1f8c32eaab92155daf8df552624dc9629a18af5b2eab10f17c66e3a82bacd64 Encode-2.98.tar.gz"