]> git.ipfire.org Git - ipfire-3.x.git/blame - python/python.nm
python: Apply lib64 patches correctly on all 64 bit arches
[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 7major_ver = 2.7
48d9a6a0 8version = %{major_ver}.5
d60c6072 9release = 2
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
802ea3af 33 expat-devel
48d9a6a0 34 gdbm-devel
1802011e 35 glibc-headers >= 2.16-4
48d9a6a0 36 libdb-devel
802ea3af
MT
37 libffi-devel
38 libselinux-devel
39 ncurses-devel
40 openssl-devel
1802011e 41 pakfire-builder >= 0.9.23-4
802ea3af
MT
42 readline-devel
43 sqlite-devel
44 tar
48d9a6a0 45 util-linux
802ea3af
MT
46 zlib-devel
47 end
48
49 export CFLAGS += -D_GNU_SOURCE -fwrapv
d60c6072
MT
50 export CPPFLAGS = %(pkg-config --cflags-only-I libffi)
51 export OPT = %{CFLAGS}
52
53 if "%{lib}" == "lib64"
54 patches += %{DIR_SOURCE}/python-2.7.3-lib64.patch
55 patches += %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch
56 end
802ea3af
MT
57
58 prepare_cmds
802ea3af
MT
59 # Remove embedded copies of expat, zlib and libffi
60 rm -rf Modules/{expat,zlib}
61 rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx}
62
48d9a6a0 63 # Reconfigure
802ea3af
MT
64 autoreconf --force
65 end
66
536d577c
MT
67 configure_options += \
68 --enable-ipv6 \
69 --enable-unicode=ucs4 \
70 --with-system-expat \
71 --with-system-ffi \
72 --enable-shared
73
48d9a6a0
MT
74 test
75 WITHIN_PYTHON_RPM_BUILD= EXTRATESTOPTS="--verbose" make test || :
76 end
77
802ea3af
MT
78 install_cmds
79 # All *.py files don't need to be executeable...
99e69167 80 find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs -r chmod a-x -v
127d581f
MT
81
82 # Create symlink for shared lib.
536d577c 83 ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}%{libdir}/python%{major_ver}/config/
802ea3af
MT
84 end
85end
86
87packages
88 package %{name}
536d577c
MT
89 # Define python-abi manually.
90 provides
91 python-abi = %{major_ver}
92 end
93 end
df7a686f 94
802ea3af
MT
95 package %{name}-devel
96 template DEVEL
1f9bc2f0 97
df7a686f 98 files += \
536d577c
MT
99 !%{libdir}/python*/config/Makefile \
100 !%{includedir}/python*/pyconfig.h
802ea3af 101 end
1f9bc2f0
MT
102
103 package %{name}-debuginfo
104 template DEBUGINFO
105 end
802ea3af 106end