summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-sgmls/PKGBUILD
blob: 062b38a4dad783c345893d30cf5d99ed17921c3e (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
# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

_cpanname=SGMLSpm
pkgname=perl-sgmls
epoch=1
pkgver=1.1
pkgrel=5
pkgdesc="A Post-Processor for SGMLS and NSGMLS"
arch=('any')
url="http://search.cpan.org/dist/SGMLSpm"
license=('GPL' 'PerlArtistic')
depends=('perl')
options=('!emptydirs' 'docs')
source=(http://search.cpan.org/CPAN/authors/id/R/RA/RAAB/SGMLSpm-$pkgver.tar.gz)
md5sums=('746c74ae969992cedb1a2879b4168090')

prepare() {
	cd "$srcdir/$_cpanname-$pkgver"
	find . -type f -exec chmod 0644 {} \;
}

prepareEnvironment() {
	cd "$srcdir/$_cpanname-$pkgver"
	export \
		PERL_MM_USE_DEFAULT=1 \
		PERL_AUTOINSTALL=--skipdeps \
		PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='"$pkgdir"'" \
		PERL_MB_OPT="--installdirs vendor --destdir '"$pkgdir"'" \
		MODULEBUILDRC=/dev/null
}

build() {
	prepareEnvironment
	/usr/bin/perl Makefile.PL
	make
}

check() {
	prepareEnvironment
	make test
}

package() {
	prepareEnvironment
	make install
	find "$pkgdir" -name .packlist -o -name perllocal.pod -delete

	# FS#51874
	ln -sv /usr/bin/vendor_perl/sgmlspl.pl $pkgdir/usr/bin/sgmlspl
}