Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
Different dependencies for different Ubutu versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mivanov committed Nov 30, 2011
1 parent 33de36c commit 8462c44
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
19 changes: 19 additions & 0 deletions deb_utils/depends.sh
Original file line number Diff line number Diff line change
@@ -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}
4 changes: 3 additions & 1 deletion deb_utils/makedeb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion deb_utils/makedeb_ppa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion stdeb.cfg
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8462c44

Please sign in to comment.