Commit 288f3b13 authored by Nigel McNie's avatar Nigel McNie
Browse files

Merge branch 'master' of git+ssh://git.catalyst.net.nz/git/public/mahara

Conflicts:

	htdocs/lib/version.php
parents 0f1c8d9d 10bce91c
mahara for Debian
-----------------
<possible notes regarding this package - if none, delete this file>
-- Martyn Smith <martyn@catalyst.net.nz> Tue, 9 Jan 2007 10:47:50 +1300
<VirtualHost *>
ServerName __SERVERNAME__
Include /etc/mahara/servername.conf
DocumentRoot /var/www/mahara
DocumentRoot /usr/share/mahara
CustomLog __APACHELOGDIR__/mahara.access.log combined
ErrorLog __APACHELOGDIR__/mahara.error.log
php_value upload_max_filesize 5M
<Directory /var/www/mahara>
<Directory /usr/share/mahara>
Options -Indexes
AllowOverride All
</Directory>
......@@ -32,3 +32,4 @@
</Location>
</VirtualHost>
Include /etc/mahara/serverredirects.conf
mahara (0.9.0~alpha3~dev) unstable; urgency=low
* Dev version
-- Nigel McNie <nigel@catalyst.net.nz> Fri, 16 Nov 2007 11:14:45 +1300
mahara (0.9.0~alpha2-1) unstable; urgency=low
* New upstream release
* Recommend php5-xmlrpc
* Change the way config.php is handled to allow debconf to ask questions,
and users to have their own settings if they want.
* Remove default username, password and dbname from the config file, to
prevent tempting users to use easily guessable details. This change
applied upstream.
* Added debconf questions for dbtype and dbpass
-- Nigel McNie <nigel@catalyst.net.nz> Fri, 16 Nov 2007 10:19:32 +1300
mahara (0.9.0~alpha2~dev) unstable; urgency=low
* Dev version
......
function restart_apache {
restart_apache() {
if (apachectl configtest >/dev/null 2>&1); then
echo "Gracefully restarting apache"
apachectl graceful
......@@ -10,7 +10,7 @@ function restart_apache {
fi
}
function restart_apache2 {
restart_apache2() {
if (apache2ctl configtest >/dev/null 2>&1); then
echo "Gracefully restarting apache2"
apache2ctl graceful
......@@ -21,7 +21,3 @@ function restart_apache2 {
echo ""
fi
}
function set_config {
perl -i -e '$field=shift;$value=shift if (scalar(@ARGV)>1);$value||="";while (<>) { s/(?:\s*\/\/\s*)?(\$cfg->$field.*=\s*).*/$1'\''$value'\'';/; print; }' $1 $2 /etc/mahara/config.debconf.php
}
<?php
// WARNING: DO NOT EDIT THIS FILE!
//
// It is automatically generated by debconf and will be overwritten
// everytime the mahara Debian package is upgraded.
//
// Your local customizations should go into /etc/mahara/config.php
$cfg->dbtype = 'postgres8';
$cfg->dbhost = 'localhost';
$cfg->dbport = '';
$cfg->dbname = 'mahara';
$cfg->dbuser = 'mahara';
$cfg->dbpass = '';
$cfg->wwwroot = 'http://localhost/mahara/';
$cfg->smtphosts = '';
$cfg->dataroot = '/var/lib/mahara';
?>
......@@ -118,4 +118,10 @@ $cfg->developermode = false;
// using an IP address that is not the same as the IP address that is registered
// for its host name, then you should change the value below to 'true'.
$cfg->xmlrpc_allow_masquerading = false;
// maximum allowed size of uploaded images
// // NOTE: the scalable resize might result in images with one dimesion larger than one of these sizes, but not both
$cfg->imagemaxwidth = 1024;
$cfg->imagemaxheight = 1024;
?>
Source: mahara
Section: web
Priority: optional
Maintainer: Martyn Smith <martyn@catalyst.net.nz>
Build-Depends: debhelper (>= 5)
Maintainer: Francois Marier <francois@debian.org>
Build-Depends: debhelper (>= 5), po-debconf
Standards-Version: 3.7.2
Homepage: http://www.mahara.org
Vcs-Git: http://git.catalyst.net.nz/mahara.git
Vcs-Browser: http://git.catalyst.net.nz/gw?p=mahara.git
Package: mahara
Architecture: all
Depends: ${misc:Depends}, php5-pgsql, php5-cli, php5-gd, file, cron, perl
Recommends: mahara-apache2 | mahara-apache, postgresql-8.1, clamav, clamav-daemon, php5-curl, php5-openssl, php5-xmlrpc, php5-imagick, libfile-slurp-perl, libtext-diff-perl
Description: Electronic portfolio, weblog, and resume builder
Mahara is a fully featured electronic portfolio, weblog, resume builder and
social networking system, connecting users and creating online communities.
.
Mahara is designed to provide users with the tools to create a personal and
professional learning and development environment.
.
This is the core Mahara package, it does not include any of the web server
configuration.
Package: mahara-apache
Architecture: all
Depends: ${misc:Depends}, apache, libapache-mod-php5, php5-json | libapache-mod-php5 (>= 5.2), php5-pgsql, php5-cli, php5-gd, file, cron
Depends: ${misc:Depends}, mahara, apache, libapache-mod-php5
Conflicts: mahara-apache2
Recommends: postgresql-8.1, clamav, clamav-daemon, php5-xmlrpc
Suggests: php5-imagick, libfile-slurp-perl, libtext-diff-perl
Pre-Depends: m4, perl, postgresql-client-8.1
Description: Mahara is an electronic portfolio, weblog, and resume builder
Established in 2006, Mahara is the result of a collaborative venture funded by
New Zealand's Tertiary Education Commission's e-learning Collaborative
Development Fund (eCDF), involving Massey University, Auckland University of
Technology, The Open Polytechnic of New Zealand and Victoria University of
Wellington.
.
Once released (Feb 2007) Mahara will be a fully featured electronic portfolio,
weblog, resume builder and social networking system, connecting users and
creating online communities.
Description: Electronic portfolio, weblog, and resume builder
Mahara is a fully featured electronic portfolio, weblog, resume builder and
social networking system, connecting users and creating online communities.
.
Mahara is designed to provide users with the tools to create a personal and
professional learning and development environment.
.
Meaning `think' or `thought' in Te Reo Maori, the name reflects the project
collaborator's dedication to creating a user-centred life long learning and
development application as well as the belief that technology solutions cannot
be developed outside the considerations of pedagogy and policy.
.
Mahara is provided freely as Open Source software (under the GNU General Public
License). In brief, this means that you are allowed to copy, use and modify
Mahara provided you agree to; provide the source code to others; not modify or
remove the original license and copyrights, and apply this same license to any
derivative work.
This package configures Mahara for the Apache 1.x web server.
Package: mahara-apache2
Architecture: all
Depends: ${misc:Depends}, apache2, libapache2-mod-php5, php5-json | libapache2-mod-php5 (>= 5.2), php5-pgsql, php5-cli, php5-gd, file, cron
Depends: ${misc:Depends}, mahara, apache2, libapache2-mod-php5
Conflicts: mahara-apache
Recommends: postgresql-8.1, clamav, clamav-daemon, php5-xmlrpc
Suggests: php5-imagick, libfile-slurp-perl, libtext-diff-perl
Pre-Depends: m4, perl, postgresql-client-8.1
Description: Mahara is an electronic portfolio, weblog, and resume builder
Established in 2006, Mahara is the result of a collaborative venture funded by
New Zealand's Tertiary Education Commission's e-learning Collaborative
Development Fund (eCDF), involving Massey University, Auckland University of
Technology, The Open Polytechnic of New Zealand and Victoria University of
Wellington.
.
Once released (Feb 2007) Mahara will be a fully featured electronic portfolio,
weblog, resume builder and social networking system, connecting users and
creating online communities.
Description: Electronic portfolio, weblog, and resume builder
Mahara is a fully featured electronic portfolio, weblog, resume builder and
social networking system, connecting users and creating online communities.
.
Mahara is designed to provide users with the tools to create a personal and
professional learning and development environment.
.
Meaning `think' or `thought' in Te Reo Maori, the name reflects the project
collaborator's dedication to creating a user-centred life long learning and
development application as well as the belief that technology solutions cannot
be developed outside the considerations of pedagogy and policy.
.
Mahara is provided freely as Open Source software (under the GNU General Public
License). In brief, this means that you are allowed to copy, use and modify
Mahara provided you agree to; provide the source code to others; not modify or
remove the original license and copyrights, and apply this same license to any
derivative work.
This package configures Mahara for the Apache 2.x web server.
htdocs/* var/www/mahara
htdocs/.htaccess var/www/mahara
debian/apache.conf.template usr/share/mahara/
debian/config.debconf.php etc/mahara/
var/www/mahara/js/MochiKit/Packed.js var/www/mahara/js/MochiKit/setup.js
etc/mahara/config.debconf.php var/www/mahara/config.debconf.php
etc/mahara/config.php var/www/mahara/config.php
config
\ No newline at end of file
#!/bin/sh -e
# Source debconf library.
. /usr/share/debconf/confmodule
# Decide how important it is for the user to see this message
PRIORITY=high
db_input $PRIORITY mahara/serverredirects || true
db_go
cron.d
\ No newline at end of file
dirs
\ No newline at end of file
etc/mahara
usr/share/mahara
docs
\ No newline at end of file
install
\ No newline at end of file
links
\ No newline at end of file
etc/mahara/apache.conf etc/apache/conf.d/mahara
logrotate
\ No newline at end of file
#!/bin/bash
#!/bin/sh
# postinst script for mahara-apache
#
# see: dh_installdeb(1)
......@@ -21,58 +21,30 @@ set -e
. /usr/share/debconf/confmodule
TMP_M4_FILE=/tmp/mahara.postinst.m4.tmp
APACHE_CONF_FILE=/etc/apache/conf.d/100-mahara
SERVERREDIRECTS_CONF_FILE=/etc/mahara/serverredirects.conf
SERVERNAME_CONF_FILE=/etc/mahara/servername.conf
case "$1" in
configure)
# Configure Mahara
db_get mahara/db_type
set_config dbtype "${RET}"
db_get mahara/db_host
set_config dbhost "${RET}"
db_get mahara/db_port
set_config dbport "${RET}"
db_get mahara/db_name
set_config dbname "${RET}"
db_get mahara/db_user
set_config dbuser "${RET}"
db_get mahara/db_pass
set_config dbpass "${RET}"
db_get mahara/servername
set_config wwwroot "http://${RET}/"
db_get mahara/smtphosts
if [ -n "${RET}" ]; then
set_config smtphosts "${RET}"
fi
# Set Dataroot
chown -R www-data:www-data /var/lib/mahara
set_config dataroot /var/lib/mahara
# Touch cron log
touch /var/log/mahara-cron.log
chown www-data:www-data /var/log/mahara-cron.log
# Configure apache
echo "changecom" > $TMP_M4_FILE
echo "# DO NOT EDIT THIS FILE! It is managed by debconf!" > $SERVERNAME_CONF_FILE
echo "# It will be overwritten the next time this package is configured." >> $SERVERNAME_CONF_FILE
echo "# Use 'dpkg-reconfigure mahara-apache' instead." >> $SERVERNAME_CONF_FILE
db_get mahara/servername
echo "define(__SERVERNAME__,${RET})dnl" >> $TMP_M4_FILE
echo "define(__APACHELOGDIR__,/var/log/apache)dnl" >> $TMP_M4_FILE
m4 $TMP_M4_FILE /usr/share/mahara/apache.conf.template > $APACHE_CONF_FILE
rm -f $TMP_M4_FILE
echo "ServerName ${RET}" >> $SERVERNAME_CONF_FILE
echo '# DO NOT EDIT THIS FILE. It is managed by debconf!' > $SERVERREDIRECTS_CONF_FILE
echo "# It will be overwritten the next time this package is configured." >> $SERVERREDIRECTS_CONF_FILE
echo "# Use 'dpkg-reconfigure mahara-apache' instead." >> $SERVERREDIRECTS_CONF_FILE
db_get mahara/serverredirects
if [ -n "${RET}" ]; then
echo '<VirtualHost *>' >> $APACHE_CONF_FILE
echo ${RET} | perl -ne '@s = split /\s*,\s*/; print " ServerName ", shift @s, "\n" if @s; print map { " ServerAlias $_\n" } @s;' >> $APACHE_CONF_FILE
echo '<VirtualHost *>' > $SERVERREDIRECTS_CONF_FILE
echo ${RET} | perl -ne '@s = split /\s*,\s*/; print " ServerName ", shift @s, "\n" if @s; print map { " ServerAlias $_\n" } @s;' >> $SERVERREDIRECTS_CONF_FILE
db_get mahara/servername
echo " Redirect Permanent / http://${RET}/" >> $APACHE_CONF_FILE
echo '</VirtualHost>' >> $APACHE_CONF_FILE
echo " Redirect Permanent / http://${RET}/" >> $SERVERREDIRECTS_CONF_FILE
echo '</VirtualHost>' >> $SERVERREDIRECTS_CONF_FILE
fi
restart_apache;
db_get mahara/servername
echo ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment