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