SPECS: moodle.spec - updated to 1.6.3 - added webapp support

baggins baggins at pld-linux.org
Mon Oct 16 14:56:09 CEST 2006


Author: baggins                      Date: Mon Oct 16 12:56:09 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- updated to 1.6.3
- added webapp support

---- Files affected:
SPECS:
   moodle.spec (1.28 -> 1.29) 

---- Diffs:

================================================================
Index: SPECS/moodle.spec
diff -u SPECS/moodle.spec:1.28 SPECS/moodle.spec:1.29
--- SPECS/moodle.spec:1.28	Thu Feb  2 13:38:41 2006
+++ SPECS/moodle.spec	Mon Oct 16 14:56:04 2006
@@ -2,19 +2,16 @@
 # TODO:
 # - mark i18n content as lang()
 # - do sth with i386 binary in %{_datadir}
-# - webapp support
-#
-%bcond_with	apache1		# build for work with apache1 conf system
 #
 Summary:	Learning management system
 Summary(pl):	System zarządzania nauczaniem
 Name:		moodle
-Version:	1.5.3
-Release:	0.9
+Version:	1.6.3
+Release:	0.1
 License:	GPL v2
 Group:		Applications/Databases/Interfaces
-Source0:	http://download.moodle.org/stable15/%{name}-%{version}.tgz
-# Source0-md5:	52dd50298fc1dd8b1b6d8d499608cdd6
+Source0:	http://download.moodle.org/stable16/%{name}-%{version}.tgz
+# Source0-md5:	2f9f3fcf83ab0f18c409f3a48e07eae2
 Source1:	%{name}-http.conf
 Patch0:		%{name}-config.patch
 URL:		http://moodle.org/
@@ -23,18 +20,16 @@
 Requires:	php-mysql
 Requires:	php-pcre
 Requires:	php-session
-%if %{without apache1}
-Requires:	apache >= 2.0
-%endif
-%if %{with apache1}
-Requires:	apache1
-%endif
+Requires:	webapps
+Requires:	webserver
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_moodledir	%{_datadir}/%{name}
-%define		_moodledata	/var/lib/moodle
-%define		_sysconfdir	/etc/%{name}
+%define		_moodledata	/var/lib/%{name}
+%define		_webapps	/etc/webapps
+%define		_webapp		%{name}
+%define		_sysconfdir	%{_webapps}/%{_webapp}
 
 %description
 Moodle is a learning management system for producing Internet-based
@@ -69,18 +64,30 @@
 
 # Move docs into proper place:
 mv -f auth/README README_auth.txt
+mv -f auth/cas/README-CAS README_auth_CAS.txt
 mv -f auth/fc/Readme.txt README_auth_fc.txt
-mv -f auth/ldap/README-LDAP README-LDAP.txt
-mv -f course/format/README.txt README-course_format.txt
-mv -f lang/README README_lang.txt
-mv -f filter/tex/README.mimetex README_mimetex.txt
-mv -f filter/multilang/README.txt README_multilang.txt
-mv -f filter/censor/README.txt README_censor.txt
+mv -f auth/ldap/README-LDAP README_auth_LDAP.txt
+mv -f auth/shibboleth/README.txt README_auth_shibboleth.txt
+mv -f backup/bb/README.txt README_bb.txt
+mv -f blog/README.txt README_blog.txt
+mv -f blog/TODO.txt TODO_blog.txt
+mv -f course/format/README.txt README_course_format.txt
+mv -f filter/censor/README.txt README_filter_censor.txt
+mv -f filter/mediaplugin/flvplayer.README.txt README_fliter_flvplayer.txt
+mv -f filter/multilang/README.txt README_filter_multilang.txt
+mv -f filter/tex/README.mimetex README_filter_tex_mimetex.txt
+mv -f iplookup/README.txt README_iplookup.txt
+mv -f iplookup/ipatlas/README README_iplookup_ipatlas.txt
+mv -f iplookup/ipatlas/MOODLECHANGES MOODLECHANGES_iplookup_ipatlas.txt
+mv -f iplookup/ipatlas/README.MOODLE.txt README_MOODLE_iplookup_ipatlas.txt
+mv -f lang/README.txt README_lang.txt
 mv -f mod/README.txt README_mod.txt
 mv -f mod/chat/README.txt README_mod_chat.txt
 mv -f mod/glossary/README.txt README_mod_glossary.txt
 mv -f mod/glossary/TODO.txt TODO_mod_glossary.txt
 mv -f mod/scorm/README.txt README_mod_scorm.txt
+mv -f question/format/README.txt README_question_format.txt
+mv -f question/format/webct/TODO.txt TODO_question_format_webct.txt
 mv -f theme/UPGRADE.txt UPGRADE_theme.txt
 
 %install
@@ -102,15 +109,8 @@
 	ln -sf %{_sysconfdir}/themes/$i $RPM_BUILD_ROOT%{_moodledir}/theme/$i/data
 done
 
