public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Dane Smith" <c1pher@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/c1pher:master commit in: www-apps/indefero/, www-apps/indefero/files/
Date: Wed,  1 Feb 2012 23:43:16 +0000 (UTC)	[thread overview]
Message-ID: <558132e16aa2e02df94052c1beec247845facfd8.c1pher@gentoo> (raw)

commit:     558132e16aa2e02df94052c1beec247845facfd8
Author:     Dane Smith <c1pher <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  1 23:42:22 2012 +0000
Commit:     Dane Smith <c1pher <AT> gentoo <DOT> org>
CommitDate: Wed Feb  1 23:42:22 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/c1pher.git;a=commit;h=558132e1

Add bootstrap and some helper scripts for install.

---
 www-apps/indefero/Manifest                     |    5 +++-
 www-apps/indefero/files/bootstrap.php          |   22 ++++++++++++++++++
 www-apps/indefero/files/dbsetup.sh             |    3 ++
 www-apps/indefero/files/postinstall-en-1.2.txt |   29 ++++++++++++++++++++++++
 www-apps/indefero/indefero-1.2.ebuild          |   10 ++++++-
 5 files changed, 66 insertions(+), 3 deletions(-)

diff --git a/www-apps/indefero/Manifest b/www-apps/indefero/Manifest
index b53d41f..a06be5b 100644
--- a/www-apps/indefero/Manifest
+++ b/www-apps/indefero/Manifest
@@ -1,4 +1,7 @@
+AUX bootstrap.php 603 RMD160 4cc6da7db1aeaa2f380458a61f67be651a49abc2 SHA1 4b38c6121046403d805298d18cfb20b7ff807ea0 SHA256 c13948fca2e56b98458f95908c84a4162600a5ee81664e317f0557131ff1c7c9
+AUX dbsetup.sh 87 RMD160 e5f34ac19f55e18ffdf0c5bf2c6c15b359d68582 SHA1 4908e2a65d59a17e6bcd56c12b9e8cf28e316e10 SHA256 fb60f9b35d302898105252d26f3b703a8ec163b5d098a46dfe7ef2305faa2163
 AUX indefero-gentoo-pluf.diff 529 RMD160 c7e7ea57ee4b7aa362041a98f3c83f968a4cc01c SHA1 05bc152b1daf436f1b88fd6ee7ccb8498f059a42 SHA256 bda6a9135ec58dec74a6b677577904c566e8001b815712c8160a2c6c29cf7c25
+AUX postinstall-en-1.2.txt 1103 RMD160 18a78159dd03dff26cdaf92cd1425dd4d7b553fb SHA1 9f1713919c652e58a89f18f2c6929de35c1ff65c SHA256 1b35ddf836be9d7602a2024e80c3e91d6a1f251b8afe7808c115e260445dcf78
 DIST indefero-1.2.zip 954890 RMD160 3d9272e1f95673ec7c0b9522494f70fe4c3c6af4 SHA1 962b7b542b62b5d9a3ffa4072e0c2f37be8dcbd6 SHA256 f67f542f6f253945d4b5ec7a2b81d842a63aa23200adef1cb2dede3d7bd15ef1
-EBUILD indefero-1.2.ebuild 1069 RMD160 067dae059101ff34bab390d0c5456869590ed6ba SHA1 a69b7a465ed02ca5340438bc450d3fd6dbbb9637 SHA256 5f7bfb03e26e6648aaa0f42af28ee7930ab2acdce81871c4301fb6f94be9032c
+EBUILD indefero-1.2.ebuild 1235 RMD160 196fdd7df069415013bb9c947ff7cadfa9cd8e3a SHA1 d8a3c12d6148de93243a71b91a2c3dcbac1efa2f SHA256 2b4a281db69115c437ebde76bca0cfd0a99869d53a6267c8382d146390a75826
 MISC metadata.xml 252 RMD160 0d6b4d4e9e2fc0a9fc73289b6f3234195a3a1405 SHA1 6d719654a220ceff01851fa059936c79ca6bf9be SHA256 50fba57de1e11a48fbf58020c096095ebf9ec5defa2b5bcda9ed44e5be159d3f

