summarylogtreecommitdiffstats
path: root/PKGBUILD.tt
blob: 907b2d739aaf3e84a944a47e826f63d22cbe2d00 (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
# CPAN Name  : WWW::Shorten
# Contributor: [% packager %]
# Generator  : CPANPLUS::Dist::Arch [% version %]

pkgname=[% pkgname %]
pkgver=[% pkgver %]
pkgrel=[% pkgrel %]
pkgdesc='Interface to URL shortening sites'
arch=('any')
url='[% url %]'
license=('PerlArtistic' 'GPL')
depends=('perl-libwww' 'perl-try-tiny')
optdepends=('perl-config-auto: for configuration file support')
source=([% source %])
options=(!emptydirs)
md5sums=('[% md5sums %]')

sanitize() {
	unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
	export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL="--skipdeps" MODULEBUILDRC=/dev/null
}

build() {
	cd [% distdir %]
	sanitize
	/usr/bin/perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	cd [% distdir %]
	sanitize
	make test
}

package() {
	cd [% distdir %]
	sanitize
	make install DESTDIR="$pkgdir"
	find "$pkgdir" \( -name .packlist -o -name perllocal.pod \) -delete
}