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