1 |
commit: 558132e16aa2e02df94052c1beec247845facfd8 |
2 |
Author: Dane Smith <c1pher <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 1 23:42:22 2012 +0000 |
4 |
Commit: Dane Smith <c1pher <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 1 23:42:22 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/c1pher.git;a=commit;h=558132e1 |
7 |
|
8 |
Add bootstrap and some helper scripts for install. |
9 |
|
10 |
--- |
11 |
www-apps/indefero/Manifest | 5 +++- |
12 |
www-apps/indefero/files/bootstrap.php | 22 ++++++++++++++++++ |
13 |
www-apps/indefero/files/dbsetup.sh | 3 ++ |
14 |
www-apps/indefero/files/postinstall-en-1.2.txt | 29 ++++++++++++++++++++++++ |
15 |
www-apps/indefero/indefero-1.2.ebuild | 10 ++++++- |
16 |
5 files changed, 66 insertions(+), 3 deletions(-) |
17 |
|
18 |
diff --git a/www-apps/indefero/Manifest b/www-apps/indefero/Manifest |
19 |
index b53d41f..a06be5b 100644 |
20 |
--- a/www-apps/indefero/Manifest |
21 |
+++ b/www-apps/indefero/Manifest |
22 |
@@ -1,4 +1,7 @@ |
23 |
+AUX bootstrap.php 603 RMD160 4cc6da7db1aeaa2f380458a61f67be651a49abc2 SHA1 4b38c6121046403d805298d18cfb20b7ff807ea0 SHA256 c13948fca2e56b98458f95908c84a4162600a5ee81664e317f0557131ff1c7c9 |
24 |
+AUX dbsetup.sh 87 RMD160 e5f34ac19f55e18ffdf0c5bf2c6c15b359d68582 SHA1 4908e2a65d59a17e6bcd56c12b9e8cf28e316e10 SHA256 fb60f9b35d302898105252d26f3b703a8ec163b5d098a46dfe7ef2305faa2163 |
25 |
AUX indefero-gentoo-pluf.diff 529 RMD160 c7e7ea57ee4b7aa362041a98f3c83f968a4cc01c SHA1 05bc152b1daf436f1b88fd6ee7ccb8498f059a42 SHA256 bda6a9135ec58dec74a6b677577904c566e8001b815712c8160a2c6c29cf7c25 |
26 |
+AUX postinstall-en-1.2.txt 1103 RMD160 18a78159dd03dff26cdaf92cd1425dd4d7b553fb SHA1 9f1713919c652e58a89f18f2c6929de35c1ff65c SHA256 1b35ddf836be9d7602a2024e80c3e91d6a1f251b8afe7808c115e260445dcf78 |
27 |
DIST indefero-1.2.zip 954890 RMD160 3d9272e1f95673ec7c0b9522494f70fe4c3c6af4 SHA1 962b7b542b62b5d9a3ffa4072e0c2f37be8dcbd6 SHA256 f67f542f6f253945d4b5ec7a2b81d842a63aa23200adef1cb2dede3d7bd15ef1 |
28 |
-EBUILD indefero-1.2.ebuild 1069 RMD160 067dae059101ff34bab390d0c5456869590ed6ba SHA1 a69b7a465ed02ca5340438bc450d3fd6dbbb9637 SHA256 5f7bfb03e26e6648aaa0f42af28ee7930ab2acdce81871c4301fb6f94be9032c |
29 |
+EBUILD indefero-1.2.ebuild 1235 RMD160 196fdd7df069415013bb9c947ff7cadfa9cd8e3a SHA1 d8a3c12d6148de93243a71b91a2c3dcbac1efa2f SHA256 2b4a281db69115c437ebde76bca0cfd0a99869d53a6267c8382d146390a75826 |
30 |
MISC metadata.xml 252 RMD160 0d6b4d4e9e2fc0a9fc73289b6f3234195a3a1405 SHA1 6d719654a220ceff01851fa059936c79ca6bf9be SHA256 50fba57de1e11a48fbf58020c096095ebf9ec5defa2b5bcda9ed44e5be159d3f |
31 |
|
32 |
diff --git a/www-apps/indefero/files/bootstrap.php b/www-apps/indefero/files/bootstrap.php |
33 |
new file mode 100644 |
34 |
index 0000000..e1ee96f |
35 |
--- /dev/null |
36 |
+++ b/www-apps/indefero/files/bootstrap.php |
37 |
@@ -0,0 +1,22 @@ |
38 |
+<?php |
39 |
+set_include_path("/usr/share/php/pluf"); |
40 |
+ |
41 |
+require '/<PATH TO INDEFERO>/src/IDF/conf/path.php'; |
42 |
+require 'Pluf.php'; |
43 |
+ |
44 |
+Pluf::start('/<PATH TO INDEFERO>/src/IDF/conf/idf.php'); |
45 |
+Pluf_Dispatcher::loadControllers(Pluf::f('idf_views')); |
46 |
+ |
47 |
+$user = new Pluf_User(); |
48 |
+$user->first_name = 'Foo'; |
49 |
+$user->last_name = 'Bar'; // Required! |
50 |
+$user->login = 'foobar'; // must be lowercase! |
51 |
+$user->email = 'foo@×××.com'; |
52 |
+$user->password = 'foobarbaz'; // the password is salted/hashed |
53 |
+// in the database, so do not worry :) |
54 |
+$user->administrator = true; |
55 |
+$user->active = true; |
56 |
+$user->create(); |
57 |
+print "Bootstrap ok\n"; |
58 |
+?> |
59 |
+ |
60 |
|
61 |
diff --git a/www-apps/indefero/files/dbsetup.sh b/www-apps/indefero/files/dbsetup.sh |
62 |
new file mode 100755 |
63 |
index 0000000..690f490 |
64 |
--- /dev/null |
65 |
+++ b/www-apps/indefero/files/dbsetup.sh |
66 |
@@ -0,0 +1,3 @@ |
67 |
+#!/bin/bash |
68 |
+ |
69 |
+php /usr/share/php/pluf/src/migrate.php --conf=src/IDF/conf/idf.php -a -d |
70 |
|
71 |
diff --git a/www-apps/indefero/files/postinstall-en-1.2.txt b/www-apps/indefero/files/postinstall-en-1.2.txt |
72 |
new file mode 100644 |
73 |
index 0000000..3ceb078 |
74 |
--- /dev/null |
75 |
+++ b/www-apps/indefero/files/postinstall-en-1.2.txt |
76 |
@@ -0,0 +1,29 @@ |
77 |
+Setting up Indefero |
78 |
+=================== |
79 |
+ |
80 |
+1) First, using your database of choice, set up a database, username, and |
81 |
+passord for Indefero. |
82 |
+ |
83 |
+ie: If using mysql: |
84 |
+ 1) mysql -u root -h localhost -p |
85 |
+ 2) create user '<username for indefero>'@'localhost' identified by |
86 |
+ '<password for indefero>'; |
87 |
+ 3) create database <database for indefero>; |
88 |
+ 4) grant all on <database for indefero>.* to '<username for |
89 |
+ indefero>'@'localhost'; |
90 |
+ |
91 |
+2) Depending on where Indefero was installed to (if no USE="vhost" it will be |
92 |
+under /var/www/localhost/htdocs), edit the file <path to |
93 |
+indefero>/src/IDF/conf/idf.php . Make sure to use the values for the database |
94 |
+that you used in step 1. |
95 |
+ |
96 |
+3) To actually create the needed tables for indefero, cd <path to indefero> |
97 |
+and run scrips/dbsetup.sh. |
98 |
+ |
99 |
+4) Lastly, edit <path to indefero>/www/bootstrap.php. Change the places where |
100 |
+it says <PATH TO INDEFERO> to point to the install you're using. Then update |
101 |
+it to use a username / password of your choice. Then run php <path to indefero>/www/bootstrap.php. |
102 |
+When this is done and you see the success, rm <path to |
103 |
+indefero>/www/bootstrap.php. |
104 |
+ |
105 |
+ |
106 |
|
107 |
diff --git a/www-apps/indefero/indefero-1.2.ebuild b/www-apps/indefero/indefero-1.2.ebuild |
108 |
index 5a698a4..20984d6 100644 |
109 |
--- a/www-apps/indefero/indefero-1.2.ebuild |
110 |
+++ b/www-apps/indefero/indefero-1.2.ebuild |
111 |
@@ -23,6 +23,8 @@ S="${WORKDIR}/${PN}" |
112 |
src_prepare(){ |
113 |
#Expect pluf to be installed in the normal location. |
114 |
epatch "${FILESDIR}/${PN}-gentoo-pluf.diff" |
115 |
+ cp "${FILESDIR}/dbsetup.sh" scripts/ |
116 |
+ cp "${FILESDIR}/bootstrap.php" www/ |
117 |
} |
118 |
|
119 |
src_install(){ |
120 |
@@ -36,7 +38,11 @@ src_install(){ |
121 |
|
122 |
cp -R . "${D}/${MY_HTDOCSDIR}" |
123 |
webapp_configfile "${MY_HTDOCSDIR}/src/IDF/conf/idf.php" |
124 |
- #Write a postinstall doc |
125 |
- #webapp_postinstall_txt en "${FILESDIR}/postinstall-en-${PV}.txt" |
126 |
+ webapp_postinst_txt en "${FILESDIR}/postinstall-en-${PV}.txt" |
127 |
webapp_src_install |
128 |
} |
129 |
+ |
130 |
+pkg_postinst(){ |
131 |
+ elog "The postinstall document contains all of the information" |
132 |
+ elog "needed to get ${PN} running." |
133 |
+} |