]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - python/python.nm
Merge remote-tracking branch 'arne_f/automake'
[people/amarx/ipfire-3.x.git] / python / python.nm
CommitLineData
53c273e0 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
53c273e0
MT
4###############################################################################
5
802ea3af 6name = python
127d581f
MT
7major_ver = 2.7
8version = %{major_ver}.2
be87bcf6 9release = 7
802ea3af
MT
10thisapp = Python-%{version}
11
12groups = Development/Languages
13url = http://www.python.org
14license = Python
15summary = An interpreted, interactive, object-oriented programming language.
16
17description
18 Python is an interpreted, interactive, object-oriented programming
19 language often compared to Tcl, Perl, Scheme or Java. Python includes
20 modules, classes, exceptions, very high level dynamic data types and
21 dynamic typing. Python supports interfaces to many system calls and
53c273e0 22 libraries, as well as to various windowing systems.
802ea3af
MT
23end
24
d3be0b53
MT
25source_dl = http://python.org/ftp/python/%{version}/
26sources = %{thisapp}.tar.xz
802ea3af
MT
27
28build
29 requires
30 autoconf
31 automake
32 bzip2-devel
be87bcf6 33 db4-devel >= 1:4.8
802ea3af 34 expat-devel
802ea3af
MT
35 libffi-devel
36 libselinux-devel
37 ncurses-devel
38 openssl-devel
39 pkg-config
40 readline-devel
41 sqlite-devel
42 tar
43 zlib-devel
44 end
45
46 export CFLAGS += -D_GNU_SOURCE -fwrapv
802ea3af
MT
47
48 prepare_cmds
99e69167
MT
49 # Apply patches for x86_64.
50 if [ "$(uname -m)" = "x86_64" ]; then
51 patch -Np1 -i %{DIR_SOURCE}/python-2.7.1-lib64.patch
52 patch -Np1 -i %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch
53 fi
54
802ea3af
MT
55 # Remove embedded copies of expat, zlib and libffi
56 rm -rf Modules/{expat,zlib}
57 rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx}
58
59 # Remove autoconf version check and reconfigure
60 sed -e "s/^version_required.*//" -i configure.in
61 autoreconf --force
62 end
63
536d577c
MT
64 configure_options += \
65 --enable-ipv6 \
66 --enable-unicode=ucs4 \
67 --with-system-expat \
68 --with-system-ffi \
69 --enable-shared
70
802ea3af 71 build
df7a686f
MT
72 export CPPFLAGS=$(pkg-config --cflags-only-I libffi)
73
802ea3af
MT
74 OPT="%{CFLAGS}" \
75 ./configure \
536d577c 76 %{configure_options}
802ea3af
MT
77
78 make %{PARALLELISMFLAGS}
79 end
80
81 install_cmds
82 # All *.py files don't need to be executeable...
99e69167 83 find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs -r chmod a-x -v
127d581f
MT
84
85 # Create symlink for shared lib.
536d577c 86 ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}%{libdir}/python%{major_ver}/config/
802ea3af
MT
87 end
88end
89
90packages
91 package %{name}
536d577c
MT
92 # Define python-abi manually.
93 provides
94 python-abi = %{major_ver}
95 end
96 end
df7a686f 97
802ea3af
MT
98 package %{name}-devel
99 template DEVEL
1f9bc2f0 100
df7a686f 101 files += \
536d577c
MT
102 !%{libdir}/python*/config/Makefile \
103 !%{includedir}/python*/pyconfig.h
802ea3af 104 end
1f9bc2f0
MT
105
106 package %{name}-debuginfo
107 template DEBUGINFO
108 end
802ea3af 109end