summaryrefslogtreecommitdiffstats
path: root/encap/src/encap-profiles/bcfg2-python-2.4.4.ep
blob: 36a1f9d1d13ea4703fd8f92dd5470f34b1d9297f (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?xml version="1.0"?>

<!-- $Id$ -->

<encap_profile
	profile_ver="1.0"
	pkgspec="bcfg2-python-2.4.4"
>

<prereq package="m4-1.4.4" />
<prereq package="bcfg2-zlib-1.2.3" />
<prereq package="bcfg2-gzip-1.2.4b" />
<prereq package="bcfg2-pkg-config-0.21" />
<prereq package="bcfg2-readline-5.2" />

<environment
        variable="CC"
        value="gcc -static-libgcc"
        type="set"
/>

<environment
        variable="PATH"
PLATFORM_IF_MATCH(solaris)
        value="/usr/local/lib/bcfg2/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin:"
PLATFORM_ELSE
        value="/usr/local/lib/bcfg2/bin:/usr/local/bin:"
PLATFORM_ENDIF
        type="prepend"
/>

PLATFORM_IF_MATCH(linux)
PLATFORM_ELSE
<environment
        variable="MAKE"
        value="gmake"
        type="set"
/>
PLATFORM_ENDIF

<environment
        variable="LDFLAGS"
PLATFORM_IF_MATCH(linux)
        value="-L/usr/local/lib/bcfg2/lib -Wl,-rpath,/usr/local/lib/bcfg2/lib -YP,/usr/local/lib/bcfg2/lib:/usr/lib:/lib"
PLATFORM_ELSE_IF_MATCH(aix)
        value="-L/usr/local/lib/bcfg2/lib -Wl,-blibpath:/usr/local/lib/bcfg2/lib:/usr/lib"
PLATFORM_ELSE_IF_MATCH(solaris)
        value="-L/usr/local/lib/bcfg2/lib -R/usr/local/lib/bcfg2/lib:/usr/lib -YP,/usr/local/lib/bcfg2/lib:/usr/lib"
PLATFORM_ELSE
PLATFORM_ENDIF
        type="set"
/>

<environment
        variable="CPPFLAGS"
        value="-I/usr/local/lib/bcfg2/include"
        type="set"
/>

<source
url="http://encapsrcdist/mirror/python/Python-2.4.4.tgz
     http://mirror.opensysadmin.com/python/Python-2.4.4.tgz
     http://www.python.org/ftp/python/2.4.4/Python-2.4.4.tgz"
>

<configure>
if [ -f setup.py.orig ]; then cp setup.py.orig setup.py; fi
cat setup.py \
| sed s:\/usr\/local\/:\/usr\/local\/lib\/bcfg2\/:g \
> setup.py.bcfg2
mv setup.py setup.py.orig
cp setup.py.bcfg2 setup.py
./configure \
	--prefix="${ENCAP_SOURCE}/${ENCAP_PKGNAME}/lib/bcfg2" \
PLATFORM_IF_MATCH(linux)
PLATFORM_ELSE
	--with-gcc \
PLATFORM_ENDIF
	--enable-shared=no \
	--disable-ipv6 \
	--without-cxx
</configure>

</source>

<prepackage><![CDATA[
# Put setup back into pristine state
rm ${builddir}/setup.py
cp ${builddir}/setup.py.orig ${builddir}/setup.py
# Make site-packages be in the PYTHONPATH
echo /usr/local/lib/bcfg2/lib/python2.4/site-packages > lib/bcfg2/lib/python2.4/site-packages/usr-local-lib-bcfg2.pth
# Convienience links
mkdir bin 2>/dev/null || exit 0
ln -sf ../lib/bcfg2/bin/pydoc bin/b2-pydoc
ln -sf ../lib/bcfg2/bin/python bin/b2-python
# Remove some big stuff that bcfg2 doesn't need
if [ -d lib/bcfg2/lib/python2.4/test ]; then rm -rf lib/bcfg2/lib/python2.4/test; fi
if [ -d lib/bcfg2/lib/python2.4/idlelib ]; then rm -rf lib/bcfg2/lib/python2.4/idlelib; fi
# Make "this encap is installed" sentinal file available in /usr/local/var/encap
test -d var || mkdir var
test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
]]></prepackage>

<encapinfo>
description python - scripting language
</encapinfo>

</encap_profile>