Gentoo Archives: gentoo-commits

From: "Jorge Manuel B. S. Vicetto" <jmbsvicetto@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/jmbsvicetto:master commit in: www-apps/horde/, eclass/
Date: Mon, 30 Jan 2012 11:57:12
Message-Id: cc5a9f50fce5e13bfa6676ad4fbc3890833c93ef.jmbsvicetto@gentoo
1 commit: cc5a9f50fce5e13bfa6676ad4fbc3890833c93ef
2 Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 30 12:09:27 2012 +0000
4 Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 30 12:09:27 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/jmbsvicetto.git;a=commit;h=cc5a9f50
7
8 Initial work on horde-4.
9
10 ---
11 eclass/horde-v2.eclass | 165 ++++++++++++++++++++++++++++++++++++
12 www-apps/horde/Manifest | 2 +
13 www-apps/horde/horde-4.0.13.ebuild | 36 ++++++++
14 3 files changed, 203 insertions(+), 0 deletions(-)
15
16 diff --git a/eclass/horde-v2.eclass b/eclass/horde-v2.eclass
17 new file mode 100644
18 index 0000000..653369b
19 --- /dev/null
20 +++ b/eclass/horde-v2.eclass
21 @@ -0,0 +1,165 @@
22 +# Copyright 1999-2011 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +# $Header: $
25 +
26 +# @ECLASS: horde-v2.eclass
27 +# @MAINTAINER:
28 +# Jorge Manuel B. S. Vicetto <jmbsvicetto@g.o>
29 +# @DESCRIPTION:
30 +# Help manage the horde project http://www.horde.org/
31 +#
32 +# Based on the horde eclass:
33 +# Author: Mike Frysinger <vapier@g.o>
34 +# CVS additions by Chris Aniszczyk <zx@×××××××××.net>
35 +# SNAP additions by Jonathan Polansky <jpolansky@×××××××××.edu>
36 +#
37 +# This eclass provides generic functions to make the writing of horde
38 +# ebuilds fairly trivial since there are many horde applications and
39 +# they all share the same basic install process.
40 +
41 +# @ECLASS-VARIABLE: EHORDE_SNAP
42 +# @DESCRIPTION:
43 +# Track whether this a snapshot version or not
44 +
45 +# @ECLASS-VARIABLE: EHORDE_SNAP_BRANCH
46 +# @DESCRIPTION:
47 +# You set this via the ebuild to whatever branch you wish to grab a
48 +# snapshot of. Typically this is 'HEAD' or 'RELENG'.
49 +
50 +# @ECLASS-VARIABLE: EHORDE_VCS
51 +# @DESCRIPTION:
52 +# Track whether this is a live version or not
53 +
54 +# This eclass requires at least EAPI-2
55 +case ${EAPI:-0} in
56 + 4|3|2) : ;;
57 + *) die "EAPI=${EAPI} is not supported" ;;
58 +esac
59 +
60 +inherit webapp eutils php-pear-r1
61 +
62 +if [[ ${PV} == 9999* ]]; then
63 + EHORDE_VCS="git-2"
64 + inherit ${EHORDE_VCS}
65 +fi
66 +
67 +[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/horde-}"
68 +[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ=""
69 +
70 +SRC_URI="http://pear.horde.org/get/${P}.tgz"
71 +HOMEPAGE="http://www.horde.org/${HORDE_PN}"
72 +LICENSE="LGPL-2"
73 +S=${WORKDIR}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}
74 +
75 +if [[ ${PV} == 9998* ]] ; then
76 + EHORDE_SNAP="true"
77 +# EHORDE_SNAP_BRANCH=""
78 + let date=$(date +%s)-24*60*60
79 + EHORDE_SNAP_PV=$(date -s @${date} +%Y-%m-%d)
80 +
81 + SRC_URI="http://ftp.horde.org/pub/snaps/${SNAP_PV}/${HORDE_PN}-git.tar.gz"
82 + S=${WORKDIR}/${HORDE_PN}
83 +fi
84 +
85 +IUSE="vhosts"
86 +
87 +EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
88 +
89 +# INSTALL_DIR is used by webapp.eclass when USE=-vhosts
90 +INSTALL_DIR="/horde"
91 +[[ ${HORDE_PN} != "horde" && ${HORDE_PN} != "horde-groupware" && ${HORDE_PN} != "horde-webmail" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}"
92 +
93 +HORDE_APPLICATIONS="${HORDE_APPLICATIONS} ."
94 +
95 +horde-v2_pkg_setup() {
96 + webapp_pkg_setup
97 +}
98 +
99 +horde-v2_src_unpack() {
100 + if [[ -n ${EHORDE_VCS} ]] ; then
101 + ${EHORDE_VCS}_src_unpack
102 + else
103 + unpack ${A}
104 + fi
105 + cd "${S}"
106 +
107 + [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES}
108 +
109 + for APP in ${HORDE_APPLICATIONS}
110 + do
111 + [[ -f ${APP}/test.php ]] && chmod 000 ${APP}/test.php
112 + done
113 +}
114 +
115 +horde-v2_src_install() {
116 + webapp_src_preinst
117 +
118 + local destdir=${MY_HTDOCSDIR}
119 +
120 + # Work-around when dealing with live sources
121 + [[ -n ${EHORDE_VCS} ]] && cd ${HORDE_PN}
122 +
123 + # Install docs and then delete them (except for CREDITS which
124 + # many horde apps include in their help page #121003)
125 + dodoc README docs/*
126 + mv docs/CREDITS "${T}"/
127 + rm -rf COPYING LICENSE README docs/*
128 + mv "${T}"/CREDITS docs/
129 +
130 + dodir ${destdir}
131 + cp -r . "${D}"/${destdir}/ || die "install files"
132 +
133 + for APP in ${HORDE_APPLICATIONS}
134 + do
135 + for DISTFILE in ${APP}/config/*.dist
136 + do
137 + if [[ -f ${DISTFILE/.dist/} ]] ; then
138 + webapp_configfile "${MY_HTDOCSDIR}"/${DISTFILE/.dist/}
139 + fi
140 + done
141 + if [[ -f ${APP}/config/conf.php ]] ; then
142 + webapp_serverowned "${MY_HTDOCSDIR}"/${APP}/config/conf.php
143 + webapp_configfile "${MY_HTDOCSDIR}"/${APP}/config/conf.php
144 + fi
145 + done
146 +
147 + [[ -n ${HORDE_RECONFIG} ]] && webapp_hook_script ${HORDE_RECONFIG}
148 + [[ -n ${HORDE_POSTINST} ]] && webapp_postinst_txt en ${HORDE_POSTINST}
149 +
150 + webapp_src_install
151 +}
152 +
153 +horde-v2_pkg_postinst() {
154 + if [ -e ${ROOT}/usr/share/doc/${PF}/INSTALL* ] ; then
155 + elog "Please read the INSTALL file in /usr/share/doc/${PF}."
156 + fi
157 +
158 + einfo "Before this package will work, you have to setup the configuration files."
159 + einfo "Please review the config/ subdirectory of ${HORDE_PN} in the webroot."
160 +
161 + if [ -e ${ROOT}/usr/share/doc/${PF}/SECURITY* ] ; then
162 + ewarn
163 + ewarn "Users are HIGHLY recommended to consult the SECURITY guide in"
164 + ewarn "/usr/share/doc/${PF} before going into production with Horde."
165 + fi
166 +
167 + if [[ ${HORDE_PN} != "horde" && ${HORDE_PN} != "horde-groupware" && ${HORDE_PN} != "horde-webmail" ]] ; then
168 + ewarn
169 + ewarn "Make sure ${HORDE_PN} is accounted for in Horde\'s root"
170 + ewarn " config/registry.php"
171 + fi
172 +
173 + if [[ -n ${EHORDE_VCS} ]] ; then
174 + ewarn
175 + ewarn "Use these live versions at your own risk."
176 + ewarn "They tend to break things when working with the non live versions of horde."
177 + fi
178 +
179 + if use vhosts ; then
180 + ewarn
181 + ewarn "When installing Horde into a vhost dir, you will need to use the"
182 + ewarn "-d option so that it is installed into the proper location."
183 + fi
184 +
185 + webapp_pkg_postinst
186 +}
187
188 diff --git a/www-apps/horde/Manifest b/www-apps/horde/Manifest
189 new file mode 100644
190 index 0000000..424a0d3
191 --- /dev/null
192 +++ b/www-apps/horde/Manifest
193 @@ -0,0 +1,2 @@
194 +DIST horde-4.0.13.tgz 3933774 RMD160 9a7a812c7653009098f25038a5cf9487ec0b58ba SHA1 49c2e7a4088d258d42854f6177a5173c38f32343 SHA256 826cf64dd5d1e13774e308e7d8abe453647771be5787a3eee77f6e24817589fd
195 +EBUILD horde-4.0.13.ebuild 882 RMD160 19b2c8645eda7df1166346778f809a7861621ca6 SHA1 2bd8bef9001ef1e9f77bc618db8bfc1833c1204c SHA256 84578892d1931f9e4c21c16da3dbb65179b2d773dfbd83f60ed850c8fb20ac39
196
197 diff --git a/www-apps/horde/horde-4.0.13.ebuild b/www-apps/horde/horde-4.0.13.ebuild
198 new file mode 100644
199 index 0000000..7afbd41
200 --- /dev/null
201 +++ b/www-apps/horde/horde-4.0.13.ebuild
202 @@ -0,0 +1,36 @@
203 +# Copyright 1999-2010 Gentoo Foundation
204 +# Distributed under the terms of the GNU General Public License v2
205 +# $Header: /var/cvsroot/gentoo-x86/www-apps/horde/horde-3.3.9.ebuild,v 1.7 2010/10/19 02:16:58 jer Exp $
206 +
207 +EAPI=4
208 +
209 +inherit horde-v2
210 +
211 +DESCRIPTION="Horde Application Framework"
212 +HOMEPAGE="http://www.horde.org/"
213 +
214 +KEYWORDS="alpha amd64 hppa ~ia64 ppc sparc x86"
215 +IUSE="mysql"
216 +
217 +DEPEND=""
218 +RDEPEND="dev-lang/php[session,xml]
219 + >=dev-libs/libxml2-2.4.21
220 + dev-php/PEAR-Log
221 + dev-php/PEAR-Mail_Mime
222 + >=sys-devel/gettext-0.10.40
223 + >=www-apps/horde-pear-1.3
224 + mysql? ( dev-php/PEAR-DB )"
225 +
226 +src_unpack() {
227 + horde_src_unpack
228 + cd "${S}"
229 + chmod 600 scripts/sql/create.*.sql #137510
230 +}
231 +
232 +pkg_postinst() {
233 + horde_pkg_postinst
234 + elog "Horde requires PHP to have:"
235 + elog " ==> 'short_open_tag enabled = On'"
236 + elog " ==> 'magic_quotes_runtime set = Off'"
237 + elog " ==> 'file_uploads enabled = On'"
238 +}