Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Different dependencies for different Ubutu versions

  • Loading branch information...
commit 8462c442d6fd4b36654b3e33f2567e0d6b81a46d 1 parent 33de36c
@mivanov mivanov authored
View
19 deb_utils/depends.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Prints out the package dependencies for a specific Ubuntu release
+
+if [ $# -eq 0 ]
+then
+ echo "Usage: $0 <ubuntu_release(ex: lucid)>"
+ exit 1
+fi
+
+depends="python-pip, python-virtualenv, python-setuptools, solr-jetty, python-lxml, python-imaging, gdal-bin, proj, python-psycopg2, libapache2-mod-wsgi, git-core, mercurial, subversion"
+
+if [ "$1" = "oneiric" ]
+then
+ depends="${depends}, postgresql-9.1-postgis"
+else
+ depends="${depends}, postgresql-8.4-postgis"
+fi
+
+echo ${depends}
View
4 deb_utils/makedeb.sh
@@ -5,10 +5,12 @@
cd ..
LW_VERSION=$(python -c "from sapling import get_version; print get_version().replace(' ', '.')")
+DEPENDS=$(deb_utils/depends.sh lucid)
+
rm -r deb_dist/
rm -r localwiki.egg-info/
-python setup.py --command-packages=stdeb.command sdist_dsc --ignore-install-requires --suite unstable
+python setup.py --command-packages=stdeb.command sdist_dsc --ignore-install-requires --suite unstable --depends "${DEPENDS}"
cp deb_utils/localwiki.postinst deb_dist/localwiki-${LW_VERSION}/debian
cp deb_utils/triggers deb_dist/localwiki-${LW_VERSION}/debian
View
6 deb_utils/makedeb_ppa.sh
@@ -14,12 +14,16 @@ UBUNTU_RELEASE=$1
DEBIAN_VERSION="0ubuntu1~${UBUNTU_RELEASE}"
DIST_FILE=$2
VERSION="${LW_VERSION}-${DEBIAN_VERSION}"
+DEPENDS=$(deb_utils/depends.sh ${UBUNTU_RELEASE})
+
echo "Building package source for localwiki_${VERSION}"
rm -r deb_dist/
rm -r localwiki.egg-info/
-python setup.py --command-packages=stdeb.command sdist_dsc --ignore-install-requires --suite ${UBUNTU_RELEASE} --debian-version ${DEBIAN_VERSION} --use-premade-distfile ${DIST_FILE}
+echo python setup.py --command-packages=stdeb.command sdist_dsc --ignore-install-requires --suite ${UBUNTU_RELEASE} --debian-version ${DEBIAN_VERSION} --depends "${DEPENDS}" --use-premade-distfile ${DIST_FILE}
+
+exit 0
cp deb_utils/localwiki.postinst deb_dist/localwiki-${LW_VERSION}/debian
cp deb_utils/triggers deb_dist/localwiki-${LW_VERSION}/debian
View
2  stdeb.cfg
@@ -1,6 +1,6 @@
[DEFAULT]
Package: localwiki
XS-Python-Version: >= 2.6
-Depends: python-pip, python-virtualenv, python-setuptools, solr-jetty, python-lxml, python-imaging, gdal-bin, proj, postgis, python-psycopg2, libapache2-mod-wsgi, git-core, mercurial, subversion
Setup-Env-Vars: DISABLE_INSTALL_REQUIRES=1
Copyright-File: deb_utils/COPYRIGHT.debian
+# "Depends" field gets set by the deb_utils script at source build time
Please sign in to comment.
Something went wrong with that request. Please try again.