1 |
# $Id: smeserver-moodle.spec,v 1.11 2008/10/09 23:40:01 dungog Exp $ |
2 |
# Authority: dungog |
3 |
# Name: Stephen Noble |
4 |
|
5 |
%define name smeserver-moodle |
6 |
%define version 1.0 |
7 |
%define release 11 |
8 |
Summary: smserver rpm to setup moodle, a course management system |
9 |
Name: %{name} |
10 |
Version: %{version} |
11 |
Release: %{release}%{?dist} |
12 |
License: GNU GPL version 2 |
13 |
URL: http://www.dungog.net/sme |
14 |
Group: SMEserver/addon |
15 |
Source: %{name}-%{version}.tar.gz |
16 |
Patch0: smeserver-moodle-1.0-null.patch |
17 |
Patch1: smeserver-moodle-1.0-20db.patch2 |
18 |
Patch2: smeserver-moodle-1.0-clamscan.patch |
19 |
Patch3: smeserver-moodle-1.0-191.patch |
20 |
Patch4: smeserver-moodle-1.0-191fix.patch |
21 |
Patch5: smeserver-moodle-1.0-removeConfig.patch |
22 |
Patch6: smeserver-moodle-1.0-removedomainroot.patch |
23 |
Patch7: smeserver-moodle-1.0-httptmp.patch |
24 |
Patch8: smeserver-moodle-1.0-cronstatus.patch |
25 |
BuildArchitectures: noarch |
26 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
27 |
BuildRoot: /var/tmp/%{name}-%{version} |
28 |
Requires: e-smith-release >= 7.0 |
29 |
Requires: moodle >= 1.8 |
30 |
Requires: gd |
31 |
AutoReqProv: no |
32 |
|
33 |
%description |
34 |
smserver rpm to setup moodle, a course management system |
35 |
|
36 |
%changelog |
37 |
* Fri Oct 10 2008 Stephen Noble <support@dungog.net> 1.0-11 |
38 |
- 'config setprop moodle cron disabled' to stop moodle cron job |
39 |
|
40 |
* Fri Oct 10 2008 Stephen Noble <support@dungog.net> 1.0-10 |
41 |
- /tmp to open_basedir [SME 4610] |
42 |
|
43 |
* Tue Sep 17 2008 Stephen Noble <support@dungog.net> 1.0-9 |
44 |
- remove httpd.conf/80OptDomainMoodle template [SME 4055] |
45 |
|
46 |
* Tue Sep 16 2008 Stephen Noble <support@dungog.net> 1.0-8 |
47 |
- remove config.php template [SME 4556] |
48 |
|
49 |
* Mon Jun 2 2008 Stephen Noble <support@dungog.net> 1.0-7 |
50 |
- fix syntax error |
51 |
|
52 |
* Mon Jun 2 2008 Stephen Noble <support@dungog.net> 1.0-6 |
53 |
- update config.php file to 1.9.1 |
54 |
|
55 |
* Mon Jun 2 2008 Stephen Noble <support@dungog.net> 1.0-5 |
56 |
- allow clamscan [SME 4369] |
57 |
|
58 |
* Sun Sep 2 2007 Stephen Noble <support@dungog.net> 1.0-4 |
59 |
- 20db patch fixed |
60 |
|
61 |
* Sun Sep 2 2007 Stephen Noble <support@dungog.net> 1.0-3 |
62 |
- crontab redirect to null not nul |
63 |
- remove 20db patch |
64 |
|
65 |
* Sun Jul 29 2007 Stephen Noble <support@dungog.net> 1.0-2 |
66 |
- 20db template fixed |
67 |
|
68 |
* Fri Jul 06 2007 Stephen Noble <support@dungog.net> 1.0-1 |
69 |
- http alias, auto setup, template config.php |
70 |
|
71 |
* Mon Dec 11 2006 Stephen Noble <support@dungog.net> |
72 |
- rpm %post events reordered, to enable clean install |
73 |
- [0.9-2] |
74 |
|
75 |
* Fri Dec 1 2006 Stephen Noble <support@dungog.net> |
76 |
- initial release |
77 |
- [0.9-1] |
78 |
|
79 |
%prep |
80 |
%setup |
81 |
%patch0 -p1 |
82 |
%patch1 -p1 |
83 |
%patch2 -p1 |
84 |
%patch3 -p1 |
85 |
%patch4 -p1 |
86 |
%patch5 -p1 |
87 |
%patch6 -p1 |
88 |
%patch7 -p1 |
89 |
%patch8 -p1 |
90 |
|
91 |
%build |
92 |
|
93 |
mkdir -p root/etc/e-smith/db/accounts/defaults/moodle |
94 |
echo "reserved" > root/etc/e-smith/db/accounts/defaults/moodle/type |
95 |
|
96 |
mkdir -p root/etc/e-smith/db/configuration/defaults/moodle |
97 |
echo "Online Learning" > root/etc/e-smith/db/configuration/defaults/moodle/Name |
98 |
echo "global-pw-remote" > root/etc/e-smith/db/configuration/defaults/moodle/PublicAccess |
99 |
echo "enabled" > root/etc/e-smith/db/configuration/defaults/moodle/status |
100 |
echo "moodle" > root/etc/e-smith/db/configuration/defaults/moodle/DbName |
101 |
echo "moodle" > root/etc/e-smith/db/configuration/defaults/moodle/DbUser |
102 |
echo "enabled" > root/etc/e-smith/db/configuration/defaults/moodle/cron |
103 |
|
104 |
mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init |
105 |
echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80moodle |
106 |
|
107 |
%install |
108 |
rm -rf $RPM_BUILD_ROOT |
109 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
110 |
rm -f %{name}-%{version}-filelist |
111 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
112 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
113 |
|
114 |
%clean |
115 |
cd .. |
116 |
rm -rf %{name}-%{version} |
117 |
|
118 |
%pre |
119 |
%preun |
120 |
%post |
121 |
/etc/e-smith/events/actions/initialize-default-databases |
122 |
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80moodle |
123 |
/etc/rc.d/init.d/mysql.init start |
124 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
125 |
/usr/bin/sv h /service/httpd-e-smith |
126 |
/sbin/e-smith/expand-template /etc/crontab |
127 |
|
128 |
echo "" |
129 |
echo "see http://wiki.contribs.org/moodle" |
130 |
|
131 |
%postun |
132 |
#uninstall |
133 |
if [ $1 = 0 ] ; then |
134 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
135 |
/usr/bin/sv h /service/httpd-e-smith |
136 |
/sbin/e-smith/expand-template /etc/crontab |
137 |
fi |
138 |
|
139 |
%files -f %{name}-%{version}-filelist |
140 |
%defattr(-,root,root) |
141 |
|