File: install_with_python.sh

package info (click to toggle)
samba 2:4.1.11+dfsg-1~bpo70+1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 102,616 kB
  • sloc: ansic: 1,163,067; xml: 114,289; python: 103,162; perl: 28,109; sh: 12,165; asm: 3,281; cpp: 2,281; yacc: 1,949; ada: 1,681; exp: 1,582; makefile: 1,181; pascal: 1,089; cs: 879; lex: 566; awk: 140; csh: 58; sed: 45
file content (44 lines) | stat: -rwxr-xr-x 1,027 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh

# this script installs a private copy of python in the same prefix as Samba

if [ $# -lt 1 ]; then
cat <<EOF
Usage: install_with_python.sh PREFIX [CONFIGURE OPTIONS]
EOF
exit 1;
fi

PREFIX="$1"
shift

LD_LIBRARY_PATH=$PREFIX/python/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

VERSION="Python-2.6.5"

do_install_python() {
       mkdir -p python_install || exit 1
       rsync -avz samba.org::ftp/tridge/python/$VERSION.tar python_install || exit 1
       cd python_install || exit 1;
       rm -rf $VERSION || exit 1
       tar -xf $VERSION.tar || exit 1
       cd $VERSION || exit 1
       ./configure --prefix=$PREFIX/python --enable-shared --disable-ipv6 || exit 1
       make || exit 1
       make install || exit 1
       cd ../.. || exit 1
       rm -rf python_install || exit 1
}

if [ ! -d $PREFIX/python ]; then
   # needs to be installed
   do_install_python
fi

PYTHON=$PREFIX/python/bin/python
export PYTHON

`dirname $0`/configure --prefix=$PREFIX $@ || exit 1
make -j || exit 1
make install || exit 1