]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - gettext mo to system dir, add all possible languages? | |
3 | # - merge changes from wpmu.spec | |
4 | Summary: Personal publishing system | |
5 | Summary(pl.UTF-8): Osobisty system publikacji | |
6 | Name: wordpress | |
7 | Version: 3.0.1 | |
8 | Release: 0.8 | |
9 | License: GPL v2 | |
10 | Group: Applications/Publishing | |
11 | Source0: http://wordpress.org/%{name}-%{version}.tar.gz | |
12 | # Source0-md5: 8fa5373ed805fb9a6ee56dfd236dcb64 | |
13 | Source1: wp-secure.sh | |
14 | Source2: wp-setup.sh | |
15 | Source3: wp-setup.txt | |
16 | Source4: apache.conf | |
17 | Source5: lighttpd.conf | |
18 | Source6: http://svn.automattic.com/wordpress-i18n/et/tags/%{version}/messages/et.po | |
19 | # Source6-md5: 7ee698806091573a534a4889f88d6d97 | |
20 | Source7: http://svn.automattic.com/wordpress-i18n/pl_PL/tags/%{version}/messages/pl_PL.po | |
21 | # Source7-md5: 795864c6eeeadcc74b8ea70d45f22e9f | |
22 | # MagpieRSS upgrade (version 0.8a) from feedwordpress plugin: http://feedwordpress.radgeek.com/ | |
23 | Source10: rss.php | |
24 | Source11: rss-functions.php | |
25 | Patch0: configpath.patch | |
26 | Patch1: multisite.patch | |
27 | Patch2: %{name}.patch | |
28 | URL: http://www.wordpress.org/ | |
29 | BuildRequires: gettext-devel | |
30 | BuildRequires: rpmbuild(macros) >= 1.553 | |
31 | Requires: php-gettext | |
32 | Requires: php-mysql | |
33 | Requires: php-pcre | |
34 | Requires: php-xml | |
35 | Requires: php-xmlrpc | |
36 | Requires: webapps | |
37 | Requires: webserver(php) >= 5.0 | |
38 | BuildArch: noarch | |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | %define _appdir %{_datadir}/%{name} | |
42 | %define _webapps /etc/webapps | |
43 | %define _webapp %{name} | |
44 | %define _sysconfdir %{_webapps}/%{_webapp} | |
45 | ||
46 | %description | |
47 | WordPress is a state-of-the-art semantic personal publishing platform | |
48 | with a focus on aesthetics, web standards, and usability. WordPress | |
49 | was born out of a desire for an elegant, well-architectured personal | |
50 | publishing system (also called blog or weblog) built on PHP and MySQL | |
51 | and licensed under the GPL. It is the official successor of | |
52 | b2/cafelog. WordPress is fresh software, but its roots and development | |
53 | go back to 2001. | |
54 | ||
55 | %description -l pl.UTF-8 | |
56 | WordPress jest technologicznie dopracowaną, semantyczną, osobistą | |
57 | platformą do publikacji kładącą nacisk na standardy WWW oraz | |
58 | użyteczność. WordPress został stworzony w wyniku potrzeby | |
59 | eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji | |
60 | (nazywanego również blogiem czy weblogiem). Jest to system oparty o | |
61 | PHP i MySQL oraz na licencji GPL. Jest oficjalnym następcą b2/cafelog. | |
62 | WordPress jest nowym oprogramowaniem, ale jego korzenie i rozwój | |
63 | sięgają 2001 roku. | |
64 | ||
65 | %package setup | |
66 | Summary: Wordpress setup package | |
67 | Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Wordpress | |
68 | Group: Applications/WWW | |
69 | Requires: %{name} = %{version}-%{release} | |
70 | ||
71 | %description setup | |
72 | Install this package to configure initial WordPress installation. You | |
73 | should uninstall this package when you're done, as it considered | |
74 | insecure to keep the setup files in place. | |
75 | ||
76 | %description setup -l pl.UTF-8 | |
77 | Ten pakiet należy zainstalować w celu wstępnej konfiguracji WordPress | |
78 | po pierwszej instalacji. Potem należy go odinstalować, jako że | |
79 | pozostawienie plików instalacyjnych mogłoby być niebezpieczne. | |
80 | ||
81 | %package plugin-akismet | |
82 | Summary: Wordpress Akismet Plugin | |
83 | Group: Applications/WWW | |
84 | Requires: %{name} = %{version}-%{release} | |
85 | ||
86 | %description plugin-akismet | |
87 | Akismet checks your comments against the Akismet web service to see if | |
88 | they look like spam or not and lets you review the spam it catches | |
89 | under your blog's "Comments" admin screen. | |
90 | ||
91 | %package theme-twentyten | |
92 | Summary: Wordpress MU default theme | |
93 | Group: Applications/WWW | |
94 | URL: http://wordpress.org/extend/themes/twentyten | |
95 | Requires: %{name} = %{version}-%{release} | |
96 | ||
97 | %description theme-twentyten | |
98 | The 2010 theme for WordPress is stylish, customizable, simple, and | |
99 | readable. | |
100 | ||
101 | Make it yours with a custom menu, header image, and background. Twenty | |
102 | Ten supports six widgetized areas (two in the sidebar, four in the | |
103 | footer) and featured images (thumbnails for gallery posts and custom | |
104 | header images for posts and pages). It includes stylesheets for print | |
105 | and the admin Visual Editor, special styles for posts in the "Asides" | |
106 | and "Gallery" categories, and has an optional one-column page template | |
107 | that removes the sidebar. | |
108 | ||
109 | %prep | |
110 | %setup -qc | |
111 | mv %{name}/* . && rmdir %{name} | |
112 | %undos -f php,js,html | |
113 | %patch0 -p1 | |
114 | %patch1 -p1 | |
115 | cp -a wp-config{-sample,}.php | |
116 | %patch2 -p1 | |
117 | cp -a %{SOURCE3} . | |
118 | rm -f license.txt | |
119 | ||
120 | rm wp-content/themes/index.php | |
121 | rm wp-content/plugins/index.php | |
122 | rm wp-content/index.php | |
123 | ||
124 | # sample plugin | |
125 | rm wp-content/plugins/hello.php | |
126 | ||
127 | # Install new MagpieRSS | |
128 | # NOTE: this is deprecated, simplepie should be used instead | |
129 | cp -a %{SOURCE10} wp-includes/rss.php | |
130 | cp -a %{SOURCE11} wp-includes/rss-functions.php | |
131 | ||
132 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
133 | ||
134 | %build | |
135 | install -d wp-content/languages | |
136 | msgfmt --statistics %{SOURCE6} -o wp-content/languages/et.mo | |
137 | msgfmt --statistics %{SOURCE7} -o wp-content/languages/pl_PL.mo | |
138 | ||
139 | %install | |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/{languages,mu-plugins},/var/{lib,log}/%{name}} | |
142 | ||
143 | cp -a . $RPM_BUILD_ROOT%{_appdir} | |
144 | mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/wp-config.php | |
145 | rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html | |
146 | rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt | |
147 | ||
148 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure | |
149 | install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup | |
150 | ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh | |
151 | ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh | |
152 | ||
153 | cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
154 | cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
155 | cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
156 | ||
157 | %clean | |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | ||
160 | %post | |
161 | if [ "$1" = 1 ]; then | |
162 | %banner -e %{name} <<-EOF | |
163 | To finish your configuration DO NOT FORGET to: | |
164 | ||
165 | 1) Create some MySQL database owned by some user | |
166 | 2) Edit the file: %{_sysconfdir}/wp-config.php | |
167 | 3) Install %{name}-setup | |
168 | 4) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php | |
169 | EOF | |
170 | fi | |
171 | ||
172 | %post setup | |
173 | chmod 660 %{_sysconfdir}/wp-config.php | |
174 | chown root:http %{_sysconfdir}/wp-config.php | |
175 | ||
176 | %postun setup | |
177 | if [ "$1" = "0" ]; then | |
178 | chmod 640 %{_sysconfdir}/wp-config.php | |
179 | chown root:http %{_sysconfdir}/wp-config.php | |
180 | fi | |
181 | ||
182 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
183 | %webapp_register apache %{_webapp} | |
184 | ||
185 | %triggerin -- lighttpd | |
186 | %webapp_register lighttpd %{_webapp} | |
187 | ||
188 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
189 | %webapp_unregister apache %{_webapp} | |
190 | ||
191 | %triggerin -- apache < 2.2.0, apache-base | |
192 | %webapp_register httpd %{_webapp} | |
193 | ||
194 | %triggerun -- apache < 2.2.0, apache-base | |
195 | %webapp_unregister httpd %{_webapp} | |
196 | ||
197 | %triggerun -- lighttpd | |
198 | %webapp_unregister lighttpd %{_webapp} | |
199 | ||
200 | %files | |
201 | %defattr(644,root,root,755) | |
202 | %doc readme.html wp-setup.txt | |
203 | %dir %attr(750,root,http) %{_sysconfdir} | |
204 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
205 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
206 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
207 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php | |
208 | ||
209 | %dir %{_appdir} | |
210 | %{_appdir}/*.php | |
211 | %{_appdir}/wp-includes | |
212 | %dir %{_appdir}/wp-content | |
213 | %dir %{_appdir}/wp-content/languages | |
214 | %lang(et) %{_appdir}/wp-content/languages/et.mo | |
215 | %lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo | |
216 | %dir %{_appdir}/wp-content/plugins | |
217 | %dir %{_appdir}/wp-content/mu-plugins | |
218 | %dir %{_appdir}/wp-content/themes | |
219 | ||
220 | %attr(775,root,http) /var/lib/%{name} | |
221 | %attr(775,root,http) /var/log/%{name} | |
222 | ||
223 | %files setup | |
224 | %defattr(644,root,root,755) | |
225 | %attr(755,root,root) %{_bindir}/wp-secure | |
226 | %attr(755,root,root) %{_bindir}/wp-setup | |
227 | %{_appdir}/wp-secure.sh | |
228 | %{_appdir}/wp-setup.sh | |
229 | %{_appdir}/wp-admin | |
230 | ||
231 | %files plugin-akismet | |
232 | %defattr(644,root,root,755) | |
233 | %dir %{_appdir}/wp-content/plugins/akismet | |
234 | %doc %{_appdir}/wp-content/plugins/akismet/readme.txt | |
235 | %{_appdir}/wp-content/plugins/akismet/*.php | |
236 | %{_appdir}/wp-content/plugins/akismet/*.gif | |
237 | ||
238 | %files theme-twentyten | |
239 | %defattr(644,root,root,755) | |
240 | %{_appdir}/wp-content/themes/twentyten |