]>
Commit | Line | Data |
---|---|---|
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 | 6 | name = python |
127d581f | 7 | major_ver = 2.7 |
ee14ee66 MT |
8 | version = %{major_ver}.15 |
9 | release = 1 | |
802ea3af MT |
10 | thisapp = Python-%{version} |
11 | ||
12 | groups = Development/Languages | |
13 | url = http://www.python.org | |
14 | license = Python | |
15 | summary = An interpreted, interactive, object-oriented programming language. | |
16 | ||
17 | description | |
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 |
23 | end |
24 | ||
d3be0b53 MT |
25 | source_dl = http://python.org/ftp/python/%{version}/ |
26 | sources = %{thisapp}.tar.xz | |
802ea3af MT |
27 | |
28 | build | |
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 | 37 | libffi-devel |
802ea3af MT |
38 | ncurses-devel |
39 | openssl-devel | |
1802011e | 40 | pakfire-builder >= 0.9.23-4 |
802ea3af MT |
41 | readline-devel |
42 | sqlite-devel | |
43 | tar | |
48d9a6a0 | 44 | util-linux |
802ea3af MT |
45 | zlib-devel |
46 | end | |
47 | ||
48 | export CFLAGS += -D_GNU_SOURCE -fwrapv | |
d60c6072 MT |
49 | export CPPFLAGS = %(pkg-config --cflags-only-I libffi) |
50 | export OPT = %{CFLAGS} | |
ee14ee66 MT |
51 | export CC = gcc |
52 | export LINKCC = gcc | |
d60c6072 MT |
53 | |
54 | if "%{lib}" == "lib64" | |
ee14ee66 | 55 | patches += %{DIR_SOURCE}/python-2.7.13-lib64.patch |
d60c6072 MT |
56 | patches += %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch |
57 | end | |
802ea3af MT |
58 | |
59 | prepare_cmds | |
802ea3af MT |
60 | # Remove embedded copies of expat, zlib and libffi |
61 | rm -rf Modules/{expat,zlib} | |
62 | rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx} | |
63 | ||
48d9a6a0 | 64 | # Reconfigure |
802ea3af MT |
65 | autoreconf --force |
66 | end | |
67 | ||
536d577c MT |
68 | configure_options += \ |
69 | --enable-ipv6 \ | |
70 | --enable-unicode=ucs4 \ | |
71 | --with-system-expat \ | |
72 | --with-system-ffi \ | |
73 | --enable-shared | |
74 | ||
48d9a6a0 MT |
75 | test |
76 | WITHIN_PYTHON_RPM_BUILD= EXTRATESTOPTS="--verbose" make test || : | |
77 | end | |
78 | ||
802ea3af MT |
79 | install_cmds |
80 | # All *.py files don't need to be executeable... | |
99e69167 | 81 | find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs -r chmod a-x -v |
127d581f MT |
82 | |
83 | # Create symlink for shared lib. | |
536d577c | 84 | ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}%{libdir}/python%{major_ver}/config/ |
802ea3af MT |
85 | end |
86 | end | |
87 | ||
88 | packages | |
89 | package %{name} | |
536d577c MT |
90 | # Define python-abi manually. |
91 | provides | |
92 | python-abi = %{major_ver} | |
93 | end | |
94 | end | |
df7a686f | 95 | |
802ea3af MT |
96 | package %{name}-devel |
97 | template DEVEL | |
1f9bc2f0 | 98 | |
df7a686f | 99 | files += \ |
536d577c MT |
100 | !%{libdir}/python*/config/Makefile \ |
101 | !%{includedir}/python*/pyconfig.h | |
802ea3af | 102 | end |
1f9bc2f0 MT |
103 | |
104 | package %{name}-debuginfo | |
105 | template DEBUGINFO | |
106 | end | |
802ea3af | 107 | end |