source: vendor/current/install_with_python.sh

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 1.5 KB
Line 
1#!/bin/sh
2
3# this script installs a private copy of python in the same prefix as Samba
4
5if [ $# -lt 1 ]; then
6cat <<EOF
7Usage: install_with_python.sh PREFIX [CONFIGURE OPTIONS]
8EOF
9exit 1;
10fi
11
12PREFIX="$1"
13shift
14
15LD_LIBRARY_PATH=$PREFIX/python/lib:$LD_LIBRARY_PATH
16export LD_LIBRARY_PATH
17
18VERSION="Python-2.6.5"
19
20do_install_python() {
21 set -e
22 mkdir -p python_install
23 rsync -avz samba.org::ftp/tridge/python/$VERSION.tar python_install
24 cd python_install
25 rm -rf $VERSION
26
27 # Verify that the download hasn't been corrupted
28 # This checks Python-2.6.5, while more hashes my be added later.
29 if command -v sha256sum
30 then
31 echo "2f1ec5e52d122bf1864529c1bbac7fe6afc10e3a083217b3a7bff5ded37efcc3 Python-2.6.5.tar" > checksums.sha256
32 sha256sum --status -c checksums.sha256
33 else
34 echo "c83cf77f32463c3949b85c94f661c090 Python-2.6.5.tar" > checksums.md5
35 md5sum --status -c checksums.md5
36 fi
37
38 tar -xf $VERSION.tar
39 cd $VERSION
40 ./configure --prefix=$PREFIX/python --enable-shared --disable-ipv6
41 make
42 make install
43 cd ../..
44 rm -rf python_install
45}
46
47cleanup_install_python() {
48 rm -rf python_install
49 exit 1
50}
51
52if [ ! -d $PREFIX/python ]; then
53 trap "cleanup_install_python" 0
54 # needs to be installed
55 do_install_python
56fi
57
58PYTHON=$PREFIX/python/bin/python
59export PYTHON
60
61`dirname $0`/configure --prefix=$PREFIX $@ || exit 1
62make -j || exit 1
63make install || exit 1
Note: See TracBrowser for help on using the repository browser.