summaryrefslogtreecommitdiff
path: root/libre/parabolaweb-utils
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-11-16 01:35:29 -0800
committerroot <root@rshg054.dnsready.net>2012-11-16 01:35:29 -0800
commit73cd7952c96190212616ca90d5afe1ce5cb2c9ce (patch)
tree274972d0d967441e136af716dd87f3cee0cee7f2 /libre/parabolaweb-utils
parent130aa30d45bf33a5ce926be8697a0e0c077cdc22 (diff)
Fri Nov 16 01:34:04 PST 2012
Diffstat (limited to 'libre/parabolaweb-utils')
-rw-r--r--libre/parabolaweb-utils/PKGBUILD14
-rw-r--r--libre/parabolaweb-utils/parabolaweb-download14
-rw-r--r--libre/parabolaweb-utils/parabolaweb-update22
-rw-r--r--libre/parabolaweb-utils/parabolaweb.conf2
4 files changed, 31 insertions, 21 deletions
diff --git a/libre/parabolaweb-utils/PKGBUILD b/libre/parabolaweb-utils/PKGBUILD
index e0b70ba1a..5fdd12bdb 100644
--- a/libre/parabolaweb-utils/PKGBUILD
+++ b/libre/parabolaweb-utils/PKGBUILD
@@ -8,7 +8,7 @@
pkgname=parabolaweb-utils
pkgver=`_get_pkgver`
-pkgrel=5
+pkgrel=8
pkgdesc="Utils for the Parabola website"
arch=('any')
url="https://projects.parabolagnulinux.org/parabolaweb.git/"
@@ -17,13 +17,15 @@ depends=(
'python2' # duh
'python2-flup' # for fcgi
'postgresql' # for database
- 'git' # used in parabolaweb-update
- 'libretools' # used in parabolaweb-update
+ 'git' # used in parabolaweb-download
+ 'libretools' # used in parabolaweb-{download,update} (libremessages)
`_get_depends`)
backup=('etc/conf.d/parabolaweb')
export pkgver
+makedepends=(makepkg-git)
+
source=(git://parabolagnulinux.org/parabolaweb.git
parabolaweb-download
parabolaweb-update
@@ -47,9 +49,9 @@ package() {
}
md5sums=('SKIP'
- '01bed679a4fd768e720bfd0f3c7d6694'
- 'a73063b14746720b77fdbab851f5c161'
+ 'f162c2ce49b4cafe0a14bd4767dfea04'
+ '7c212024c134fdd0d0318b52a5448ddb'
'd5294495f42df29d29519ebd0a8f6093'
'cc15e153f99fba82e7bb032896f655c2'
'a468016a7155b5da46521dcfc6428384'
- '9b565ef07e44d395bf7a0e484e3d19d1')
+ 'ffd37a19b1a72fbac2c58504aa17b355')
diff --git a/libre/parabolaweb-utils/parabolaweb-download b/libre/parabolaweb-utils/parabolaweb-download
index 823a18811..e124295d4 100644
--- a/libre/parabolaweb-utils/parabolaweb-download
+++ b/libre/parabolaweb-utils/parabolaweb-download
@@ -4,8 +4,8 @@
. /usr/bin/libremessages
dir=$WEBDIR
-repo=git://parabolagnulinux.org/parabolaweb.git
-ref=master
+repo=$GITURL
+ref=$GITREF
cd_safe() {
if ! cd "$1"; then
@@ -26,11 +26,11 @@ download_git() {
else
cd_safe "$dir"
# Make sure we are fetching the right repo
- # if [[ "$repo" != "$(git config --get remote.origin.url)" ]] ; then
- # error "$(gettext "%s is not a clone of %s")" "$dir" "$repo"
- # plain "$(gettext "Aborting...")"
- # exit 1
- # fi
+ if [[ "$repo" != "$(git config --get remote.origin.url)" ]] ; then
+ error "$(gettext "%s is not a clone of %s")" "$dir" "$repo"
+ plain "$(gettext "Aborting...")"
+ exit 1
+ fi
msg2 "$(gettext "Updating %s %s repo...")" "${repo}" "git"
if ! git pull origin "$ref"; then
# only warn on failure to allow offline builds
diff --git a/libre/parabolaweb-utils/parabolaweb-update b/libre/parabolaweb-utils/parabolaweb-update
index 45e17c4f2..2da9eea8a 100644
--- a/libre/parabolaweb-utils/parabolaweb-update
+++ b/libre/parabolaweb-utils/parabolaweb-update
@@ -15,17 +15,18 @@ find_makefiles() {
}
clean() {
- msg "Purging old .pyc files...."
cd "$WEBDIR"
+ msg "Purging old .pyc files..."
find . -name '*.pyc' -delete
+ msg "Purging old GNU Make generated files..."
for dir in `find_makefiles`; do
make -C "$WEBDIR/$dir" clean
done
}
configure() {
- msg "Checking configuration...."
cd "$WEBDIR"
+ msg "Checking configuration..."
if [[ ! -f local_settings.py ]]; then
msg2 "Configuration file missing, opening editor..."
cp local_settings.py.example local_settings.tmp.$$.py
@@ -36,7 +37,7 @@ configure() {
msg "Failed to configure, exiting"
exit 1
fi
- msg2 "Creating database...."
+ msg2 "Creating database..."
./manage.py syncdb
else
msg2 "Current configuration checks out"
@@ -44,11 +45,15 @@ configure() {
}
update-database() {
- msg "Updating database...."
cd "$WEBDIR"
- msg2 "Running migrations...."
+ msg "Updating database..."
+ msg2 "Running migrations..."
./manage.py migrate
- msg2 "Loading fixtures...."
+ if [[ -f devel/management/commands/update_types_permissions.py ]]; then
+ msg2 "Updating permissions..."
+ ./manage.py update_types_permissions
+ fi
+ msg2 "Loading fixtures..."
./manage.py loaddata */fixtures/*.json
}
@@ -69,10 +74,11 @@ main() {
exit 1
fi
+ if [[ -d "$WEBDIR" ]]; then
+ clean
+ fi
parabolaweb-download
- clean
configure
- clean
update-database
update-filesystem
}
diff --git a/libre/parabolaweb-utils/parabolaweb.conf b/libre/parabolaweb-utils/parabolaweb.conf
index 467e62e2c..5363479b3 100644
--- a/libre/parabolaweb-utils/parabolaweb.conf
+++ b/libre/parabolaweb-utils/parabolaweb.conf
@@ -2,3 +2,5 @@ HOST=127.0.0.1
PORT=8090 # 80 is nginx
WEBDIR=/srv/http/web
WEBUSER=nobody
+GITURL=git://parabolagnulinux.org/parabolaweb.git
+GITREF=master