aboutsummaryrefslogtreecommitdiffstats
path: root/testing/apache2-mod-perl/APKBUILD
blob: c5bc58c8a28f19e9c35777cc002fed7611004462 (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
76
77
78
79
80
81
82
83
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=apache2-mod-perl
_realname=mod_perl
pkgver=2.0.8
pkgrel=0
pkgdesc="Perl Module for Apache2"
url="http://perl.apache.org/"
arch="all"
license="ASL 2.0"
depends="apache2 perl"
depends_dev=""
makedepends="$depends_dev apache2-dev perl-dev perl-linux-pid apr-dev"
install="$pkgname.post-install"
subpackages="$pkgname-doc $pkgname-dev"
source="http://search.cpan.org/CPAN/authors/id/P/PH/PHRED/${_realname}-${pkgver}.tar.gz
	$pkgname.apache2.conf
	mod_perl-2.0.6-nolfs.patch
	mod_perl-remote-ip.patch
	"

_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="df89f50a39e93ba5054651c281483ffb  mod_perl-2.0.8.tar.gz
86b84bb56b49a95772a7f773fc019043  apache2-mod-perl.apache2.conf
d80a159888ee934de9e959c1926423ff  mod_perl-2.0.6-nolfs.patch
6a68139aeb26a690d1a2c0a8e12e60c2  mod_perl-remote-ip.patch"
sha256sums="35dc1b7a40a90a395ce88bba2df84f22289975f34d1757de6d715560c20a20e6  mod_perl-2.0.8.tar.gz
92dfc84c1506f34fc55cb65f4f2b0399254d811a03c5bcea1e6cf010e60a5227  apache2-mod-perl.apache2.conf
5d1b6a051d847108b23b5dc06ea5885c37dd81d3a9156b69d179d95b5cf92f08  mod_perl-2.0.6-nolfs.patch
c2c0b24f0a700c77fd89018681689a752eab8d06068bb285bbe38b6a34ddfcdd  mod_perl-remote-ip.patch"
sha512sums="d5090651699c4436fe8d0a525226543c971aa05db337dc1b1e89023183df1c7dd8b8775f3a0f7d3b9ec40e8c058ac23bd24141cf15a5fe5806226d634dfb4c87  mod_perl-2.0.8.tar.gz
716650058af077b0494833301f3dfdf517499bdb2021427431cacc7f63e5fe520cd6f5f7daee44bed15e257c9a2d1fb7d18a75954455fa894dd24a8ef32af50b  apache2-mod-perl.apache2.conf
75515c3bdb70b25756bba81f9b2c643b34b80bfc3e0e449971d8b6a3860639767b7393002ab3793a9dc8d37855a2aafbeabc2a8e957a5834f480ccc38bb605ba  mod_perl-2.0.6-nolfs.patch
80bc16d4c17387ddb6e4106b7b7eeb572cfbd86f88313026c18a2f08646cc6ca916b2f275a126ec52e4e8fb393d31d1db737ddd4aa2e1b34573b1991979d0660  mod_perl-remote-ip.patch"