Commit b108faa2 authored by Richard Hector's avatar Richard Hector

Initial debianisation

parent 4f788695
mahara-scripts
--------------
The custom-site-mahara-langpacks package tries to detect what NameBasedVirtualHost settings you have, and configure the VirtualHost automatically. It may well get that wrong.
-- Richard Hector <richard@catalyst.net.nz> Sat, 20 Nov 2010 19:26:29 +1300
mahara-scripts (0.2) UNRELEASED; urgency=low
* Initial release.
-- Richard Hector <richard@catalyst.net.nz> Sat, 20 Nov 2010 18:38:57 +1300
Source: mahara-scripts
Section: web
Priority: extra
Maintainer: Richard Hector <richard@catalyst.net.nz>
Build-Depends: debhelper (>=7)
Standards-Version: 3.9.1
Package: custom-site-mahara-langpacks
Architecture: all
Depends: php5-cli, perl, bash, debconf, git-core
Description: Mahara langpack repository scripts
Scripts to download mahara langpacks from gitorious, clean them up, and
make them available for HTTP download.
This package was debianized by Richard Hector <richard@catalyst.net.nz> on
Sat, 20 Nov 2010 18:38:57 +1300
It is incorporated into the same repository as the software itself, at
http://gitorious.org/mahara/mahara-scripts
Upstream Authors:
Catalyst IT Ltd
Copyright:
Copyright (C) 2010 Catalyst IT Ltd
Licence:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
The Debian packaging is also Copyright (C) 2010 Catalyst IT Ltd, under the same licence.
#!/bin/sh -e
# Source debconf library
. /usr/share/debconf/confmodule
PRIORITY=high
db_input $PRIORITY custom-site-mahara-langpacks/projdir || true
db_input $PRIORITY custom-site-mahara-langpacks/wwwroot || true
db_go
#
# Regular cron jobs for the custom-site-mahara-langpacks package
#
22 * * * * root [ -x /usr/lib/mahara-langpacks/langpacks.sh ] && /usr/lib/mahara-langpacks/langpacks.sh >> /var/log/mahara-langpacks.log
mahara-langpacks/* usr/lib/mahara-langpacks
#!/bin/sh
# postinst script for custom-site-mahara-langpacks
set -e
. /usr/share/debconf/confmodule
# 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
case "$1" in
configure)
if [ ! -d /var/www/mahara-langpacks ]; then
mkdir /var/www/mahara-langpacks
fi
if [ ! -d /var/lib/mahara-langpacks ]; then
mkdir /var/lib/mahara-langpacks
fi
if [ ! -d /var/log/mahara-langpacks ]; then
mkdir /var/log/mahara-langpacks
fi
echo "DATA=/var/lib/mahara-langpacks" > /etc/mahara-langpacks.conf
echo "SCRIPTS=/usr/lib/mahara-langpacks" >> /etc/mahara-langpacks.conf
echo "DOCROOT=/var/www/mahara-langpacks" >> /etc/mahara-langpacks.conf
db_get custom-site-mahara-langpacks/projdir
echo "PROJDIR='${RET}'" >> /etc/mahara-langpacks.conf
db_get custom-site-mahara-langpacks/wwwroot
WWWROOT=${RET}
echo "WWWROOT='http://${WWWROOT}'" >> /etc/mahara-langpacks.conf
NVH=`apache2ctl -S 2>&1 |grep "is a NameVirtualHost"|sed 's/ .*//'|head -1`
cat <<EOF > /etc/apache2/sites-available/mahara-langpacks.conf
<VirtualHost ${NVH}>
ServerName ${WWWROOT}
DocumentRoot /var/www/mahara-langpacks
CustomLog /var/log/apache2/mahara-langpacks/access.log combined
ErrorLog /var/log/apache2/mahara-langpacks/error.log
</VirtualHost>
EOF
a2ensite mahara-langpacks.conf
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst 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
#!/bin/sh
# postrm script for custom-site-mahara-langpacks
set -e
# 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)
rm -f /etc/mahara-langpacks.conf
rm -rf /var/lib/mahara-langpacks
rm -rf /var/www/mahara-langpacks
rm -rf /var/log/mahara-langpacks
rm -f /etc/apache2/sites-available/mahara-langpacks.conf
;;
remove)
a2dissite mahara-langpacks.conf
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm 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
Template: custom-site-mahara-langpacks/projdir
Type: string
Default: git://gitorious.org/mahara-lang
Description: Project location
The git repository to get the langpacks from
Template: custom-site-mahara-langpacks/wwwroot
Type: string
Default:
Description: WWW root
The URL for the site, eg langpacks.dev.mahara.org
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_OPTIONS
clean:
dh_testdir
dh_testroot
dh_clean
binary:
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installdebconf
dh_fixperms
dh_installdeb
dh_install
dh_installdirs
dh_installcron
dh_gencontrol
dh_md5sums
dh_builddeb
.PHONY: build clean binary
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