]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - config/phpwiki.spec
Allow bold, italics or underlined for numbers
[SourceForge/phpwiki.git] / config / phpwiki.spec
1
2 Summary: PHP-based Wiki webapplication
3 Name: phpwiki
4 Version: 1.3.11
5 Release: 1
6
7
8 #############################################
9 # User options here
10 #############################################
11
12 #These are setup mostly for my local config. 
13 #Edit to taste, add salt, and boil for 3 minutes.
14
15 %define WIKI_NAME NU-Wiki
16 %define ADMIN_USER      <PHPWiki admin account name here>
17 %define ADMIN_PASSWD    <encrypted admin account PW here, see passencrypt.php>
18
19 %define DB_NAME         <database name>
20 %define DB_USER         <database user account>
21 %define DB_PASSWD       <database account password>
22
23 %define HTTPD_UID       apache
24
25 %define ACCESS_LOG      /var/log/httpd/phpwiki_access.log
26 %define DATABASE_TYPE   SQL
27 %define DATABASE_DSN    mysql://%{admin_user}:%{admin_passwd}
28 %define DEBUG           0
29 %define USER_AUTH_ORDER "PersonalPage"
30 %define LDAP_AUTH_USER  ""
31 %define LDAP_AUTH_PASSWORD      ""
32 %define LDAP_SEARCH_FIELD       ""
33 %define IMAP_AUTH_HOST  ""
34 %define POP3_AUTH_HOST  ""
35 %define AUTH_USER_FILE  ""
36 %define AUTH_SESS_USER  ""
37 %define AUTH_SESS_LEVEL ""
38 %define AUTH_GROUP_FILE ""
39
40
41
42 Group: Applications/Internet
43 License: GPL
44 URL: http://sourceforge.net/projects/phpwiki/
45
46 Packager: Jesse Becker <jbecker@northwestern.edu>
47 Vendor: Northwestern University
48
49 Source: http://easynews.dl.sourceforge.net/sourceforge/phpwiki/%{name}-%{version}.tar.gz
50 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
51
52
53 #Relocation!
54 Prefix: /var/www
55
56 Requires: php php-mysql
57
58 # For some systems (like older RH)
59 Requires:  apache
60 #For newer systems
61 #Requires: httpd, php-pear
62
63 Autoreq: 0
64
65 %define dest %{buildroot}/%{prefix}/%{name}
66
67 %description
68 PhpWiki is a WikiWikiWeb clone in PHP. A WikiWikiWeb is a site where
69 anyone can edit the pages through an HTML form. Multiple storage
70 backends, dynamic hyperlinking, themeable, scriptable by plugins, full
71 authentication, ACL's.
72
73 %prep
74 %setup 
75
76 %install
77 %{__rm} -rf %{buildroot}
78 %{__mkdir} -p %{dest}
79 %{__cp} -r config lib locale pgsrc themes schemas uploads %{dest}
80 %{__cp} favicon.ico *.php *.wsdl *.wdsl wiki %{dest}
81
82 cd %{dest}/config
83 perl -p \
84         -e 's,^(WIKI_NAME)\s*=.*,$1 = %{WIKI_NAME},;'   \
85         -e 's,^[;\s]*(ADMIN_USER)\s*=.*,$1 = %{ADMIN_USER},;'   \
86         -e 's,^[;\s]*(ADMIN_PASSWD)\s*=.*,$1 = %{ADMIN_PASSWD},;'       \
87         -e 's,^[;\s]*(ACCESS_LOG)\s*=.*,$1 = %{ACCESS_LOG},;'   \
88         -e 's,^[;\s]*(DATABASE_TYPE)\s*=.*,$1 = %{DATABASE_TYPE},;'     \
89         -e 's,^[;\s]*(DATABASE_DSN)\s*=.*,$1 = mysql://%{DB_USER}:%{DB_PASSWD}\@localhost/%{DB_NAME},;' \
90         -e 's,^[;\s]*(DEBUG)\s*=.*,$1 = %{DEBUG},;'     \
91         -e 's,^[;\s]*(USER_AUTH_ORDER)\s*=.*,$1 = %{USER_AUTH_ORDER},;' \
92         -e 's,^[;\s]*(USER_AUTH_ORDER)\s*=.*,$1 = %{USER_AUTH_ORDER},;' \
93         -e 's,^[;\s]*(LDAP_AUTH_USER)\s*=.*,$1 = %{LDAP_AUTH_USER},;'   \
94         -e 's,^[;\s]*(LDAP_AUTH_PASSWORD)\s*=.*,$1 = %{LDAP_AUTH_PASSWORD},;'   \
95         -e 's,^[;\s]*(LDAP_SEARCH_FIELD)\s*=.*,$1 = %{LDAP_SEARCH_FIELD},;'     \
96         -e 's,^[;\s]*(IMAP_AUTH_HOST)\s*=.*,$1 = %{IMAP_AUTH_HOST},;'   \
97         -e 's,^[;\s]*(POP3_AUTH_HOST)\s*=.*,$1 = %{POP3_AUTH_HOST},;'   \
98         -e 's,^[;\s]*(AUTH_USER_FILE)\s*=.*,$1 = %{AUTH_USER_FILE},;'   \
99         -e 's,^[;\s]*(AUTH_SESS_USER)\s*=.*,$1 = %{AUTH_SESS_USER},;'   \
100         -e 's,^[;\s]*(AUTH_SESS_LEVEL)\s*=.*,$1 = %{AUTH_SESS_LEVEL},;' \
101         -e 's,^[;\s]*(AUTH_GROUP_FILE)\s*=.*,$1 = %{AUTH_GROUP_FILE},;' \
102         config-dist.ini > config.ini
103
104
105
106 %clean
107 %{__rm} -rf %{buildroot}
108
109 %post
110 touch %{ACCESS_LOG}
111 if [ -f %{ACCESS_LOG} ]; then
112         chown %{HTTPD_UID} %{ACCESS_LOG}
113         chmod 644 %{ACCESS_LOG}
114 fi
115
116 cd %{prefix}/%{name}
117 mysqladmin create %{DB_NAME}
118
119 echo 'GRANT select, insert, update, delete, lock tables 
120 ON %{DB_NAME}.* 
121 TO %{DB_USER}@localhost 
122 IDENTIFIED BY "%{DB_PASSWD}"' | mysql
123
124 mysqladmin reload
125
126 cat schemas/mysql.sql | mysql %{DB_NAME} 
127
128
129 %files
130 %defattr(-, root, root, 0755)
131 %doc README UPGRADING LICENSE INSTALL doc Makefile tests
132
133 %{prefix}/%{name}/*.php
134 %{prefix}/%{name}/*.wsdl
135 %{prefix}/%{name}/wiki
136
137 %{prefix}/%{name}/lib
138 %{prefix}/%{name}/locale
139 %{prefix}/%{name}/pgsrc
140 %{prefix}/%{name}/themes
141 %{prefix}/%{name}/schemas
142 %{prefix}/%{name}/config/config-default.ini
143 %dir %{prefix}/%{name}/uploads
144
145 %config %{prefix}/%{name}/uploads/.htaccess
146 %config %{prefix}/%{name}/config/config.ini
147
148
149
150 %changelog
151 * Tue May 19 2005 Jesse Becker <jbecker@northwestern.edu>
152 - Initial build