Commit 9f4338a3 authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Debian packaging

parent c78606cd
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__
DocumentRoot /var/www/mahara
CustomLog /var/log/apache2/mahara.access.log full
ErrorLog /var/log/apache2/mahara.error.log
<Directory /var/www/mahara>
AllowOverride All
</Directory>
<Location /lib>
Deny from all
</Location>
</VirtualHost>
mahara (0.2-1) unstable; urgency=low
* Initial Debian packaging
-- Martyn Smith <martyn@catalyst.net.nz> Tue, 9 Jan 2007 10:47:50 +1300
function restart_apache {
if (apachectl configtest >/dev/null 2>&1); then
echo "Gracefully restarting apache"
apachectl graceful
else
echo "apache configuration error ... not restarting"
echo ""
apachectl configtest
echo ""
fi
}
function restart_apache2 {
if (apache2ctl configtest >/dev/null 2>&1); then
echo "Gracefully restarting apache2"
apache2ctl graceful
else
echo "apache2 configuration error ... not restarting"
echo ""
apache2ctl configtest
echo ""
fi
}
function set_config {
perl -i -e '$field=shift;$value=shift if (scalar(@ARGV)>1);$value||="";while (<>) { s/(\$cfg->$field.*=\s*).*/$1'\''$value'\'';/; print; }' $1 $2 /var/www/mahara/config.php
}
#!/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/db_host || true
db_go
db_input $PRIORITY mahara/db_port || true
db_go
db_input $PRIORITY mahara/db_name || true
db_go
db_input $PRIORITY mahara/db_user || true
db_go
db_input $PRIORITY mahara/servername || true
db_go
Source: mahara
Section: web
Priority: optional
Maintainer: Martyn Smith <martyn@catalyst.net.nz>
Build-Depends: debhelper (>= 5)
Standards-Version: 3.7.2
Package: mahara-apache
Architecture: any
Depends: ${misc:Depends}, apache, libapache-mod-php5, php5-json, php5-pgsql, php5-cli, php5-gd, file
Conflicts: mahara-apache2
Recommends: postgresql-8.1
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.
.
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.
.
For further information please see http://mahara.org
Package: mahara-apache2
Architecture: any
Depends: ${misc:Depends}, apache2, libapache2-mod-php5, php5-json, php5-pgsql, php5-cli, php5-gd, file
Conflicts: mahara-apache
Recommends: postgresql-8.1
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.
.
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.
.
For further information please see http://mahara.org
This package was debianized by Martyn Smith <martyn@catalyst.net.nz> on
Tue, 9 Jan 2007 10:47:50 +1300.
It was downloaded from http://mahara.eduforge.org
Upstream Authors:
Martyn Smith <martyn@catalyst.net.nz>
Penny Leach <penny@catalyst.net.nz>
Nigel McNie <nigel@catalyst.net.nz>
Richard Mansfield <richard.mansfield@catalyst.net.nz>
Alastair Pharo <alastair@catalyst.net.nz>
Copyright: (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
License:
Mahara is (C) 2006,2007, Catalyst IT Ltd and is licensed under the GPL, see
`/usr/share/common-licenses/GPL'.
The Debian packaging is (C) 2007, Martyn Smith <martyn@catalyst.net.nz> and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
#
# Mahara implements its own cron to cater for people who need to run it in
# situations where normal unixy cron isn't available.
#
* * * * * www-data /usr/bin/php5 /var/www/mahara/lib/cron.php
var/www/mahara
usr/share/mahara
var/lib/mahara
var/lib/mahara/smarty/compile
htdocs/* var/www/mahara
htdocs/.htaccess var/www/mahara
debian/apache.conf.template usr/share/mahara/
config
\ No newline at end of file
dirs
\ No newline at end of file
install
\ No newline at end of file
#!/bin/sh
# postinst script for mahara-apache
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#DEBHELPER#
. /usr/share/debconf/confmodule
TMP_M4_FILE=/tmp/mahara.postinst.m4.tmp
case "$1" in
configure)
cp /var/www/mahara/config-dist.php /var/www/mahara/config.php
# Configure Mahara
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}"
# Set Dataroot
chown -R www-data:www-data /var/lib/mahara
set_config dataroot /var/lib/mahara
# Configure apache
echo "changecom" > $TMP_M4_FILE
db_get mahara/servername
echo "define(__SERVERNAME__,${RET})dnl" >> $TMP_M4_FILE
m4 $TMP_M4_FILE /usr/share/mahara/apache.conf.template > /etc/apache/conf.d/100-mahara
rm -f $TMP_M4_FILE
restart_apache;
db_get mahara/servername
echo ""
echo "You can now visit http://${RET} to complete the installation of Mahara"
echo ""
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
db_stop
exit 0
#!/bin/sh
# postrm script for mahara
#
# see: dh_installdeb(1)
set -e
#DEBHELPER#
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
purge)
restart_apache;
echo "NOTE: purge does _not_ remove /var/lib/mahara, you must do this yourself if you really want to!"
;;
remove)
restart_apache;
;;
failed-upgrade|abort-install|abort-upgrade|disappear|upgrade)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0
#!/bin/sh
# prerm script for mahara
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|deconfigure)
[ -e /etc/apache/conf.d/100-mahara ] && rm -f /etc/apache/conf.d/100-mahara
[ -e /var/www/mahara/config.php ] && rm -f /var/www/mahara/config.php
;;
upgrade)
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
templates
\ No newline at end of file
config
\ No newline at end of file
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