4 |
|
|
5 |
%define name smeserver-wordpress |
%define name smeserver-wordpress |
6 |
%define version 1.0 |
%define version 1.0 |
7 |
%define release 5 |
%define release 14 |
8 |
Summary: smserver rpm to setup mysql database and web link for wordpress weblog |
Summary: smserver rpm to setup mysql database and web link for wordpress weblog |
9 |
Name: %{name} |
Name: %{name} |
10 |
Version: %{version} |
Version: %{version} |
15 |
Source: %{name}-%{version}.tar.gz |
Source: %{name}-%{version}.tar.gz |
16 |
Patch0: smeserver-wordpress-1.0-rm80opt.patch |
Patch0: smeserver-wordpress-1.0-rm80opt.patch |
17 |
Patch1: smeserver-wordpress-1.0-tmp_folder.patch |
Patch1: smeserver-wordpress-1.0-tmp_folder.patch |
18 |
|
Patch2: smeserver-wordpress-1.0-wpEPEL.patch |
19 |
|
Patch3: smeserver-wordpress-1.0-patch3.patch |
20 |
|
Patch4: smeserver-wordpress-1.0-patch4.patch |
21 |
|
Patch5: smeserver-wordpress-1.0_corrected_ownership2www_and_added_salt.patch |
22 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
23 |
BuildRoot: /var/tmp/%{name}-%{version} |
BuildRoot: /var/tmp/%{name}-%{version} |
24 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
30 |
smserver rpm to setup mysql database and web link for wordpress weblog |
smserver rpm to setup mysql database and web link for wordpress weblog |
31 |
|
|
32 |
%changelog |
%changelog |
33 |
|
* Tue Sep 02 2014 stephane de Labrusse <stephdl@de-labrusse.fr> 1.0-14.sme |
34 |
|
- corrected the lack of module MIME::Base64 [SME: 8548] |
35 |
|
- corrected the new ownership of www on /etc/wordpress [SME: 8546] |
36 |
|
- added templates.metadata to root,www 0640 on /etc/wordpress/wp-config.php |
37 |
|
- changed db {wordpress}{phrase} to {wordpress}{Salt} |
38 |
|
|
39 |
|
* Tue Nov 5 2013 JP Pialasse <tests@pialasse.com> 1.0-13.sme |
40 |
|
- added chown to allow plugin instalaltion and translation |
41 |
|
|
42 |
|
* Tue Nov 5 2013 JP Pialasse <tests@pialasse.com> 1.0-12.sme |
43 |
|
- error in config file [SME: 7978] |
44 |
|
- also added more configuration option |
45 |
|
- added /usr/share/php/ in phpbasedir [SME: 7977] |
46 |
|
- patch cleanup, createlinks added to spec |
47 |
|
|
48 |
|
* Sun Oct 27 2013 JP Pialasse <tests@pialasse.com> 1.0-10.sme |
49 |
|
- rewritten for epel version of wordpress |
50 |
|
- added createlinks and conf-wordpress event |
51 |
|
- start cleaning spec file |
52 |
|
- modified php base dir |
53 |
|
|
54 |
|
|
55 |
* Wed Sep 04 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> 1.0.5 |
* Wed Sep 04 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> 1.0.5 |
56 |
- add www:www permission on /opt/wordpress folder to allow automatic update by FTP |
- add www:www permission on /opt/wordpress folder to allow automatic update by FTP |
57 |
|
|
94 |
%setup |
%setup |
95 |
%patch0 -p1 |
%patch0 -p1 |
96 |
%patch1 -p1 |
%patch1 -p1 |
97 |
%build |
%patch2 -p1 |
98 |
mkdir -p root/etc/e-smith/db/accounts/defaults/wordpress |
%patch3 -p1 |
99 |
echo "reserved" > root/etc/e-smith/db/accounts/defaults/wordpress/type |
%patch4 -p1 |
100 |
|
%patch5 -p1 |
101 |
|
|
102 |
mkdir -p root/etc/e-smith/db/configuration/defaults/wordpress |
%build |
103 |
echo "Wordpress weblog" > root/etc/e-smith/db/configuration/defaults/wordpress/Name |
perl createlinks |
104 |
echo "global" > root/etc/e-smith/db/configuration/defaults/wordpress/PublicAccess |
#mkdir -p root/etc/e-smith/db/accounts/defaults/wordpress |
105 |
echo "enabled" > root/etc/e-smith/db/configuration/defaults/wordpress/status |
#echo "reserved" > root/etc/e-smith/db/accounts/defaults/wordpress/type |
106 |
echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbName |
# |
107 |
echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbUser |
#mkdir -p root/etc/e-smith/db/configuration/defaults/wordpress |
108 |
echo "en" > root/etc/e-smith/db/configuration/defaults/wordpress/WpLang |
#echo "Wordpress weblog" > root/etc/e-smith/db/configuration/defaults/wordpress/Name |
109 |
|
#echo "global" > root/etc/e-smith/db/configuration/defaults/wordpress/PublicAccess |
110 |
mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init |
#echo "enabled" > root/etc/e-smith/db/configuration/defaults/wordpress/status |
111 |
echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80wordpress |
#echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbName |
112 |
|
#echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbUser |
113 |
#only needed so it is removed afterwards |
#echo "en" > root/etc/e-smith/db/configuration/defaults/wordpress/WpLang |
114 |
mkdir -p root/opt/wordpress |
# |
115 |
touch root/opt/wordpress/wp-config.php |
#mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init |
116 |
|
#echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80wordpress |
117 |
|
# |
118 |
|
##only needed so it is removed afterwards |
119 |
|
#mkdir -p root/opt/wordpress |
120 |
|
#touch root/opt/wordpress/wp-config.php |
121 |
|
|
122 |
%install |
%install |
123 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
135 |
%preun |
%preun |
136 |
|
|
137 |
%post |
%post |
138 |
/etc/e-smith/events/actions/initialize-default-databases |
#/etc/e-smith/events/actions/initialize-default-databases |
139 |
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80wordpress |
#/sbin/e-smith/expand-template /etc/e-smith/sql/init/80wordpress |
140 |
/etc/rc.d/init.d/mysql.init start |
#/etc/rc.d/init.d/mysql.init start |
141 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
#/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
142 |
/sbin/e-smith/expand-template /opt/wordpress/wp-config.php |
#/sbin/e-smith/expand-template /opt/wordpress/wp-config.php |
143 |
/usr/bin/sv h /service/httpd-e-smith |
#/usr/bin/sv h /service/httpd-e-smith |
144 |
|
# |
145 |
echo "" |
#echo "" |
146 |
echo "see http://wiki.contribs.org/Wordpress" |
#echo "see http://wiki.contribs.org/Wordpress" |
147 |
echo "see config show wordpress" |
#echo "see config show wordpress" |
148 |
/sbin/e-smith/config show wordpress |
#/sbin/e-smith/config show wordpress |
149 |
echo " " |
#echo " " |
150 |
/bin/chown -R www:www /opt/wordpress/ |
|
151 |
|
# this one under I am not sure if it is a good thing ..................... !!!!!! |
152 |
|
#/bin/chown -R www:www /opt/wordpress/ |
153 |
|
|
154 |
%postun |
%postun |
155 |
#uninstall |
#uninstall |
156 |
if [ $1 = 0 ] ; then |
#if [ $1 = 0 ] ; then |
157 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
158 |
/usr/bin/sv h /service/httpd-e-smith |
# /usr/bin/sv h /service/httpd-e-smith |
159 |
fi |
#fi |
160 |
|
|
161 |
%files -f %{name}-%{version}-filelist |
%files -f %{name}-%{version}-filelist |
162 |
%defattr(-,root,root) |
%defattr(-,root,root) |