diff --git a/www-apps/indefero/files/bootstrap.php b/www-apps/indefero/files/bootstrap.php
new file mode 100644
index 0000000..e1ee96f
--- /dev/null
+++ b/www-apps/indefero/files/bootstrap.php
@@ -0,0 +1,22 @@
+<?php
+set_include_path("/usr/share/php/pluf");
+
+require '/<PATH TO INDEFERO>/src/IDF/conf/path.php';
+require 'Pluf.php';
+
+Pluf::start('/<PATH TO INDEFERO>/src/IDF/conf/idf.php');
+Pluf_Dispatcher::loadControllers(Pluf::f('idf_views'));
+
+$user = new Pluf_User();
+$user->first_name = 'Foo';
+$user->last_name = 'Bar'; // Required!
+$user->login = 'foobar'; // must be lowercase!
+$user->email = 'foo@bar.com';
+$user->password = 'foobarbaz'; // the password is salted/hashed
+// in the database, so do not worry :)
+$user->administrator = true;
+$user->active = true;
+$user->create();
+print "Bootstrap ok\n";
+?>
+

diff --git a/www-apps/indefero/files/dbsetup.sh b/www-apps/indefero/files/dbsetup.sh
new file mode 100755
index 0000000..690f490
--- /dev/null
+++ b/www-apps/indefero/files/dbsetup.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+php /usr/share/php/pluf/src/migrate.php --conf=src/IDF/conf/idf.php -a -d

diff --git a/www-apps/indefero/files/postinstall-en-1.2.txt b/www-apps/indefero/files/postinstall-en-1.2.txt
new file mode 100644
index 0000000..3ceb078
--- /dev/null
+++ b/www-apps/indefero/files/postinstall-en-1.2.txt
@@ -0,0 +1,29 @@
+Setting up Indefero
+===================
+
+1) First, using your database of choice, set up a database, username, and
+passord for Indefero.
+
+ie: If using mysql:
+	1) mysql -u root -h localhost -p
+	2) create user '<username for indefero>'@'localhost' identified by
+	'<password for indefero>';
+	3) create database <database for indefero>;
+	4) grant all on <database for indefero>.* to '<username for
+	indefero>'@'localhost';
+
+2) Depending on where Indefero was installed to (if no USE="vhost" it will be
+under /var/www/localhost/htdocs), edit the file <path to
+indefero>/src/IDF/conf/idf.php . Make sure to use the values for the database
+that you used in step 1.
+
+3) To actually create the needed tables for indefero, cd <path to indefero>
+and run scrips/dbsetup.sh.
+
+4) Lastly, edit <path to indefero>/www/bootstrap.php. Change the places where
+it says <PATH TO INDEFERO> to point to the install you're using. Then update
+it to use a username / password of your choice. Then run php <path to indefero>/www/bootstrap.php.
+When this is done and you see the success, rm <path to
+indefero>/www/bootstrap.php.
+
+

diff --git a/www-apps/indefero/indefero-1.2.ebuild b/www-apps/indefero/indefero-1.2.ebuild
index 5a698a4..20984d6 100644
--- a/www-apps/indefero/indefero-1.2.ebuild
+++ b/www-apps/indefero/indefero-1.2.ebuild
@@ -23,6 +23,8 @@ S="${WORKDIR}/${PN}"
 src_prepare(){
 	#Expect pluf to be installed in the normal location.
 	epatch "${FILESDIR}/${PN}-gentoo-pluf.diff"
+	cp "${FILESDIR}/dbsetup.sh" scripts/
+	cp "${FILESDIR}/bootstrap.php" www/
 }
 
 src_install(){
@@ -36,7 +38,11 @@ src_install(){
 
 	cp -R . "${D}/${MY_HTDOCSDIR}"
 	webapp_configfile "${MY_HTDOCSDIR}/src/IDF/conf/idf.php"
-	#Write a postinstall doc
-	#webapp_postinstall_txt en "${FILESDIR}/postinstall-en-${PV}.txt"
+	webapp_postinst_txt en "${FILESDIR}/postinstall-en-${PV}.txt"
 	webapp_src_install
 }
+
+pkg_postinst(){
+	elog "The postinstall document contains all of the information"
+	elog "needed to get ${PN} running."
+}



             reply	other threads:[~2012-02-01 23:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01 23:43 Dane Smith [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-07-18 15:11 [gentoo-commits] dev/c1pher:master commit in: www-apps/indefero/, www-apps/indefero/files/ Dane Smith
2012-02-03  2:07 Dane Smith
2012-02-03  1:57 Dane Smith
2012-02-01 23:59 Dane Smith
2012-02-01 23:58 Dane Smith
2012-02-01 23:55 Dane Smith
2012-02-01 23:52 Dane Smith
2012-02-01 23:51 Dane Smith
2012-02-01 18:26 Dane Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=558132e16aa2e02df94052c1beec247845facfd8.c1pher@gentoo \
    --to=c1pher@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox