/[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.3 - (hide annotations) (download)
Wed Apr 2 15:03:58 2008 UTC (16 years, 7 months ago) by slords
Branch: MAIN
Changes since 1.2: +4 -0 lines
Add Id, Authority, Name

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

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