-# Install apache config:
-%if %{without apache1}
-	#apache2
-	install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/httpd.conf/88_%{name}.conf
-%endif
-%if %{with apache1}
-	#apache 1
-	install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
-%endif
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 
 # Final cleanup:
 rm -f $RPM_BUILD_ROOT%{_moodledir}/{*.txt,tags,doc/COPYRIGHT.txt}
@@ -119,44 +119,71 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
-	echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
+%triggerpostun -- moodle < 1.6.3
+if [ -f /home/services/httpd/html/squirrel/config/config.php.rpmsave ]; then
+	echo "Moving old config file to %{_sysconfdir}/config.php"
+	mv -f %{_sysconfdir}/config.php{,.rpmnew}
+	mv -f /home/services/httpd/html/squirrel/config/config.php.rpmsave %{_sysconfdir}/config.php
+fi
+
+if [ -f /etc/squirrelmail/config.php.rpmsave ]; then
+	echo "Moving old config file to %{_sysconfdir}/config.php"
+	mv -f %{_sysconfdir}/config.php{,.rpmnew}
+	mv -f /etc/squirrelmail/config.php.rpmsave %{_sysconfdir}/config.php
+fi
+
+# nuke very-old config location (this mostly for Ra)
+if [ -f /etc/httpd/httpd.conf ]; then
+	sed -i -e "/^Include.*squirrelmail.conf/d" /etc/httpd/httpd.conf
+	httpd_reload=1
 fi
-if [ -f /var/lock/subsys/httpd ]; then
-	/usr/sbin/apachectl restart 1>&2
+
+# migrate from httpd (apache2) config dir
+if [ -f /etc/httpd/squirrelmail.conf.rpmsave ]; then
+	cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
+	mv -f /etc/httpd/squirrelmail.conf.rpmsave %{_sysconfdir}/httpd.conf
+	httpd_reload=1
+fi
+
+if [ -d /etc/httpd/webapps.d ]; then
+	/usr/sbin/webapp register httpd %{_webapp}
+	httpd_reload=1
+fi
+
+# place new config location, as trigger puts config only on first install, do it here
+if [ -L /etc/httpd/httpd.conf/99_squirrelmail.conf ]; then
+	rm -f /etc/httpd/httpd.conf/99_squirrelmail.conf
+	/usr/sbin/webapp register httpd %{_webapp}
+	httpd_reload=1
 fi
 
-%preun
-if [ "$1" = "0" ]; then
-	umask 027
-	if [ -d /etc/httpd/httpd.conf ]; then
-		rm -f /etc/httpd/httpd.conf/99_%{name}.conf
-	else
-		grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
-			/etc/httpd/httpd.conf.tmp
-		mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
-		if [ -f /var/lock/subsys/httpd ]; then
-			/usr/sbin/apachectl restart 1>&2
-		fi
-	fi
+if [ "$httpd_reload" ]; then
+	%service -q httpd reload
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc *.txt
-%dir %{_sysconfdir}
+
+%dir %attr(750,root,http) %{_sysconfdir}
+%dir %attr(750,root,http) %{_sysconfdir}/themes
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
-%dir %{_sysconfdir}/themes
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/themes/*
-%if %{without apache1}
-#apache2
-%config(noreplace) /etc/httpd/httpd.conf/88_%{name}.conf
-%endif
-%if %{with apache1}
-#apache1
-%config(noreplace) /etc/httpd/%{name}.conf
-%endif
+
 %dir %{_moodledir}
 %{_moodledir}/*.php
 %dir %{_moodledir}/auth
@@ -175,19 +202,30 @@
 %{_moodledir}/auth/*.html
 %{_moodledir}/auth/*/*.php
 %{_moodledir}/auth/*/*.html
-%{_moodledir}/auth/shibboleth/.htaccess
 %dir %{_moodledir}/admin
 %{_moodledir}/admin/*.html
 %{_moodledir}/admin/*.php
+%{_moodledir}/admin/*.xml
+%dir %{_moodledir}/admin/report
+%dir %{_moodledir}/admin/report/*
+%{_moodledir}/admin/report/*/*.php
 %dir %{_moodledir}/backup
 %{_moodledir}/backup/*.html
 %{_moodledir}/backup/*.php
 %{_moodledir}/backup/*.txt
+%dir %{_moodledir}/backup/bb
+%{_moodledir}/backup/bb/*.inc
+%{_moodledir}/backup/bb/*.php
+%{_moodledir}/backup/bb/*.xsl
 %dir %{_moodledir}/backup/db
 %{_moodledir}/backup/db/*.php
 %{_moodledir}/backup/db/*.sql
+%{_moodledir}/backup/db/*.xml
 %dir %{_moodledir}/blocks
 %{_moodledir}/blocks/*
+%dir %{_moodledir}/blog
+%{_moodledir}/blog/*.html
+%{_moodledir}/blog/*.php
 %dir %{_moodledir}/calendar
 %{_moodledir}/calendar/*.html
 %{_moodledir}/calendar/*.php
@@ -197,6 +235,12 @@
 %dir %{_moodledir}/course/format
 %dir %{_moodledir}/course/format/*
 %{_moodledir}/course/format/*/*.php
