1 |
dungog |
1.4 |
# $Id: smeserver-moodle.spec,v 1.3 2008/04/02 15:03:58 slords Exp $ |
2 |
slords |
1.3 |
# Authority: dungog |
3 |
|
|
# Name: Stephen Noble |
4 |
|
|
|
5 |
slords |
1.1 |
%define name smeserver-moodle |
6 |
|
|
%define version 1.0 |
7 |
dungog |
1.4 |
%define release 5 |
8 |
slords |
1.1 |
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 |
dungog |
1.4 |
Patch2: smeserver-moodle-1.0-clamscan.patch |
19 |
slords |
1.1 |
BuildArchitectures: noarch |
20 |
|
|
BuildRequires: e-smith-devtools >= 1.13.1-03 |
21 |
|
|
BuildRoot: /var/tmp/%{name}-%{version} |
22 |
|
|
Requires: e-smith-release >= 7.0 |
23 |
dungog |
1.4 |
Requires: moodle >= 1.8 |
24 |
slords |
1.1 |
Requires: gd |
25 |
|
|
AutoReqProv: no |
26 |
|
|
|
27 |
|
|
%description |
28 |
|
|
smserver rpm to setup moodle, a course management system |
29 |
|
|
|
30 |
|
|
%changelog |
31 |
dungog |
1.4 |
* Mon Jun 2 2008 Stephen Noble <support@dungog.net> 1.0-5 |
32 |
|
|
- allow clamscan [SME 4369] |
33 |
|
|
|
34 |
slords |
1.1 |
* Sun Sep 2 2007 Stephen Noble <support@dungog.net> 1.0-4 |
35 |
|
|
- 20db patch fixed |
36 |
|
|
|
37 |
|
|
* Sun Sep 2 2007 Stephen Noble <support@dungog.net> 1.0-3 |
38 |
|
|
- crontab redirect to null not nul |
39 |
|
|
- remove 20db patch |
40 |
|
|
|
41 |
|
|
* Sun Jul 29 2007 Stephen Noble <support@dungog.net> 1.0-2 |
42 |
|
|
- 20db template fixed |
43 |
|
|
|
44 |
|
|
* Fri Jul 06 2007 Stephen Noble <support@dungog.net> 1.0-1 |
45 |
|
|
- http alias, auto setup, template config.php |
46 |
|
|
|
47 |
|
|
* Mon Dec 11 2006 Stephen Noble <support@dungog.net> |
48 |
|
|
- rpm %post events reordered, to enable clean install |
49 |
|
|
- [0.9-2] |
50 |
|
|
|
51 |
|
|
* Fri Dec 1 2006 Stephen Noble <support@dungog.net> |
52 |
|
|
- initial release |
53 |
|
|
- [0.9-1] |
54 |
|
|
|
55 |
|
|
%prep |
56 |
|
|
%setup |
57 |
|
|
%patch0 -p1 |
58 |
|
|
%patch1 -p1 |
59 |
dungog |
1.4 |
%patch2 -p1 |
60 |
slords |
1.1 |
|
61 |
|
|
%build |
62 |
|
|
|
63 |
|
|
mkdir -p root/etc/e-smith/db/accounts/defaults/moodle |
64 |
|
|
echo "reserved" > root/etc/e-smith/db/accounts/defaults/moodle/type |
65 |
|
|
|
66 |
|
|
mkdir -p root/etc/e-smith/db/configuration/defaults/moodle |
67 |
|
|
echo "Online Learning" > root/etc/e-smith/db/configuration/defaults/moodle/Name |
68 |
|
|
echo "global-pw-remote" > root/etc/e-smith/db/configuration/defaults/moodle/PublicAccess |
69 |
|
|
echo "enabled" > root/etc/e-smith/db/configuration/defaults/moodle/status |
70 |
|
|
echo "moodle" > root/etc/e-smith/db/configuration/defaults/moodle/DbName |
71 |
|
|
echo "moodle" > root/etc/e-smith/db/configuration/defaults/moodle/DbUser |
72 |
|
|
|
73 |
|
|
mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init |
74 |
|
|
echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80moodle |
75 |
|
|
|
76 |
|
|
#only needed so it is removed afterwards |
77 |
|
|
mkdir -p root/opt/moodle/html |
78 |
|
|
touch root/opt/moodle/html/config.php |
79 |
|
|
|
80 |
|
|
%install |
81 |
|
|
rm -rf $RPM_BUILD_ROOT |
82 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
83 |
|
|
rm -f %{name}-%{version}-filelist |
84 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
85 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
86 |
|
|
|
87 |
|
|
%clean |
88 |
|
|
cd .. |
89 |
|
|
rm -rf %{name}-%{version} |
90 |
|
|
|
91 |
|
|
%pre |
92 |
|
|
%preun |
93 |
|
|
%post |
94 |
|
|
/etc/e-smith/events/actions/initialize-default-databases |
95 |
|
|
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80moodle |
96 |
|
|
/etc/rc.d/init.d/mysql.init start |
97 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
98 |
|
|
/sbin/e-smith/expand-template /opt/moodle/html/config.php |
99 |
|
|
/usr/bin/sv h /service/httpd-e-smith |
100 |
|
|
/sbin/e-smith/expand-template /etc/crontab |
101 |
|
|
|
102 |
|
|
echo "" |
103 |
|
|
echo "see http://wiki.contribs.org/moodle" |
104 |
|
|
|
105 |
|
|
%postun |
106 |
|
|
#uninstall |
107 |
|
|
if [ $1 = 0 ] ; then |
108 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
109 |
|
|
/usr/bin/sv h /service/httpd-e-smith |
110 |
|
|
/sbin/e-smith/expand-template /etc/crontab |
111 |
|
|
fi |
112 |
|
|
|
113 |
|
|
%files -f %{name}-%{version}-filelist |
114 |
|
|
%defattr(-,root,root) |
115 |
|
|
|