summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/mambo/ChangeLog7
-rw-r--r--www-apps/mambo/files/postinstall-en.txt1
-rw-r--r--www-apps/mambo/files/reconfig55
-rw-r--r--www-apps/mambo/mambo-4.5.ebuild63
4 files changed, 62 insertions, 64 deletions
diff --git a/www-apps/mambo/ChangeLog b/www-apps/mambo/ChangeLog
index 7e9448f3561f..b909f4b1b358 100644
--- a/www-apps/mambo/ChangeLog
+++ b/www-apps/mambo/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for www-apps/mambo
# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/mambo/ChangeLog,v 1.2 2004/08/30 19:25:34 rl03 Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/mambo/ChangeLog,v 1.3 2004/09/22 08:15:20 rl03 Exp $
+
+ 22 Sep 2004; Renat Lumpau <rl03@gentoo.org> files/postinstall-en.txt,
+ -files/reconfig, mambo-4.5.ebuild:
+ Don't rm things in src_install. Move reconfig hook to pkg_config. Warn about
+ db and dbuser.
30 Aug 2004; Renat Lumpau <rl03@gentoo.org> mambo-4.5.ebuild:
Fixed DEPEND/RDEPEND, removed sleep
diff --git a/www-apps/mambo/files/postinstall-en.txt b/www-apps/mambo/files/postinstall-en.txt
index b6e8a450ffac..8212a1f9e319 100644
--- a/www-apps/mambo/files/postinstall-en.txt
+++ b/www-apps/mambo/files/postinstall-en.txt
@@ -1,5 +1,6 @@
You are almost done!
+ 0. Setup the db.
1. Restart Apache
diff --git a/www-apps/mambo/files/reconfig b/www-apps/mambo/files/reconfig
deleted file mode 100644
index e614037d725d..000000000000
--- a/www-apps/mambo/files/reconfig
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-
-function die {
- echo $1
- exit 1
-}
-
-if [ $1 = "start" -o $1 = "install" ]; then
-
- cd ${VHOST_ROOT} || die
-
- # default values for db stuff
- D_DB="mambo"
- D_HOST="localhost"
- D_USER="mambo"
-
- # do we want to start mysqld?
- /etc/init.d/mysql restart || die "mysql needs to be running"
-
- echo -n "mysql db name [${D_DB}]: "; read MY_DB
- if (test -z ${MY_DB}) ; then MY_DB=${D_DB} ; fi
-
- echo -n "mysql db host [${D_HOST}]: "; read MY_HOST
- if (test -z ${MY_HOST}) ; then MY_HOST=${D_HOST}; fi
-
- echo -n "mysql dbuser name [${D_USER}]: "; read MY_USER
- if (test -z ${MY_USER}) ; then MY_USER=${D_USER} ; fi
-
- echo -n "mysql dbuser password: "; read mypwd
- if (test -z ${mypwd}) ; then die "Error: no dbuser password" ; fi
-
- # privileges
- echo -n "Please enter login info for user who has grant privileges on ${MY_HOST} [$USER]: "; read adminuser
- if (test -z ${adminuser}) ; then adminuser="$USER" ; fi
- if [ "${MY_HOST}" != "localhost" ]; then
- echo -n "Client address (at db side) [$(hostname -f)]: "; read clientaddr
- if (test -z ${clientaddr}) ; then clientaddr="$(hostname -f)" ; fi
- fi
- # this will be default for localhost
- if (test -z ${clientaddr}) ; then clientaddr="${MY_HOST}" ; fi
-
- # if $MY_HOST == localhost, don't specify -h argument, so local socket can be used.
- host=${MY_HOST/localhost}
- mysqladmin -u ${MY_USER} ${host:+-h ${host}} -p create ${MY_DB} || die "Error creating database"
- mysql -u ${adminuser} ${host:+-h ${host}} -p mysql --exec="GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES ON ${MY_DB}.* TO ${MY_USER}@${clientaddr} IDENTIFIED BY '${mypwd}'; FLUSH PRIVILEGES;" || {
- echo "Error running query!"
- echo
- echo "Please run it manually on ${host}."
- echo
- echo " \$ mysql -u ${adminuser} -p mysql --exec=\"GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES ON ${MY_DB}.* TO ${MY_USER}@${clientaddr} IDENTIFIED BY '${mypwd}'; FLUSH PRIVILEGES;\""
- echo
-}
-else
- echo $1
-fi
diff --git a/www-apps/mambo/mambo-4.5.ebuild b/www-apps/mambo/mambo-4.5.ebuild
index 31e2c575c3d9..b8d3cf016ee2 100644
--- a/www-apps/mambo/mambo-4.5.ebuild
+++ b/www-apps/mambo/mambo-4.5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/mambo/mambo-4.5.ebuild,v 1.2 2004/08/30 19:25:34 rl03 Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/mambo/mambo-4.5.ebuild,v 1.3 2004/09/22 08:15:20 rl03 Exp $
inherit webapp
@@ -15,7 +15,7 @@ S=${WORKDIR}
IUSE=""
RDEPEND="dev-db/mysql
- virtual/php
+ >=virtual/php-4.1
net-www/apache"
pkg_setup () {
@@ -27,19 +27,66 @@ src_install () {
webapp_src_preinst
local files="administrator/backups administrator/components components images media language modules templates uploadfiles"
- cd ${S}
+ dodoc documentation/Changelog-4.5 INSTALL
+ dohtml documentation/Install.html
- dodoc documentation/Changelog-4.5
- rm -rf documentation
-
- cp -R . ${D}/${MY_HTDOCSDIR}
+ cp -R [^d]* ${D}/${MY_HTDOCSDIR}
for file in ${files}; do
webapp_serverowned "${MY_HTDOCSDIR}/${file}"
done
webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
- webapp_hook_script ${FILESDIR}/reconfig
webapp_src_install
}
+
+pkg_postinst () {
+ einfo "Now run ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "to setup the database"
+ einfo "Note that db and dbuser need to be present prior to running db setup"
+}
+
+pkg_config() {
+ # default values for db stuff
+ D_DB="mambo"
+ D_HOST="localhost"
+ D_USER="mambo"
+
+ # do we want to start mysqld?
+ /etc/init.d/mysql restart || die "mysql needs to be running"
+
+ echo -n "mysql db name [${D_DB}]: "; read MY_DB
+ if (test -z ${MY_DB}) ; then MY_DB=${D_DB} ; fi
+
+ echo -n "mysql db host [${D_HOST}]: "; read MY_HOST
+ if (test -z ${MY_HOST}) ; then MY_HOST=${D_HOST}; fi
+
+ echo -n "mysql dbuser name [${D_USER}]: "; read MY_USER
+ if (test -z ${MY_USER}) ; then MY_USER=${D_USER} ; fi
+
+ echo -n "mysql dbuser password: "; read mypwd
+ if (test -z ${mypwd}) ; then die "Error: no dbuser password" ; fi
+
+ # privileges
+ echo -n "Please enter login info for user who has grant privileges on ${MY_HOST} [$USER]: "; read adminuser
+ if (test -z ${adminuser}) ; then adminuser="$USER" ; fi
+ if [ "${MY_HOST}" != "localhost" ]; then
+ echo -n "Client address (at db side) [$(hostname -f)]: "; read clientaddr
+ if (test -z ${clientaddr}) ; then clientaddr="$(hostname -f)" ; fi
+ fi
+ # this will be default for localhost
+ if (test -z ${clientaddr}) ; then clientaddr="${MY_HOST}" ; fi
+
+ # if $MY_HOST == localhost, don't specify -h argument, so local socket can be used.
+ host=${MY_HOST/localhost}
+ mysqladmin -u ${MY_USER} ${host:+-h ${host}} -p create ${MY_DB} || die "Error creating database"
+ mysql -u ${adminuser} ${host:+-h ${host}} -p mysql --exec="GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES ON ${MY_DB}.* TO ${MY_USER}@${clientaddr} IDENTIFIED BY '${mypwd}'; FLUSH PRIVILEGES;" || {
+ echo "Error running query!"
+ echo
+ echo "Please run it manually on ${host}."
+ echo
+ echo " \$ mysql -u ${adminuser} -p mysql --exec=\"GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES ON ${MY_DB}.* TO ${MY_USER}@${clientaddr} IDENTIFIED BY '${mypwd}'; FLUSH PRIVILEGES;\""
+ echo
+ }
+}