/[smecontribs]/rpms/smeserver-moodle/contribs7/smeserver-moodle.spec
ViewVC logotype

Annotation of /rpms/smeserver-moodle/contribs7/smeserver-moodle.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sun Dec 23 21:41:07 2007 UTC (16 years, 11 months ago) by slords
Branch: MAIN
Import on branch contribs7 of package smeserver-moodle-1.0-4.el4.sme.src.rpm

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

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed