Initial ebuild wrt bug #107129.
authorRenat Lumpau <rl03@gentoo.org>
Wed, 28 Sep 2005 00:27:11 +0000 (00:27 +0000)
committerRenat Lumpau <rl03@gentoo.org>
Wed, 28 Sep 2005 00:27:11 +0000 (00:27 +0000)
Package-Manager: portage-2.0.51.22-r2

www-apps/joomla/ChangeLog [new file with mode: 0644]
www-apps/joomla/Manifest
www-apps/joomla/files/digest-joomla-1.0.1 [new file with mode: 0644]
www-apps/joomla/files/postinstall-en.txt [new file with mode: 0644]
www-apps/joomla/joomla-1.0.1.ebuild [new file with mode: 0644]
www-apps/joomla/metadata.xml [new file with mode: 0644]

diff --git a/www-apps/joomla/ChangeLog b/www-apps/joomla/ChangeLog
new file mode 100644 (file)
index 0000000..6ff73a8
--- /dev/null
@@ -0,0 +1,10 @@
+# ChangeLog for www-apps/joomla
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/joomla/ChangeLog,v 1.1 2005/09/28 00:27:11 rl03 Exp $
+
+*joomla-1.0.1 (28 Sep 2005)
+
+  28 Sep 2005; Renat Lumpau <rl03@gentoo.org> +files/postinstall-en.txt,
+  +metadata.xml, +joomla-1.0.1.ebuild:
+  Initial ebuild wrt bug #107129.
+
index 01da8e5fed6942b5ed117c0cc45d9669dd55d30d..c0f69d07ed851b98f71d0511d9af001b3c0101fa 100644 (file)
@@ -1,5 +1,15 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
 MD5 f57ee9cf6b6749d8528c93046833434b joomla-1.0.1.ebuild 2970
 MD5 40b8fc848d988a716d1fd9c71c3d6e75 ChangeLog 377
 MD5 f61bfa064e3acdfcd826e4a38b121196 metadata.xml 161
 MD5 c81ce886a23ab451a7c1a3e0a4b1984d files/postinstall-en.txt 830
 MD5 aab606d225591bb796c9ba39b0c72192 files/digest-joomla-1.0.1 72
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.1 (GNU/Linux)
+
+iD8DBQFDOeNrEzitwsaoONoRAo0jAKCrNnGOa13/JyMO/YXKFKZXks1x+gCdE+lc
+IMOHwHr1CotGW4T4ZJ3Rmf0=
+=iGXY
+-----END PGP SIGNATURE-----
diff --git a/www-apps/joomla/files/digest-joomla-1.0.1 b/www-apps/joomla/files/digest-joomla-1.0.1
new file mode 100644 (file)
index 0000000..9361d3e
--- /dev/null
@@ -0,0 +1 @@
+MD5 a58b5a51e383d64fc1676144a9876e14 Joomla_1.0.1-Stable.tar.gz 1764956
diff --git a/www-apps/joomla/files/postinstall-en.txt b/www-apps/joomla/files/postinstall-en.txt
new file mode 100644 (file)
index 0000000..81e3af0
--- /dev/null
@@ -0,0 +1,24 @@
+You are almost done!
+
+  0. Setup the db.
+
+  1. Restart Apache
+
+  2. Login on http://${VHOST_HOSTNAME}/${VHOST_APPDIR} 
+  and finish the installation. IMPORTANT: the web
+  installer will complain that configuration.php is not writeable. When you
+  are done, create configuration.php in ${MY_INSTALLDIR} and copy the generated
+  configuration into it. Then execute the following:
+  # cd ${MY_INSTALLDIR}
+  # chown apache:apache configuration.php
+  # chmod u+w configuration.php
+
+  3. You can now launch your browser and point it to your MOS site e.g.
+
+  http://${VHOST_HOSTNAME}/${VHOST_APPDIR} -> Main Site
+  http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/administrator -> Admin
+
+  You can log into Admin using the username 'admin' along with the
+  password that was generated or you chose during the web based install.
+
+  Enjoy Joomla!
diff --git a/www-apps/joomla/joomla-1.0.1.ebuild b/www-apps/joomla/joomla-1.0.1.ebuild
new file mode 100644 (file)
index 0000000..6b6af62
--- /dev/null
@@ -0,0 +1,93 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/joomla/joomla-1.0.1.ebuild,v 1.1 2005/09/28 00:27:11 rl03 Exp $
+
+inherit webapp eutils
+
+MY_P="${PN/j/J}_${PV}-Stable"
+DESCRIPTION="Mambo is one of the most powerful Open Source Content Management
+Systems on the planet."
+HOMEPAGE="http://www.joomla.org/"
+SRC_URI="mirror://gentoo/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~ppc ~sparc ~amd64"
+S=${WORKDIR}
+
+IUSE=""
+
+RDEPEND="dev-db/mysql
+       virtual/php
+       net-www/apache"
+
+pkg_setup () {
+       webapp_pkg_setup
+       einfo "Please make sure that your PHP is compiled with XML and MySQL support"
+}
+
+src_install () {
+       webapp_src_preinst
+       local files="administrator/backups administrator/components
+       administrator/modules administrator/templates cache components
+       images images/banners images/stories language mambots mambots/content
+       mambots/editors mambots/editors-xtd mambots/search
+       media modules templates"
+
+       dodoc CHANGELOG.php INSTALL.php
+
+       cp -R . ${D}/${MY_HTDOCSDIR}
+
+       for file in ${files}; do
+               webapp_serverowned "${MY_HTDOCSDIR}/${file}"
+       done
+
+       webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
+
+       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"
+       webapp_pkg_postinst
+}
+
+pkg_config() {
+       # default values for db stuff
+       D_DB="joomla"
+       D_HOST="localhost"
+       D_USER="joomla"
+
+       # 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
+       [[ -z ${MY_DB} ]] && MY_DB=${D_DB}
+
+       echo -n "mysql db host [${D_HOST}]: "; read MY_HOST
+       [[ -z ${MY_HOST} ]] && MY_HOST=${D_HOST}
+
+       echo -n "mysql dbuser name [${D_USER}]: "; read MY_USER
+       [[ -z ${MY_USER} ]] && MY_USER=${D_USER}
+
+       echo -n "mysql dbuser password: "; read mypwd
+       [[ -z ${mypwd} ]] && die "Error: no dbuser password"
+
+       # privileges
+       echo -n "Please enter login info for user who has grant privileges on ${MY_HOST} [$USER]: "; read adminuser
+       [[ -z ${adminuser} ]] && adminuser="$USER"
+       if [ "${MY_HOST}" != "localhost" ]; then
+               echo -n "Client address (at db side) [$(hostname -f)]: "; read clientaddr
+               [[ -z ${clientaddr} ]] && clientaddr="$(hostname -f)"
+       fi
+       # this will be default for localhost
+       [[ -z ${clientaddr} ]] && clientaddr="${MY_HOST}"
+
+       # if $MY_HOST == localhost, don't specify -h argument, so local socket can be used.
+       host=${MY_HOST/localhost}
+       mysqladmin -u ${adminuser} ${host:+-h ${host}} -p create ${MY_DB} || die "Error creating database"
+       mysql -u "${adminuser}" "${host:+-h ${host}}" -p \
+               -e "GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP,REFERENCES
+               ON ${MY_DB}.* TO '${MY_USER}'@'${clientaddr}' IDENTIFIED BY '${mypwd}'; FLUSH PRIVILEGES;"  || die "Error initializing database. Please grant permissions manually."
+}
diff --git a/www-apps/joomla/metadata.xml b/www-apps/joomla/metadata.xml
new file mode 100644 (file)
index 0000000..95c06f0
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>web-apps</herd>
+</pkgmetadata>