1 |
slords |
1.1 |
%define name smeserver-wordpress |
2 |
|
|
%define version 1.0 |
3 |
|
|
%define release 1 |
4 |
|
|
Summary: smserver rpm to setup mysql database and web link for wordpress weblog |
5 |
|
|
Name: %{name} |
6 |
|
|
Version: %{version} |
7 |
|
|
Release: %{release}%{?dist} |
8 |
|
|
License: GNU GPL version 2 |
9 |
|
|
URL: http://www.dungog.net/sme |
10 |
|
|
Group: SMEserver/addon |
11 |
|
|
Source: %{name}-%{version}.tar.gz |
12 |
|
|
BuildArchitectures: noarch |
13 |
|
|
BuildRoot: /var/tmp/%{name}-%{version} |
14 |
|
|
BuildRequires: e-smith-devtools >= 1.13.1-03 |
15 |
|
|
Requires: e-smith-release >= 7.0 |
16 |
|
|
Requires: wordpress |
17 |
|
|
AutoReqProv: no |
18 |
|
|
|
19 |
|
|
%description |
20 |
|
|
smserver rpm to setup mysql database and web link for wordpress weblog |
21 |
|
|
|
22 |
|
|
%changelog |
23 |
|
|
* Fri Jul 06 2007 Stephen Noble <support@dungog.net> 1.0-1 |
24 |
|
|
- http alias, auto setup, template wp-config.php |
25 |
|
|
|
26 |
|
|
* Mon Dec 11 2006 Stephen Noble <support@dungog.net> |
27 |
|
|
- rpm %post events reordered, to enable clean install |
28 |
|
|
- [0.9-5] |
29 |
|
|
|
30 |
|
|
* Thu Nov 9 2006 Stephen Noble <support@dungog.net> |
31 |
|
|
- http alias corrected |
32 |
|
|
- [0.9-4] |
33 |
|
|
|
34 |
|
|
* Thu Nov 9 2006 Stephen Noble <support@dungog.net> |
35 |
|
|
- http PublicAccess setting added |
36 |
|
|
- [0.9-3] |
37 |
|
|
|
38 |
|
|
* Thu May 4 2006 Stephen Noble <support@dungog.net> |
39 |
|
|
- httpd fragment modified |
40 |
|
|
- rpm doesn't change file permissions |
41 |
|
|
- [0.9-2] |
42 |
|
|
|
43 |
|
|
* Sun Apr 16 2006 Stephen Noble <support@dungog.net> |
44 |
|
|
- initial release |
45 |
|
|
- [0.9-1] |
46 |
|
|
|
47 |
|
|
%prep |
48 |
|
|
%setup |
49 |
|
|
|
50 |
|
|
%build |
51 |
|
|
mkdir -p root/etc/e-smith/db/accounts/defaults/wordpress |
52 |
|
|
echo "reserved" > root/etc/e-smith/db/accounts/defaults/wordpress/type |
53 |
|
|
|
54 |
|
|
mkdir -p root/etc/e-smith/db/configuration/defaults/wordpress |
55 |
|
|
echo "Wordpress weblog" > root/etc/e-smith/db/configuration/defaults/wordpress/Name |
56 |
|
|
echo "global" > root/etc/e-smith/db/configuration/defaults/wordpress/PublicAccess |
57 |
|
|
echo "enabled" > root/etc/e-smith/db/configuration/defaults/wordpress/status |
58 |
|
|
echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbName |
59 |
|
|
echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbUser |
60 |
|
|
echo "en" > root/etc/e-smith/db/configuration/defaults/wordpress/WpLang |
61 |
|
|
|
62 |
|
|
mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init |
63 |
|
|
echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80wordpress |
64 |
|
|
|
65 |
|
|
#only needed so it is removed afterwards |
66 |
|
|
mkdir -p root/opt/wordpress |
67 |
|
|
touch root/opt/wordpress/wp-config.php |
68 |
|
|
|
69 |
|
|
%install |
70 |
|
|
rm -rf $RPM_BUILD_ROOT |
71 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
72 |
|
|
rm -f %{name}-%{version}-filelist |
73 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
74 |
|
|
> %{name}-%{version}-filelist |
75 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
76 |
|
|
|
77 |
|
|
%clean |
78 |
|
|
cd .. |
79 |
|
|
rm -rf %{name}-%{version} |
80 |
|
|
|
81 |
|
|
%pre |
82 |
|
|
%preun |
83 |
|
|
|
84 |
|
|
%post |
85 |
|
|
/etc/e-smith/events/actions/initialize-default-databases |
86 |
|
|
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80wordpress |
87 |
|
|
/etc/rc.d/init.d/mysql.init start |
88 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
89 |
|
|
/sbin/e-smith/expand-template /opt/wordpress/wp-config.php |
90 |
|
|
/usr/bin/sv h /service/httpd-e-smith |
91 |
|
|
|
92 |
|
|
echo "" |
93 |
|
|
echo "see wiki.contribs.org/wordpress" |
94 |
|
|
|
95 |
|
|
%postun |
96 |
|
|
#uninstall |
97 |
|
|
if [ $1 = 0 ] ; then |
98 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
99 |
|
|
/usr/bin/sv h /service/httpd-e-smith |
100 |
|
|
fi |
101 |
|
|
|
102 |
|
|
%files -f %{name}-%{version}-filelist |
103 |
|
|
%defattr(-,root,root) |
104 |
|
|
|