diff options
author | Renat Lumpau <rl03@gentoo.org> | 2006-01-31 17:01:17 +0000 |
---|---|---|
committer | Renat Lumpau <rl03@gentoo.org> | 2006-01-31 17:01:17 +0000 |
commit | 1305faed8ac60a70cc0f1f9a89c01005f2b0e30d (patch) | |
tree | 9350b10588662f7947a8df05c11982e279ad0e50 /www-apache | |
parent | Mark 2.7 stable on alpha (diff) | |
download | historical-1305faed8ac60a70cc0f1f9a89c01005f2b0e30d.tar.gz historical-1305faed8ac60a70cc0f1f9a89c01005f2b0e30d.tar.bz2 historical-1305faed8ac60a70cc0f1f9a89c01005f2b0e30d.zip |
Fixes for bug #121041, limited support for LINGUAS
Package-Manager: portage-2.1_pre3-r1
Diffstat (limited to 'www-apache')
-rw-r--r-- | www-apache/mod_survey/ChangeLog | 9 | ||||
-rw-r--r-- | www-apache/mod_survey/Manifest | 16 | ||||
-rw-r--r-- | www-apache/mod_survey/files/digest-mod_survey-3.2.3-r1 (renamed from www-apache/mod_survey/files/digest-mod_survey-3.2.3) | 0 | ||||
-rw-r--r-- | www-apache/mod_survey/files/language-list.txt | 5 | ||||
-rw-r--r-- | www-apache/mod_survey/files/postinstall-en.txt | 2 | ||||
-rw-r--r-- | www-apache/mod_survey/files/reconfig | 15 | ||||
-rw-r--r-- | www-apache/mod_survey/mod_survey-3.2.3-r1.ebuild (renamed from www-apache/mod_survey/mod_survey-3.2.3.ebuild) | 45 |
7 files changed, 80 insertions, 12 deletions
diff --git a/www-apache/mod_survey/ChangeLog b/www-apache/mod_survey/ChangeLog index 1c2d6066da77..0c2597187dd7 100644 --- a/www-apache/mod_survey/ChangeLog +++ b/www-apache/mod_survey/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for www-apache/mod_survey # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_survey/ChangeLog,v 1.10 2006/01/23 13:42:53 rl03 Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_survey/ChangeLog,v 1.11 2006/01/31 17:01:16 rl03 Exp $ + +*mod_survey-3.2.3-r1 (31 Jan 2006) + + 31 Jan 2006; Renat Lumpau <rl03@gentoo.org> +files/language-list.txt, + files/postinstall-en.txt, +files/reconfig, -mod_survey-3.2.3.ebuild, + +mod_survey-3.2.3-r1.ebuild: + Fixes for bug #121041, limited support for LINGUAS *mod_survey-3.2.3 (23 Jan 2006) diff --git a/www-apache/mod_survey/Manifest b/www-apache/mod_survey/Manifest index 86b5178ff022..ab71be1409aa 100644 --- a/www-apache/mod_survey/Manifest +++ b/www-apache/mod_survey/Manifest @@ -1,15 +1,17 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 e6f525bda6f02e7864acf96632a0d5f5 ChangeLog 1820 -MD5 a37f666937f5688f7467a09f127543ee files/digest-mod_survey-3.2.3 133 -MD5 597d4a1386896cc5e4e3f269da7cf10f files/postinstall-en.txt 158 +MD5 3ea952b9482ec9c56731164e6a789075 ChangeLog 2084 +MD5 a37f666937f5688f7467a09f127543ee files/digest-mod_survey-3.2.3-r1 133 +MD5 93b4750ff04770f08971e73b328c3486 files/language-list.txt 15 +MD5 e844b8372b46feedac36c6b5141c3696 files/postinstall-en.txt 158 +MD5 0663294143b6e81b1aed773a44aedf3e files/reconfig 244 MD5 f61bfa064e3acdfcd826e4a38b121196 metadata.xml 161 -MD5 5b22394fe180d4d453a9f6d94e4a3993 mod_survey-3.2.3.ebuild 1968 +MD5 d865c9aeb504fbd6d0eba11e84a34d33 mod_survey-3.2.3-r1.ebuild 3239 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) -iD8DBQFD1N1pEzitwsaoONoRAvAbAKC7seTgxtL0GsJOzcRqwkW4UvKMlACeI7jG -2zQ2GLGN+hq5YYFZrvdzcBA= -=XAgX +iD8DBQFD35foEzitwsaoONoRAuKBAJ9NJwEqO6f1jwRpnCtGeUGO2GVAggCgyzMs +pXRLU1dd7ZOp7e/hamH2MY0= +=aY1f -----END PGP SIGNATURE----- diff --git a/www-apache/mod_survey/files/digest-mod_survey-3.2.3 b/www-apache/mod_survey/files/digest-mod_survey-3.2.3-r1 index 8ffb8f7569c3..8ffb8f7569c3 100644 --- a/www-apache/mod_survey/files/digest-mod_survey-3.2.3 +++ b/www-apache/mod_survey/files/digest-mod_survey-3.2.3-r1 diff --git a/www-apache/mod_survey/files/language-list.txt b/www-apache/mod_survey/files/language-list.txt new file mode 100644 index 000000000000..d81291db4473 --- /dev/null +++ b/www-apache/mod_survey/files/language-list.txt @@ -0,0 +1,5 @@ +en +de +fr +it +sw diff --git a/www-apache/mod_survey/files/postinstall-en.txt b/www-apache/mod_survey/files/postinstall-en.txt index ec2278a04f01..5fbe29c5a59c 100644 --- a/www-apache/mod_survey/files/postinstall-en.txt +++ b/www-apache/mod_survey/files/postinstall-en.txt @@ -1,4 +1,4 @@ -0. Copy /usr/lib/mod_survey/survey.conf to your Apache modules directory. +0. Copy ${VHOST_ROOT}/${PN}/survey.conf to your Apache modules directory. 1. Restart Apache and test your installation: http://${VHOST_HOSTNAME}/mod_survey diff --git a/www-apache/mod_survey/files/reconfig b/www-apache/mod_survey/files/reconfig new file mode 100644 index 000000000000..92774268f8c2 --- /dev/null +++ b/www-apache/mod_survey/files/reconfig @@ -0,0 +1,15 @@ +#!/bin/bash + +die() { + echo "#####" + echo $1 + echo "#####" + exit 1 +} + +if [ $1 = "install" ]; then + sed -e "s|/usr/lib/mod_survey/webroot/|${VHOST_ROOT}/${PN}/|g" -i ${VHOST_ROOT}/${PN}/survey.conf || die + +elif [ $1 = "clean" ]; then + echo $1 +fi diff --git a/www-apache/mod_survey/mod_survey-3.2.3.ebuild b/www-apache/mod_survey/mod_survey-3.2.3-r1.ebuild index a1b5c4183bc6..6b4ac668e0c0 100644 --- a/www-apache/mod_survey/mod_survey-3.2.3.ebuild +++ b/www-apache/mod_survey/mod_survey-3.2.3-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_survey/mod_survey-3.2.3.ebuild,v 1.1 2006/01/23 13:42:53 rl03 Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_survey/mod_survey-3.2.3-r1.ebuild,v 1.1 2006/01/31 17:01:17 rl03 Exp $ inherit webapp @@ -11,7 +11,7 @@ DESCRIPTION="XML-defined web questionnaires as a plug-in module for Apache" HOMEPAGE="http://www.modsurvey.org" KEYWORDS="~x86 ~ppc ~amd64" -IUSE="apache2 doc mysql postgres" +IUSE="apache2 doc mysql nls postgres" MY_PN=${PN/_/} MY_PV=${PV/_/-} S=${WORKDIR}/${MY_PN}-${MY_PV} @@ -27,14 +27,38 @@ RDEPEND="${DEPEND} >=perl-core/CGI-3.0.0" LICENSE="GPL-2" -src_unpack() { +pkg_setup() { webapp_pkg_setup + + # stolen from app-admin/webalizer + # USE=nls has no real meaning if LINGUAS isn't set + if use nls && [ -z "${LINGUAS}" ]; then + ewarn "you must set LINGUAS in /etc/make.conf" + ewarn "if you want to USE=nls" + die "please either set LINGUAS or do not use nls" + fi +} + +src_unpack() { unpack ${A} cd ${S} rm -f docs/LICENSE.txt sed -i "s|/usr/local/mod_survey/|${D}/usr/lib/mod_survey/|g" installer.pl use doc && unpack ${MY_PN}-docs-${PV}.tgz + # unfortunatly, this program only allows for one lang, so only the first + # entry in LINGUAS is used + if use nls; then + local locallang + if ! grep -q ${LINGUAS:0:2} ${FILESDIR}/language-list.txt; then + ewarn "Language ${LINGUAS:0:2} is not supported, using English" + else + einfo "Using language ${LINGUAS:0:2}" + locallang="$(grep ^${LINGUAS:0:2} ${FILESDIR}/language-list.txt)" + sed "s|\$lang = \"en\"|\$lang = \"${locallang}\"|" -i installer.pl + fi + fi + if ! use apache2; then sed "s|\$isa2 = \"Off\"|\$isa2 = \"On\"|" -i installer.pl fi @@ -52,6 +76,7 @@ src_install() { perl installer.pl < /dev/null > /dev/null 2>&1 dosed /usr/lib/mod_survey/survey.conf sed -i "s|/usr/lib/mod_survey/data/|/var/lib/mod_survey/data/|" ${D}/usr/lib/mod_survey/survey.conf + mv ${D}/usr/lib/mod_survey/survey.conf ${D}/${MY_HOSTROOTDIR}/${PN} # install webroot using webapp.eclass # webroot should not go into MY_HTDOCSDIR b/c that throws off Alias @@ -59,6 +84,20 @@ src_install() { cp -R webroot/* ${D}/${MY_HOSTROOTDIR}/${PN} webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt + webapp_hook_script ${FILESDIR}/reconfig webapp_src_install fowners apache:apache /var/lib/mod_survey/data } + +pkg_postinst(){ + if [ ${#LINGUAS} -gt 2 ] && use nls; then + ewarn + ewarn "You have more than one language in LINGUAS" + ewarn "Due to the limitations of this packge, it was built" + ewarn "only with ${LINGUAS:0:2} support. If this is not what" + ewarn "you intended, please place the language you desire" + ewarn "_first_ in the list of LINGUAS in /etc/make.conf" + ewarn + fi + webapp_pkg_postinst +} |