summaryrefslogtreecommitdiff
blob: 30a110e4d157c4c035aa0b056acb06d6df099517 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apps/dokuwiki/dokuwiki-20130510a.ebuild,v 1.2 2014/08/10 20:13:04 slyfox Exp $

EAPI="4"

inherit webapp depend.php

# upstream uses dashes in the datestamp
MY_BASE_PV="${PV:0:4}-${PV:4:2}-${PV:6:2}"
MY_PV="${MY_BASE_PV}${PV:8:1}"

DESCRIPTION="DokuWiki is a simple to use Wiki aimed at a small company's documentation needs"
HOMEPAGE="http://wiki.splitbrain.org/wiki:dokuwiki"
SRC_URI="http://www.splitbrain.org/_media/projects/${PN}/${PN}-${MY_PV}.tgz"

LICENSE="GPL-2"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="gd"

DEPEND=""
RDEPEND="
	>=dev-lang/php-5.3[xml]
	gd? ( ||
		(
			dev-lang/php[gd]
			media-gfx/imagemagick
		)
	)
"

need_httpd_cgi
need_php_httpd

S="${WORKDIR}/${PN}-${MY_PV}"

src_prepare() {
	# create initial changes file
	touch data/changes.log
}

src_install() {
	webapp_src_preinst

	dodoc README
	rm -f README COPYING

	docinto scripts
	dodoc bin/*
	rm -rf bin

	insinto "${MY_HTDOCSDIR}"
	doins -r .

	for x in $(find data/ -not -name '.htaccess'); do
		webapp_serverowned "${MY_HTDOCSDIR}"/${x}
	done

	webapp_configfile "${MY_HTDOCSDIR}"/.htaccess.dist
	webapp_configfile "${MY_HTDOCSDIR}"/conf

	for x in $(find conf/ -not -name 'msg'); do
		webapp_configfile "${MY_HTDOCSDIR}"/${x}
	done

	webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
	webapp_src_install
}

pkg_postinst() {
	if [[ -n ${REPLACING_VERSIONS} ]]; then
		elog "The 20130510a release changed the authentication methods again."
		elog "It now uses authentication plugins instead of backends and some of the old"
		elog "backends no longer work. Check https://www.dokuwiki.org/auth for more details."
	fi
}