+%dir %{_moodledir}/course/import
+%dir %{_moodledir}/course/import/*
+%{_moodledir}/course/import/*/*.php
+%dir %{_moodledir}/course/report
+%dir %{_moodledir}/course/report/*
+%{_moodledir}/course/report/*/*.php
 %dir %{_moodledir}/doc
 %{_moodledir}/doc/*.css
 %{_moodledir}/doc/*.html
@@ -212,6 +256,7 @@
 %{_moodledir}/files/*.php
 %dir %{_moodledir}/filter
 %dir %{_moodledir}/filter/*
+%{_moodledir}/filter/*/*.html
 %{_moodledir}/filter/*/*.php
 %{_moodledir}/filter/*/*.pl
 %{_moodledir}/filter/*/*.pm
@@ -219,8 +264,22 @@
 %{_moodledir}/filter/tex/mimetex.linux
 # Is it needed? Maybe doc?
 %{_moodledir}/filter/mediaplugin/mp3player.fla.zip
+%{_moodledir}/filter/mediaplugin/flvplayer.fla.zip
 %dir %{_moodledir}/grade
 %{_moodledir}/grade/*
+%dir %{_moodledir}/iplookup
+%dir %{_moodledir}/iplookup/hostip
+%dir %{_moodledir}/iplookup/ipatlas
+%dir %{_moodledir}/iplookup/ipatlas/languages
+%{_moodledir}/iplookup/*.php
+%{_moodledir}/iplookup/hostip/*.php
+%{_moodledir}/iplookup/ipatlas/*.inc
+%{_moodledir}/iplookup/ipatlas/*.txt
+%{_moodledir}/iplookup/ipatlas/*.jpg
+%{_moodledir}/iplookup/ipatlas/*.gif
+%{_moodledir}/iplookup/ipatlas/*.php
+%{_moodledir}/iplookup/ipatlas/*.css
+%{_moodledir}/iplookup/ipatlas/languages/*.inc
 %dir %{_moodledir}/lang
 %dir %{_moodledir}/lang/*
 %{_moodledir}/lang/*/*
@@ -234,9 +293,13 @@
 %dir %{_moodledir}/mod
 %dir %{_moodledir}/mod/*
 %{_moodledir}/mod/*/*
+%dir %{_moodledir}/my
+%{_moodledir}/my/*.php
 %dir %{_moodledir}/pix
 %{_moodledir}/pix/*.gif
 %{_moodledir}/pix/*.png
+%{_moodledir}/pix/*.php
+%dir %{_moodledir}/pix/a
 %dir %{_moodledir}/pix/c
 %dir %{_moodledir}/pix/f
 %dir %{_moodledir}/pix/g
@@ -245,8 +308,40 @@
 %dir %{_moodledir}/pix/s
 %dir %{_moodledir}/pix/t
 %dir %{_moodledir}/pix/u
-%{_moodledir}/pix/*/*.gif
-%{_moodledir}/pix/*/*.png
+%{_moodledir}/pix/*/*
+%dir %{_moodledir}/question
+%{_moodledir}/question/*.php
+%{_moodledir}/question/*.html
+%dir %{_moodledir}/question/format
+%dir %{_moodledir}/question/format/*
+%dir %{_moodledir}/question/format/qti2/templates
+%dir %{_moodledir}/question/type
+%dir %{_moodledir}/question/type/calculated
+%dir %{_moodledir}/question/type/datasetdependent
+%dir %{_moodledir}/question/type/description
+%dir %{_moodledir}/question/type/essay
+%dir %{_moodledir}/question/type/match
+%dir %{_moodledir}/question/type/missingtype
+%dir %{_moodledir}/question/type/multianswer
+%dir %{_moodledir}/question/type/multichoice
+%dir %{_moodledir}/question/type/numerical
+%dir %{_moodledir}/question/type/random
+%dir %{_moodledir}/question/type/randomsamatch
+%dir %{_moodledir}/question/type/rqp
+%dir %{_moodledir}/question/type/shortanswer
+%dir %{_moodledir}/question/type/truefalse
+%dir %{_moodledir}/question/type/*/db
+%{_moodledir}/question/type/*.php
+%{_moodledir}/question/type/*.html
+%{_moodledir}/question/type/*/*.php
+%{_moodledir}/question/type/*/*.html
+%{_moodledir}/question/type/*/*.gif
+%{_moodledir}/question/type/*/db/*
+%{_moodledir}/question/format/*/*.xml
+%{_moodledir}/question/format/*/*.txt
+%{_moodledir}/question/format/*/*.php
+%{_moodledir}/question/format/*/*.css
+%{_moodledir}/question/format/qti2/templates/*.tpl
 %dir %{_moodledir}/rss
 %{_moodledir}/rss/*
 %dir %{_moodledir}/sso
@@ -270,6 +365,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.29  2006/10/16 12:56:04  baggins
+- updated to 1.6.3
+- added webapp support
+
 Revision 1.28  2006/02/02 12:38:41  baggins
 - rel 0.9
 - TODO: webapp support
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/moodle.spec?r1=1.28&r2=1.29&f=u



More information about the pld-cvs-commit mailing list