Commit 4d938cb0 authored by Son Nguyen's avatar Son Nguyen

- Set mahara git repo to git.mahara.org

- Update the debian packaging
 - Clean the working directory after install the package
 - Hard-code the value of PROJDIR

Change-Id: I0ecf77abbd907c4c7945d31e999ce828ac4d4c9d
parent 5ca1dc91
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.
The custom-site-mahara-langpacks package installs mahara language scripts on the langpacks.mahara.org server.
-- Richard Hector <richard@catalyst.net.nz> Sat, 20 Nov 2010 19:26:29 +1300
-- Son Nguyen <son.nguyen@catalyst.net.nz> Sat, 11 Aug 2015 11:49:37 +1300
mahara-scripts (1.26) unstable; urgency=low
* Fix the issue of deleting all data
-- Son Nguyen <son.nguyen@catalyst.net.nz> Mon, 12 Aug 2015 14:35:29 +1300
mahara-scripts (1.25) unstable; urgency=low
* Remove old working directory if exists after installation
* Set hard-coded value for the current mahara project location to 'git.mahara.org'
* Set hard-coded value for the site domain name to 'langpacks.mahara.org'
-- Son Nguyen <son.nguyen@catalyst.net.nz> Mon, 12 Aug 2015 8:32:29 +1300
mahara-scripts (1.24) unstable; urgency=low
* Updates for 15.04 release
* Updates for 1.10 release
-- Son Nguyen <son.nguyen@catalyst.net.nz> Mon, 11 Aug 2015 11:50:52 +1300
mahara-scripts (1.23) unstable; urgency=low
* Updates for 1.9 release
......
Source: mahara-scripts
Section: web
Priority: extra
Maintainer: Richard Hector <richard@catalyst.net.nz>
Maintainer: Son Nguyen <son.nguyen@catalyst.net.nz>
Build-Depends: debhelper (>=7)
Standards-Version: 3.9.1
......@@ -9,5 +9,6 @@ Package: custom-site-mahara-langpacks
Architecture: all
Depends: ${misc:Depends}, apache2, php5-cli, perl, bash, debconf, git-core, libhtml-tiny-perl, liblocale-po-perl, libwww-perl, bzr
Description: Mahara langpack repository scripts
Scripts to download mahara langpacks from git.mahara.org, clean them up, and
Scripts to download mahara translations from launchpad.net, clean them up, create language packs and
make them available for HTTP download.
They also updates new language strings from git.mahara.org, create .po files and push them to launchpad.net
This package was debianized by Richard Hector <richard@catalyst.net.nz> on
Sat, 20 Nov 2010 18:38:57 +1300
and updated by Son Nguyen <son.nguyen@catalyst.net.nz> on 11 Aug 2015, 12:01:43
It is incorporated into the same repository as the software itself, at
https://git.mahara.org/scripts/mahara-scripts
......
#!/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
......@@ -37,6 +37,8 @@ case "$1" in
if [ ! -d /var/lib/mahara-langpacks ]; then
mkdir /var/lib/mahara-langpacks
else
rm -rf /var/lib/mahara-langpacks/*
fi
if [ `stat -c %U /var/lib/mahara-langpacks` != 'maharabot' ]; then
......@@ -55,15 +57,14 @@ case "$1" in
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
echo "PROJDIR='git@git.mahara.org:mahara/mahara.git'" >> /etc/mahara-langpacks.conf
DOMAINNAME="langpacks.mahara.org"
echo "WWWROOT='http://${DOMAINNAME}'" >> /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}
ServerName ${DOMAINNAME}
DocumentRoot /var/www/mahara-langpacks
CustomLog /var/log/apache2/custom-site-mahara-langpacks-access.log combined
ErrorLog /var/log/apache2/custom-site-mahara-langpacks-error.log
......
Template: custom-site-mahara-langpacks/projdir
Type: string
Default:
Description: Project location
The git repository to get the langpacks from
Template: custom-site-mahara-langpacks/wwwroot
Type: string
Default: http://langpacks.mahara.org
Description: WWW root
The URL for the site, eg langpacks.mahara.org
......@@ -40,7 +40,7 @@ my $CLEAN = "${DATA}/new";
my $TARBALLS = "${DATA}/tarballs";
my $MAHARA = "${DATA}/mahara";
my $MAHARAREMOTE = 'git@github.com:MaharaProject/mahara.git';
my $MAHARAREMOTE = 'git@git.mahara.org:mahara/mahara.git';
my $REPOLIST = 'https://git.mahara.org/scripts/mahara-scripts/blob/master/mahara-langpacks/language-repos.txt';
mkpath $GITDIR;
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# this is expected to defind DATA, SCRIPTS, DOCROOT, PROJDIR and WWWROOT
# this is expected to defind DATA, SCRIPTS, DOCROOT and WWWROOT
. /etc/mahara-langpacks.conf
GITDIR=${DATA}/git
......
......@@ -32,8 +32,8 @@ TEMP=${WORK}/temp
[ ! -d ${TEMP} ] && mkdir ${TEMP}
[ ! -d ${DOCROOT}/pot ] && mkdir ${DOCROOT}/pot
#mahararemote='git@git.mahara.org/mahara/mahara.git'
mahararemote='git@github.com:MaharaProject/mahara.git'
mahararemote='git@git.mahara.org/mahara/mahara.git'
#mahararemote='git@github.com:MaharaProject/mahara.git'
if [ ! -d ${GITDIR} ]; then
echo "git clone ${mahararemote} ${GITDIR}"
......
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