]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/commitdiff
python: Make package work on x86_64.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 22 Dec 2011 17:12:31 +0000 (18:12 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 22 Dec 2011 17:12:31 +0000 (18:12 +0100)
python/python.nm

index 34582210e6f2ebcb7a3ed227b5b72f13944b8649..cfb8e03548392c8a55c9bb305ab12c0bda7837b3 100644 (file)
@@ -6,7 +6,7 @@
 name       = python
 major_ver  = 2.7
 version    = %{major_ver}.2
-release    = 3
+release    = 4
 thisapp    = Python-%{version}
 
 groups     = Development/Languages
@@ -58,39 +58,46 @@ build
                autoreconf --force
        end
 
+       configure_options += \
+               --enable-ipv6 \
+               --enable-unicode=ucs4 \
+               --with-system-expat \
+               --with-system-ffi \
+               --enable-shared
+
        build
                export CPPFLAGS=$(pkg-config --cflags-only-I libffi)
 
                OPT="%{CFLAGS}" \
                        ./configure \
-                               --prefix=/usr \
-                               --enable-ipv6 \
-                               --enable-unicode=ucs4 \
-                               --with-system-expat \
-                               --with-system-ffi \
-                               --enable-shared
+                               %{configure_options}
 
                make %{PARALLELISMFLAGS}
        end
 
        install_cmds
                # All *.py files don't need to be executeable...
-               find %{BUILDROOT}/usr/lib/python*/ -name "*.py" | xargs chmod a-x -v
+               find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs chmod a-x -v
 
                # Create symlink for shared lib.
-               ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}/usr/lib/python%{major_ver}/config/
+               ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}%{libdir}/python%{major_ver}/config/
        end
 end
 
 packages
        package %{name}
+               # Define python-abi manually.
+               provides
+                       python-abi = %{major_ver}
+               end
+       end
 
        package %{name}-devel
                template DEVEL
 
                files += \
-                       !/usr/lib/python*/config/Makefile \
-                       !/usr/include/python*/pyconfig.h
+                       !%{libdir}/python*/config/Makefile \
+                       !%{includedir}/python*/pyconfig.h
        end
 
        package %{name}-debuginfo