aboutsummaryrefslogtreecommitdiffstats
path: root/testing/apache2-mod-perl/APKBUILD
blob: 1be93cfeb58aa66d963ff3ae219d0b32add6ed8f (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
73
74
75
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=apache2-mod-perl
_realname=mod_perl
pkgver=2.0.9
_pkgver=${pkgver/_rc1/-rc1}
pkgrel=1
pkgdesc="Perl Module for Apache2"
url="http://perl.apache.org/"
arch="all"
license="ASL 2.0"
depends="apache2 perl"
depends_dev="$pkgname"
makedepends="$depends_dev apache2-dev perl-dev perl-linux-pid apr-dev apr-util-dev"
install="$pkgname.post-install"
subpackages="$pkgname-doc $pkgname-dev"
source="http://www.eu.apache.org/dist/perl/mod_perl-$pkgver.tar.gz
	$pkgname.apache2.conf"

_builddir="$srcdir"/${_realname}-${_pkgver}
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	make source_scan
	make xs_generate

	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor \
		MP_APXS=/usr/bin/apxs \
		MP_APR_CONFIG=/usr/bin/apr-1-config || return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete

	# install the apache2 config
	install -Dm644 "$srcdir"/$pkgname.apache2.conf \
		"$pkgdir"/etc/apache2/conf.d/perl-module.conf || return 1
}

doc() {
	arch="noarch"

	# man pages
	mkdir -p "$subpkgdir"/usr/share/man || return 1
	mv "$pkgdir"/usr/share/man/man* "$subpkgdir"/usr/share/man/ \
		|| return 1

	# doc files
	_docs="BRANCHING Changes INSTALL LICENSE MANIFEST NOTICE README \
	README-SVN RELEASE STATUS SVN-MOVE"
	for _doc in $_docs; do
		install -Dm644 "$_builddir"/$_doc \
			"$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
	done
	cp -ra "$_builddir"/docs/ "$subpkgdir"/usr/share/doc/$pkgname/ \
		|| return 1
}

md5sums="fdab9a145bf35f54fce997c96c76f8e2  mod_perl-2.0.9.tar.gz
86b84bb56b49a95772a7f773fc019043  apache2-mod-perl.apache2.conf"
sha256sums="0260f26ab771c1c95fadc67544b3400e420bb30b8a77565d2d02ad05498ef52b  mod_perl-2.0.9.tar.gz
92dfc84c1506f34fc55cb65f4f2b0399254d811a03c5bcea1e6cf010e60a5227  apache2-mod-perl.apache2.conf"
sha512sums="421d385f0d5d04cbe8c1e9559960eea86a017fa1bed88e614009143550baf852e2345001faff1fb849d9b3e6383786e0011f45ebc3e7d26ad57651fbad4e2f2c  mod_perl-2.0.9.tar.gz
716650058af077b0494833301f3dfdf517499bdb2021427431cacc7f63e5fe520cd6f5f7daee44bed15e257c9a2d1fb7d18a75954455fa894dd24a8ef32af50b  apache2-mod-perl.apache2.conf"