1 |
unnilennium |
1.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 5 |
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 |
|
|
BuildArchitectures: noarch |
19 |
|
|
BuildRoot: /var/tmp/%{name}-%{version} |
20 |
|
|
BuildRequires: e-smith-devtools >= 1.13.1-03 |
21 |
|
|
Requires: e-smith-release >= 8.0 |
22 |
|
|
Requires: wordpress |
23 |
|
|
AutoReqProv: no |
24 |
|
|
|
25 |
|
|
%description |
26 |
|
|
smserver rpm to setup mysql database and web link for wordpress weblog |
27 |
|
|
|
28 |
|
|
%changelog |
29 |
|
|
* Wed Sep 04 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> 1.0.5 |
30 |
|
|
- add www:www permission on /opt/wordpress folder to allow automatic update by FTP |
31 |
|
|
|
32 |
|
|
* Wed Jun 05 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> 1.0.4 |
33 |
|
|
- add a tmp folder in httpd.conf |
34 |
|
|
* Mon Jun 03 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> 1.0-3 |
35 |
|
|
- backup html-folder, mysql-base, and config-file during erase and upgrade process |
36 |
|
|
|
37 |
|
|
* Thu May 29 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> |
38 |
|
|
- require sme8 due to wordpress 3.5 needs php version > 5.2 |
39 |
|
|
|
40 |
|
|
* Sat Nov 29 2008 Stephen Noble <support@dungog.net> 1.0-2 |
41 |
|
|
- http alias 80opt removed |
42 |
|
|
|
43 |
|
|
* Fri Jul 06 2007 Stephen Noble <support@dungog.net> 1.0-1 |
44 |
|
|
- http alias, auto setup, template wp-config.php |
45 |
|
|
|
46 |
|
|
* Mon Dec 11 2006 Stephen Noble <support@dungog.net> |
47 |
|
|
- rpm %post events reordered, to enable clean install |
48 |
|
|
- [0.9-5] |
49 |
|
|
|
50 |
|
|
* Thu Nov 9 2006 Stephen Noble <support@dungog.net> |
51 |
|
|
- http alias corrected |
52 |
|
|
- [0.9-4] |
53 |
|
|
|
54 |
|
|
* Thu Nov 9 2006 Stephen Noble <support@dungog.net> |
55 |
|
|
- http PublicAccess setting added |
56 |
|
|
- [0.9-3] |
57 |
|
|
|
58 |
|
|
* Thu May 4 2006 Stephen Noble <support@dungog.net> |
59 |
|
|
- httpd fragment modified |
60 |
|
|
- rpm doesn't change file permissions |
61 |
|
|
- [0.9-2] |
62 |
|
|
|
63 |
|
|
* Sun Apr 16 2006 Stephen Noble <support@dungog.net> |
64 |
|
|
- initial release |
65 |
|
|
- [0.9-1] |
66 |
|
|
|
67 |
|
|
%prep |
68 |
|
|
%setup |
69 |
|
|
%patch0 -p1 |
70 |
|
|
%patch1 -p1 |
71 |
|
|
%build |
72 |
|
|
mkdir -p root/etc/e-smith/db/accounts/defaults/wordpress |
73 |
|
|
echo "reserved" > root/etc/e-smith/db/accounts/defaults/wordpress/type |
74 |
|
|
|
75 |
|
|
mkdir -p root/etc/e-smith/db/configuration/defaults/wordpress |
76 |
|
|
echo "Wordpress weblog" > root/etc/e-smith/db/configuration/defaults/wordpress/Name |
77 |
|
|
echo "global" > root/etc/e-smith/db/configuration/defaults/wordpress/PublicAccess |
78 |
|
|
echo "enabled" > root/etc/e-smith/db/configuration/defaults/wordpress/status |
79 |
|
|
echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbName |
80 |
|
|
echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbUser |
81 |
|
|
echo "en" > root/etc/e-smith/db/configuration/defaults/wordpress/WpLang |
82 |
|
|
|
83 |
|
|
mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init |
84 |
|
|
echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80wordpress |
85 |
|
|
|
86 |
|
|
#only needed so it is removed afterwards |
87 |
|
|
mkdir -p root/opt/wordpress |
88 |
|
|
touch root/opt/wordpress/wp-config.php |
89 |
|
|
|
90 |
|
|
%install |
91 |
|
|
rm -rf $RPM_BUILD_ROOT |
92 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
93 |
|
|
rm -f %{name}-%{version}-filelist |
94 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
95 |
|
|
> %{name}-%{version}-filelist |
96 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
97 |
|
|
|
98 |
|
|
%clean |
99 |
|
|
cd .. |
100 |
|
|
rm -rf %{name}-%{version} |
101 |
|
|
|
102 |
|
|
%pre |
103 |
|
|
%preun |
104 |
|
|
|
105 |
|
|
%post |
106 |
|
|
/etc/e-smith/events/actions/initialize-default-databases |
107 |
|
|
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80wordpress |
108 |
|
|
/etc/rc.d/init.d/mysql.init start |
109 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
110 |
|
|
/sbin/e-smith/expand-template /opt/wordpress/wp-config.php |
111 |
|
|
/usr/bin/sv h /service/httpd-e-smith |
112 |
|
|
|
113 |
|
|
echo "" |
114 |
|
|
echo "see http://wiki.contribs.org/Wordpress" |
115 |
|
|
echo "see config show wordpress" |
116 |
|
|
/sbin/e-smith/config show wordpress |
117 |
|
|
echo " " |
118 |
|
|
/bin/chown -R www:www /opt/wordpress/ |
119 |
|
|
|
120 |
|
|
%postun |
121 |
|
|
#uninstall |
122 |
|
|
if [ $1 = 0 ] ; then |
123 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
124 |
|
|
/usr/bin/sv h /service/httpd-e-smith |
125 |
|
|
fi |
126 |
|
|
|
127 |
|
|
%files -f %{name}-%{version}-filelist |
128 |
|
|
%defattr(-,root,root) |
129 |
|
|
|