]>
Commit | Line | Data |
---|---|---|
0f7aa528 ER |
1 | # TODO |
2 | # - gettext mo to system dir, add all possible languages? | |
ec33fe30 | 3 | Summary: Personal publishing system |
fbfe2ed5 | 4 | Summary(pl.UTF-8): Osobisty system publikacji |
ec33fe30 | 5 | Name: wordpress |
9f508cbe | 6 | Version: 2.9.2 |
7191aabf | 7 | Release: 2 |
ec33fe30 | 8 | License: GPL |
9 | Group: Applications/Publishing | |
c674f72d | 10 | Source0: http://wordpress.org/%{name}-%{version}.tar.gz |
9f508cbe | 11 | # Source0-md5: 6023fe6701476c8152bda5d4c6277c69 |
54d512d5 | 12 | Source1: wp-secure.sh |
13 | Source2: wp-setup.sh | |
14 | Source3: wp-setup.txt | |
c674f72d | 15 | Source4: %{name}-apache.conf |
59d447d5 | 16 | Source5: %{name}-lighttpd.conf |
9f508cbe | 17 | Source6: http://svn.automattic.com/wordpress-i18n/et/tags/2.9/messages/et.mo |
9d96fa77 | 18 | # Source6-md5: 7a3e3008c58a56e1c8777a9a1b404787 |
9f508cbe | 19 | Source7: http://svn.automattic.com/wordpress-i18n/pl_PL/tags/2.9/messages/pl_PL.mo |
9d96fa77 | 20 | # Source7-md5: a68aba62c7301da37ad0e05c1a5ca143 |
7191aabf | 21 | # MagpieRSS upgrade (version 0.8a) from feedwordpress plugin: http://feedwordpress.radgeek.com/ |
22 | Source10: rss.php | |
23 | Source11: rss-functions.php | |
c674f72d | 24 | Patch0: %{name}.patch |
ec33fe30 | 25 | URL: http://wordpress.org/ |
9d96fa77 | 26 | BuildRequires: rpm-build-macros >= 1.553 |
c674f72d ER |
27 | Requires: php-gettext |
28 | Requires: php-mysql | |
29 | Requires: php-pcre | |
30 | Requires: php-xml | |
31 | Requires: php-xmlrpc | |
3ab985b1 | 32 | Requires: webapps |
087631da | 33 | Requires: webserver(php) >= 5.0 |
edeb68e0 | 34 | BuildArch: noarch |
ec33fe30 | 35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
3ab985b1 ER |
37 | %define _appdir %{_datadir}/%{name} |
38 | %define _webapps /etc/webapps | |
39 | %define _webapp %{name} | |
40 | %define _sysconfdir %{_webapps}/%{_webapp} | |
ec33fe30 | 41 | |
42 | %description | |
43 | WordPress is a state-of-the-art semantic personal publishing platform | |
44 | with a focus on aesthetics, web standards, and usability. WordPress | |
45 | was born out of a desire for an elegant, well-architectured personal | |
46 | publishing system (also called blog or weblog) built on PHP and MySQL | |
47 | and licensed under the GPL. It is the official successor of | |
48 | b2/cafelog. WordPress is fresh software, but its roots and development | |
49 | go back to 2001. | |
50 | ||
0677b3c7 JR |
51 | %description -l pl.UTF-8 |
52 | WordPress jest technologicznie dopracowaną, semantyczną, osobistą | |
53 | platformą do publikacji kładącą nacisk na standardy WWW oraz | |
54 | użyteczność. WordPress został stworzony w wyniku potrzeby | |
ec33fe30 | 55 | eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji |
0677b3c7 JR |
56 | (nazywanego również blogiem czy weblogiem). Jest to system oparty o |
57 | PHP i MySQL oraz na licencji GPL. Jest oficjalnym następcą b2/cafelog. | |
58 | WordPress jest nowym oprogramowaniem, ale jego korzenie i rozwój | |
59 | sięgają 2001 roku. | |
ec33fe30 | 60 | |
c674f72d ER |
61 | %package setup |
62 | Summary: Wordpress setup package | |
63 | Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Wordpress | |
64 | Group: Applications/WWW | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | ||
67 | %description setup | |
68 | Install this package to configure initial WordPress installation. You | |
69 | should uninstall this package when you're done, as it considered | |
70 | insecure to keep the setup files in place. | |
71 | ||
72 | %description setup -l pl.UTF-8 | |
73 | Ten pakiet należy zainstalować w celu wstępnej konfiguracji WordPress | |
74 | po pierwszej instalacji. Potem należy go odinstalować, jako że | |
75 | pozostawienie plików instalacyjnych mogłoby być niebezpieczne. | |
76 | ||
ec33fe30 | 77 | %prep |
78 | %setup -q -n %{name} | |
c674f72d ER |
79 | %patch0 -p1 |
80 | cp %{SOURCE3} . | |
3ab985b1 | 81 | rm -f license.txt |
ec33fe30 | 82 | |
7191aabf | 83 | # Install new MagpieRSS |
84 | cp %{SOURCE10} wp-includes/rss.php | |
85 | cp %{SOURCE11} wp-includes/rss-functions.php | |
86 | ||
9d96fa77 | 87 | find '(' -name '*.php' -o -name '*.js' -o -name '*.html' ')' -print0 | xargs -0 %undos |
7ccb4aa4 | 88 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f |
c674f72d | 89 | |
ec33fe30 | 90 | %install |
91 | rm -rf $RPM_BUILD_ROOT | |
f20d6350 | 92 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_sysconfdir},%{_appdir}/wp-content/languages} |
ec33fe30 | 93 | |
c674f72d ER |
94 | cp -a . $RPM_BUILD_ROOT%{_appdir} |
95 | cp -a wp-config-sample.php $RPM_BUILD_ROOT%{_sysconfdir}/wp-config.php | |
3ab985b1 ER |
96 | rm -f $RPM_BUILD_ROOT%{_appdir}/readme.html |
97 | rm -f $RPM_BUILD_ROOT%{_appdir}/wp-setup.txt | |
c674f72d ER |
98 | |
99 | install %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wp-secure | |
100 | install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/wp-setup | |
101 | ln -s %{_bindir}/wp-setup $RPM_BUILD_ROOT%{_appdir}/wp-setup.sh | |
102 | ln -s %{_bindir}/wp-secure $RPM_BUILD_ROOT%{_appdir}/wp-secure.sh | |
4b140d58 | 103 | |
3ab985b1 ER |
104 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf |
105 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
ca1cad3e | 106 | install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf |
0f7aa528 ER |
107 | install %{SOURCE6} $RPM_BUILD_ROOT%{_appdir}/wp-content/languages |
108 | install %{SOURCE7} $RPM_BUILD_ROOT%{_appdir}/wp-content/languages | |
20ae9c53 | 109 | |
edeb68e0 JB |
110 | %clean |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
ec33fe30 | 113 | %post |
c674f72d | 114 | if [ "$1" = 1 ]; then |
3ab985b1 ER |
115 | %banner -e %{name} <<-EOF |
116 | To finish your configuration DO NOT FORGET to: | |
117 | ||
118 | 1) Create some MySQL database owned by some user | |
c674f72d ER |
119 | 2) Edit the file: %{_sysconfdir}/wp-config.php |
120 | 3) Install %{name}-setup | |
121 | 4) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php | |
3ab985b1 | 122 | EOF |
20ae9c53 | 123 | fi |
3ab985b1 | 124 | |
c674f72d ER |
125 | %post setup |
126 | chmod 660 %{_sysconfdir}/wp-config.php | |
127 | chown root:http %{_sysconfdir}/wp-config.php | |
128 | ||
129 | %postun setup | |
130 | if [ "$1" = "0" ]; then | |
131 | chmod 640 %{_sysconfdir}/wp-config.php | |
132 | chown root:http %{_sysconfdir}/wp-config.php | |
133 | fi | |
134 | ||
b973cc00 | 135 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
3ab985b1 ER |
136 | %webapp_register apache %{_webapp} |
137 | ||
ca1cad3e RT |
138 | %triggerin -- lighttpd |
139 | %webapp_register lighttpd %{_webapp} | |
140 | ||
b973cc00 | 141 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
3ab985b1 ER |
142 | %webapp_unregister apache %{_webapp} |
143 | ||
cda44e30 | 144 | %triggerin -- apache < 2.2.0, apache-base |
3ab985b1 ER |
145 | %webapp_register httpd %{_webapp} |
146 | ||
cda44e30 | 147 | %triggerun -- apache < 2.2.0, apache-base |
3ab985b1 ER |
148 | %webapp_unregister httpd %{_webapp} |
149 | ||
ca1cad3e RT |
150 | %triggerun -- lighttpd |
151 | %webapp_unregister lighttpd %{_webapp} | |
152 | ||
ec33fe30 | 153 | %files |
843f1ee3 | 154 | %defattr(644,root,root,755) |
155 | %doc readme.html wp-setup.txt | |
3ab985b1 ER |
156 | %dir %attr(750,root,http) %{_sysconfdir} |
157 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
158 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
ca1cad3e | 159 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf |
c674f72d | 160 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/wp-config.php |
3ab985b1 ER |
161 | |
162 | %dir %{_appdir} | |
3ab985b1 | 163 | %{_appdir}/*.php |
c674f72d ER |
164 | %{_appdir}/wp-includes |
165 | %{_appdir}/wp-content/index.php | |
166 | %dir %{_appdir}/wp-content | |
167 | %dir %{_appdir}/wp-content/languages | |
0f7aa528 ER |
168 | %lang(et) %{_appdir}/wp-content/languages/et.mo |
169 | %lang(pl) %{_appdir}/wp-content/languages/pl_PL.mo | |
c674f72d ER |
170 | %dir %{_appdir}/wp-content/plugins |
171 | %{_appdir}/wp-content/plugins/*.php | |
172 | %{_appdir}/wp-content/plugins/akismet | |
173 | ||
174 | %dir %{_appdir}/wp-content/themes | |
175 | %{_appdir}/wp-content/themes/classic | |
176 | %{_appdir}/wp-content/themes/default | |
177 | ||
178 | %files setup | |
179 | %defattr(644,root,root,755) | |
022de391 | 180 | %attr(755,root,root) %{_bindir}/wp-secure |
181 | %attr(755,root,root) %{_bindir}/wp-setup | |
c674f72d ER |
182 | %{_appdir}/wp-secure.sh |
183 | %{_appdir}/wp-setup.sh | |
184 | %{_appdir}/wp-admin |