Browse Source

fix: [0k-openerp] compatibility with trusty cloud-images.

postgres
Valentin Lab 11 years ago
parent
commit
516d874035
  1. 22
      precise/0k-openerp/hooks/install

22
precise/0k-openerp/hooks/install

@ -22,6 +22,8 @@ GIT_0K_SUB_SETUP_OPTIONS=${GIT_0K_SUB_SETUP_OPTIONS:-""}
GIT_0K_CHECKOUT_REF=${GIT_0K_CHECKOUT_REF:-"7.0/0k/dev/master"} GIT_0K_CHECKOUT_REF=${GIT_0K_CHECKOUT_REF:-"7.0/0k/dev/master"}
release=$(lsb_release -c -s)
## ##
## Code ## Code
## ##
@ -38,9 +40,22 @@ set -eux
## from http://www.sandersnewmedia.com/why/2012/04/16/installing-pil-virtualenv-ubuntu-1204 ## from http://www.sandersnewmedia.com/why/2012/04/16/installing-pil-virtualenv-ubuntu-1204
if ! [ -e "/usr/lib/libjpeg.so" ]; then if ! [ -e "/usr/lib/libjpeg.so" ]; then
apt-get build-dep python-imaging -y --force-yes
ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
if [ "$release" == "trusty" ]; then
## for some reason /etc/apt/sources.list can be WITHOUT deb-src lines
apt-cache policy python-imaging | tail -n 1 | \
while read code url distrib arch type; do
echo deb-src $url $(echo "$distrib" | tr "/" " ");
done >> /etc/apt/sources.list &&
apt-get update
fi
if ! [ -d "/usr/include/freetype2/freetype" ]; then
(cd /usr/include/freetype2 &&
ln -sf . freetype)
fi
apt-get build-dep python-imaging -y --force-yes &&
ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/ &&
ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/ &&
ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/ ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/
fi fi
@ -198,4 +213,3 @@ chown openerp .
## beurk ## beurk
ln -sf "/opt/apps/0k-manage/src/bin/oe" "/usr/local/bin/oe" ln -sf "/opt/apps/0k-manage/src/bin/oe" "/usr/local/bin/oe"
) )
Loading…
Cancel
Save