aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-encode/APKBUILD
blob: 7eaf948a1d8321b71f0d4ea57159cdca46a17f53 (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
69
70
71
72
# 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.88
pkgrel=1
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 && make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	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 || return 1
	local file; for file in $(find "$pkgdir" -name "*.e2x"); do
		file=${file#$pkgdir/}
		mkdir -p "$subpkgdir"/${file%/*} || return 1
		mv "$pkgdir"/$file "$subpkgdir"/$file || return 1
	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 || return 1
	done
}

md5sums="119e8668e1d7b128ce39375445526a7e  Encode-2.88.tar.gz"
sha256sums="e45ce444dfc87b01a16d3029d9a027beab1fdeff9860699b4b62a141420be338  Encode-2.88.tar.gz"
sha512sums="1261415abd9c2ad5f8d009441e1f2f541d7e94c570549d3b895df57d5c7480087ec646b2691724007a5797238cb7249347d9b97b7c46018973a7ef33274fe162  Encode-2.88.tar.gz"