1 |
# $Id: smeserver-wordpress.spec,v 1.6 2008/11/29 03:11:22 dungog Exp $ |
2 |
# Authority: dungog |
3 |
# Name: Stephen Noble |
4 |
|
5 |
%define name smeserver-wordpress |
6 |
%define version 1.0 |
7 |
%define release 12 |
8 |
Summary: smserver rpm to setup mysql database and web link for wordpress weblog |
9 |
Name: %{name} |
10 |
Version: %{version} |
11 |
Release: %{release}%{?dist} |
12 |
License: GNU GPL version 2 |
13 |
URL: http://www.dungog.net/wiki |
14 |
Group: SMEserver/addon |
15 |
Source: %{name}-%{version}.tar.gz |
16 |
Patch0: smeserver-wordpress-1.0-rm80opt.patch |
17 |
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 |
BuildArchitectures: noarch |
21 |
BuildRoot: /var/tmp/%{name}-%{version} |
22 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
23 |
Requires: e-smith-release >= 8.0 |
24 |
Requires: wordpress |
25 |
AutoReqProv: no |
26 |
|
27 |
%description |
28 |
smserver rpm to setup mysql database and web link for wordpress weblog |
29 |
|
30 |
%changelog |
31 |
* Tue Nov 5 2013 JP Pialasse <tests@pialasse.com> 1.0-12.sme |
32 |
- error in config file [SME: 7978] |
33 |
- also added more configuration option |
34 |
- added /usr/share/php/ in phpbasedir [SME: 7977] |
35 |
- patch cleanup, createlinks added to spec |
36 |
|
37 |
* Sun Oct 27 2013 JP Pialasse <tests@pialasse.com> 1.0-10.sme |
38 |
- rewritten for epel version of wordpress |
39 |
- added createlinks and conf-wordpress event |
40 |
- start cleaning spec file |
41 |
- modified php base dir |
42 |
|
43 |
|
44 |
* Wed Sep 04 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> 1.0.5 |
45 |
- add www:www permission on /opt/wordpress folder to allow automatic update by FTP |
46 |
|
47 |
* Wed Jun 05 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> 1.0.4 |
48 |
- add a tmp folder in httpd.conf |
49 |
* Mon Jun 03 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> 1.0-3 |
50 |
- backup html-folder, mysql-base, and config-file during erase and upgrade process |
51 |
|
52 |
* Thu May 29 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> |
53 |
- require sme8 due to wordpress 3.5 needs php version > 5.2 |
54 |
|
55 |
* Sat Nov 29 2008 Stephen Noble <support@dungog.net> 1.0-2 |
56 |
- http alias 80opt removed |
57 |
|
58 |
* Fri Jul 06 2007 Stephen Noble <support@dungog.net> 1.0-1 |
59 |
- http alias, auto setup, template wp-config.php |
60 |
|
61 |
* Mon Dec 11 2006 Stephen Noble <support@dungog.net> |
62 |
- rpm %post events reordered, to enable clean install |
63 |
- [0.9-5] |
64 |
|
65 |
* Thu Nov 9 2006 Stephen Noble <support@dungog.net> |
66 |
- http alias corrected |
67 |
- [0.9-4] |
68 |
|
69 |
* Thu Nov 9 2006 Stephen Noble <support@dungog.net> |
70 |
- http PublicAccess setting added |
71 |
- [0.9-3] |
72 |
|
73 |
* Thu May 4 2006 Stephen Noble <support@dungog.net> |
74 |
- httpd fragment modified |
75 |
- rpm doesn't change file permissions |
76 |
- [0.9-2] |
77 |
|
78 |
* Sun Apr 16 2006 Stephen Noble <support@dungog.net> |
79 |
- initial release |
80 |
- [0.9-1] |
81 |
|
82 |
%prep |
83 |
%setup |
84 |
%patch0 -p1 |
85 |
%patch1 -p1 |
86 |
%patch2 -p1 |
87 |
%patch3 -p1 |
88 |
|
89 |
%build |
90 |
perl createlinks |
91 |
#mkdir -p root/etc/e-smith/db/accounts/defaults/wordpress |
92 |
#echo "reserved" > root/etc/e-smith/db/accounts/defaults/wordpress/type |
93 |
# |
94 |
#mkdir -p root/etc/e-smith/db/configuration/defaults/wordpress |
95 |
#echo "Wordpress weblog" > root/etc/e-smith/db/configuration/defaults/wordpress/Name |
96 |
#echo "global" > root/etc/e-smith/db/configuration/defaults/wordpress/PublicAccess |
97 |
#echo "enabled" > root/etc/e-smith/db/configuration/defaults/wordpress/status |
98 |
#echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbName |
99 |
#echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbUser |
100 |
#echo "en" > root/etc/e-smith/db/configuration/defaults/wordpress/WpLang |
101 |
# |
102 |
#mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init |
103 |
#echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80wordpress |
104 |
# |
105 |
##only needed so it is removed afterwards |
106 |
#mkdir -p root/opt/wordpress |
107 |
#touch root/opt/wordpress/wp-config.php |
108 |
|
109 |
%install |
110 |
rm -rf $RPM_BUILD_ROOT |
111 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
112 |
rm -f %{name}-%{version}-filelist |
113 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
114 |
> %{name}-%{version}-filelist |
115 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
116 |
|
117 |
%clean |
118 |
cd .. |
119 |
rm -rf %{name}-%{version} |
120 |
|
121 |
%pre |
122 |
%preun |
123 |
|
124 |
%post |
125 |
#/etc/e-smith/events/actions/initialize-default-databases |
126 |
#/sbin/e-smith/expand-template /etc/e-smith/sql/init/80wordpress |
127 |
#/etc/rc.d/init.d/mysql.init start |
128 |
#/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
129 |
#/sbin/e-smith/expand-template /opt/wordpress/wp-config.php |
130 |
#/usr/bin/sv h /service/httpd-e-smith |
131 |
# |
132 |
#echo "" |
133 |
#echo "see http://wiki.contribs.org/Wordpress" |
134 |
#echo "see config show wordpress" |
135 |
#/sbin/e-smith/config show wordpress |
136 |
#echo " " |
137 |
|
138 |
# this one under I am not sure if it is a good thing ..................... !!!!!! |
139 |
#/bin/chown -R www:www /opt/wordpress/ |
140 |
|
141 |
%postun |
142 |
#uninstall |
143 |
#if [ $1 = 0 ] ; then |
144 |
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
145 |
# /usr/bin/sv h /service/httpd-e-smith |
146 |
#fi |
147 |
|
148 |
%files -f %{name}-%{version}-filelist |
149 |
%defattr(-,root,root) |
150 |
|