]>
Commit | Line | Data |
---|---|---|
0f7aa528 ER |
1 | # TODO |
2 | # - gettext mo to system dir, add all possible languages? | |
7f9b628a | 3 | # - merge changes from wpmu.spec |
ec33fe30 | 4 | Summary: Personal publishing system |
fbfe2ed5 | 5 | Summary(pl.UTF-8): Osobisty system publikacji |
ec33fe30 | 6 | Name: wordpress |
b04365ce | 7 | Version: 3.0.1 |
c1fcdc96 | 8 | Release: 0.7 |
b04365ce | 9 | License: GPL v2 |
ec33fe30 | 10 | Group: Applications/Publishing |
c674f72d | 11 | Source0: http://wordpress.org/%{name}-%{version}.tar.gz |
b04365ce | 12 | # Source0-md5: 8fa5373ed805fb9a6ee56dfd236dcb64 |
54d512d5 | 13 | Source1: wp-secure.sh |
14 | Source2: wp-setup.sh | |
15 | Source3: wp-setup.txt | |
7890ba25 ER |
16 | Source4: apache.conf |
17 | Source5: lighttpd.conf | |
0e9a5e64 ER |
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 | |
7191aabf | 22 | # MagpieRSS upgrade (version 0.8a) from feedwordpress plugin: http://feedwordpress.radgeek.com/ |
23 | Source10: rss.php | |
24 | Source11: rss-functions.php | |
c1fcdc96 ER |
25 | Patch0: configpath.patch |
26 | Patch1: allow-multisite.patch | |
27 | Patch2: %{name}.patch | |
7f9b628a ER |
28 | URL: http://www.wordpress.org/ |
29 | BuildRequires: gettext-devel | |
30 | BuildRequires: rpmbuild(macros) >= 1.553 | |
c674f72d ER |
31 | Requires: php-gettext |
32 | Requires: php-mysql | |
33 | Requires: php-pcre | |
34 | Requires: php-xml | |
35 | Requires: php-xmlrpc | |
3ab985b1 | 36 | Requires: webapps |
087631da | 37 | Requires: webserver(php) >= 5.0 |
edeb68e0 | 38 | BuildArch: noarch |
ec33fe30 | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
3ab985b1 ER |
41 | %define _appdir %{_datadir}/%{name} |
42 | %define _webapps /etc/webapps | |
43 | %define _webapp %{name} | |
44 | %define _sysconfdir %{_webapps}/%{_webapp} | |
ec33fe30 | 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 | ||
0677b3c7 JR |
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 | |
ec33fe30 | 59 | eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji |
0677b3c7 JR |
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. | |
ec33fe30 | 64 | |
c674f72d ER |
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 | ||
a095fc01 ER |
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 | ||
ed53548e ER |
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 | ||
ec33fe30 | 109 | %prep |
7f9b628a ER |
110 | %setup -qc |
111 | mv %{name}/* . && rmdir %{name} | |
bbcdc79a | 112 | %undos -f php,js,html |
c674f72d | 113 | %patch0 -p1 |
ed53548e | 114 | %patch1 -p1 |
c1fcdc96 ER |
115 | cp -a wp-config{-sample,}.php |
116 | %patch2 -p1 | |
7f9b628a | 117 | cp -a %{SOURCE3} . |
3ab985b1 | 118 | rm -f license.txt |
ec33fe30 | 119 | |
7f9b628a ER |
120 | rm wp-content/themes/index.php |
121 | rm wp-content/plugins/index.php | |
122 | rm wp-content/index.php | |
123 | ||
a095fc01 ER |
124 | # sample plugin |
125 | rm wp-content/plugins/hello.php | |
126 | ||
7191aabf | 127 | # Install new MagpieRSS |
7f9b628a ER |
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 | |
7191aabf | 131 | |
7ccb4aa4 | 132 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f |
c674f72d | 133 | |
7f9b628a ER |
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 | ||
ec33fe30 | 139 | %install |
140 | rm -rf $RPM_BUILD_ROOT | |
82c8bcde | 141 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/{languages,mu-plugins}} |
ec33fe30 | 142 | |
c674f72d | 143 | cp -a . $RPM_BUILD_ROOT%{_appdir} |
bbcdc79a | 144 | mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/wp-config.php |
3ab985b1 ER |
145 | rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html |
146 | rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt | |
c674f72d | 147 | |
7f9b628a ER |
148 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure |
149 | install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup | |
c674f72d ER |
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 | |
4b140d58 | 152 | |
7f9b628a ER |
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 | |
20ae9c53 | 156 | |
edeb68e0 JB |
157 | %clean |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | ||
ec33fe30 | 160 | %post |
c674f72d | 161 | if [ "$1" = 1 ]; then |
3ab985b1 ER |
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 | |
c674f72d ER |
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 | |
3ab985b1 | 169 | EOF |
20ae9c53 | 170 | fi |
3ab985b1 | 171 | |
c674f72d ER |
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 | ||
b973cc00 | 182 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
3ab985b1 ER |
183 | %webapp_register apache %{_webapp} |
184 | ||
ca1cad3e RT |
185 | %triggerin -- lighttpd |
186 | %webapp_register lighttpd %{_webapp} | |
187 | ||
b973cc00 | 188 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
3ab985b1 ER |
189 | %webapp_unregister apache %{_webapp} |
190 | ||
cda44e30 | 191 | %triggerin -- apache < 2.2.0, apache-base |
3ab985b1 ER |
192 | %webapp_register httpd %{_webapp} |
193 | ||
cda44e30 | 194 | %triggerun -- apache < 2.2.0, apache-base |
3ab985b1 ER |
195 | %webapp_unregister httpd %{_webapp} |
196 | ||
ca1cad3e RT |
197 | %triggerun -- lighttpd |
198 | %webapp_unregister lighttpd %{_webapp} | |
199 | ||
ec33fe30 | 200 | %files |
843f1ee3 | 201 | %defattr(644,root,root,755) |
202 | %doc readme.html wp-setup.txt | |
3ab985b1 ER |
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 | |
ca1cad3e | 206 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf |
c674f72d | 207 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php |
3ab985b1 ER |
208 | |
209 | %dir %{_appdir} | |
3ab985b1 | 210 | %{_appdir}/*.php |
c674f72d | 211 | %{_appdir}/wp-includes |
c674f72d ER |
212 | %dir %{_appdir}/wp-content |
213 | %dir %{_appdir}/wp-content/languages | |
0f7aa528 ER |
214 | %lang(et) %{_appdir}/wp-content/languages/et.mo |
215 | %lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo | |
c674f72d | 216 | %dir %{_appdir}/wp-content/plugins |
82c8bcde | 217 | %dir %{_appdir}/wp-content/mu-plugins |
c674f72d | 218 | %dir %{_appdir}/wp-content/themes |
c674f72d ER |
219 | |
220 | %files setup | |
221 | %defattr(644,root,root,755) | |
022de391 | 222 | %attr(755,root,root) %{_bindir}/wp-secure |
223 | %attr(755,root,root) %{_bindir}/wp-setup | |
c674f72d ER |
224 | %{_appdir}/wp-secure.sh |
225 | %{_appdir}/wp-setup.sh | |
226 | %{_appdir}/wp-admin | |
ed53548e | 227 | |
a095fc01 ER |
228 | %files plugin-akismet |
229 | %defattr(644,root,root,755) | |
230 | %dir %{_appdir}/wp-content/plugins/akismet | |
231 | %doc %{_appdir}/wp-content/plugins/akismet/readme.txt | |
232 | %{_appdir}/wp-content/plugins/akismet/*.php | |
233 | %{_appdir}/wp-content/plugins/akismet/*.gif | |
234 | ||
ed53548e ER |
235 | %files theme-twentyten |
236 | %defattr(644,root,root,755) | |
237 | %{_appdir}/wp-content/themes/twentyten |