summaryrefslogtreecommitdiff
path: root/libre/parabolaweb-utils
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-12-12 02:49:40 -0800
committerroot <root@rshg054.dnsready.net>2012-12-12 02:49:40 -0800
commit6768c115af3c5f0772bcf7b02f34a88a880876c0 (patch)
treecf59712968581c230363f5604ad8f253cc0b5d87 /libre/parabolaweb-utils
parentab94338181959432cf0046ce0a9643307dab9366 (diff)
Wed Dec 12 02:43:53 PST 2012
Diffstat (limited to 'libre/parabolaweb-utils')
-rw-r--r--libre/parabolaweb-utils/PKGBUILD19
-rw-r--r--libre/parabolaweb-utils/helper.sh32
2 files changed, 20 insertions, 31 deletions
diff --git a/libre/parabolaweb-utils/PKGBUILD b/libre/parabolaweb-utils/PKGBUILD
index 5fdd12bdb..e3d9444ce 100644
--- a/libre/parabolaweb-utils/PKGBUILD
+++ b/libre/parabolaweb-utils/PKGBUILD
@@ -1,14 +1,13 @@
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
-. helper.sh
+. "${startdir:-.}/helper.sh"
# provides:
-# _get_pkgver
# _get_depends
# _get_depends_nover (no version requirements)
pkgname=parabolaweb-utils
-pkgver=`_get_pkgver`
-pkgrel=8
+pkgver=20121115.1554
+pkgrel=1
pkgdesc="Utils for the Parabola website"
arch=('any')
url="https://projects.parabolagnulinux.org/parabolaweb.git/"
@@ -20,11 +19,8 @@ depends=(
'git' # used in parabolaweb-download
'libretools' # used in parabolaweb-{download,update} (libremessages)
`_get_depends`)
-backup=('etc/conf.d/parabolaweb')
-
-export pkgver
-
makedepends=(makepkg-git)
+backup=('etc/conf.d/parabolaweb')
source=(git://parabolagnulinux.org/parabolaweb.git
parabolaweb-download
@@ -34,6 +30,13 @@ source=(git://parabolagnulinux.org/parabolaweb.git
parabolaweb.service
parabolaweb.conf)
+pkgver() {
+ cd "$srcdir/parabolaweb"
+ # get the date requirements_prod.txt was last modified
+ gitdate="$(git log -n1 --date=iso --format=format:'%cd' ./requirements_prod.txt)"
+ date -u +%Y%m%d.%H%M -d "$gitdate"
+}
+
build() {
:
}
diff --git a/libre/parabolaweb-utils/helper.sh b/libre/parabolaweb-utils/helper.sh
index 5ce4182b3..5212571a8 100644
--- a/libre/parabolaweb-utils/helper.sh
+++ b/libre/parabolaweb-utils/helper.sh
@@ -1,35 +1,21 @@
_mksource() {
- if [[ -z _DO_NOT_RUN_MKSOURCE ]]; then
- _DO_NOT_RUN_MKSOURCE=true makepkg -o
- fi
-}
-
-_get_pkgver() {
- if [[ -n $pkgver ]] && [[ $pkgver != 0.bogus ]]; then
- echo $pkgver
- else
- _mksource 1>&2
- if [[ -f "${srcdir:-src}/parabolaweb/requirements_prod.txt" ]]; then
- pushd "${srcdir:-src}/parabolaweb" >/dev/null
- # get the date requirements_prod.txt was last modified
- gitdate="$(git log -n1 --date=iso --format=format:'%cd' ./requirements_prod.txt)"
- date -u +%Y%m%d.%H%M -d "$gitdate"
- popd >/dev/null
- else
- echo 0.bogus
- fi
+ pushd "${startdir:-.}" >/dev/null
+ if [[ -z $_DO_NOT_RUN_MKSOURCE && $0 =~ ^makepkg ]]; then
+ local flags=(-o)
+ (( EUID )) || flags+=(--asroot)
+ _DO_NOT_RUN_MKSOURCE=true "${0}" "${flags[@]}"
fi
+ popd >/dev/null
}
_get_depends() {
_mksource 1>&2
- if [[ -f "${srcdir:-src}/parabolaweb/requirements_prod.txt" ]]; then
+ if [[ -f "${srcdir:-${startdir:-.}/src}/parabolaweb/requirements_prod.txt" ]]; then
pushd "${srcdir:-src}" >/dev/null
- python2_packages='markdown|psycopg2|pyinotify|pytz|south'
< parabolaweb/requirements_prod.txt sed -r \
-e 's/.*/\L&/' -e 's/==/=/' \
- -e 's/^python-memcached/python2-memcached/' \
- -e "s/^(${python2_packages})/python2-&/"
+ -e 's/^(python2?-)?/python2-/' \
+ -e 's/python2-django/django/'
popd >/dev/null
fi
}