]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blobdiff - glibc/glibc.nm
audit: Move libs and all others to /usr.
[people/arne_f/ipfire-3.x.git] / glibc / glibc.nm
index cf2259edd8bd35f13b6980f26facce83cea0808e..e5a6aa0ff8034753a30b2efaff4d72685cc65fc2 100644 (file)
@@ -3,11 +3,10 @@
 # Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
 ###############################################################################
 
-# TODO tzdata
-
 name       = glibc
-version    = 2.14
-release    = 4
+version    = 2.15
+release    = 3
+thisapp    = %{name}-2.15-a316c1f
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
 groups     = System/Base
@@ -26,10 +25,10 @@ description
 end
 
 # The version of the ports addon.
-ports_version = %{version}
+ports_version = 2.15-8a70b2d
 
 source_dl  = http://ftp.gnu.org/gnu/glibc/
-sources    = %{thisapp}.tar.xz glibc-ports-%{ports_version}.tar.xz
+sources    = %{thisapp}.tar.gz glibc-ports-%{ports_version}.tar.gz
 
 build
        # Optimize glibc for kernel
@@ -43,15 +42,18 @@ build
                kernel-headers>=%{OPTIMIZED_KERNEL}
                libcap-devel
                libselinux-devel
+               nss-devel
                texinfo
        end
 
        # Build glibc with custom cflags
-       GLIBC_FLAGS = -O3 -g -fasynchronous-unwind-tables -DNDEBUG -DPIC
+       GLIBC_FLAGS = -O3 -g -fasynchronous-unwind-tables -DNDEBUG -fPIC -DPIC
 
        if "%{DISTRO_ARCH}" == "i686"
                GLIBC_FLAGS += -march=i686 -mtune=generic
-       elif "%{DISTRO_ARCH}" == "x86_64"
+       end
+
+       if "%{DISTRO_ARCH}" == "x86_64"
                GLIBC_FLAGS += -mtune=generic
        end
 
@@ -60,9 +62,16 @@ build
 
        export QUALITY_AGENT_RPATH_ALLOW_ORIGIN=yes
 
-       prepare_cmds
+       prepare
+               # Extract source tarballs.
+               %{MACRO_EXTRACT_TARBALL}
+
+               # Create link for ports addon.
                ln -svf ../glibc-ports-%{ports_version} ports
 
+               # Apply the patches.
+               %{MACRO_PATCHES}
+
                # In the vi_VN.TCVN locale, bash enters an infinite loop at startup. It is
                # unknown whether this is a bash bug or a Glibc problem. Disable
                # installation of this locale in order to avoid the problem.
@@ -139,20 +148,15 @@ build
 
        configure_options = \
                --build=%{DISTRO_BUILDTARGET} \
-               --host=%{DISTRO_BUILDTARGET} \
                --prefix=/usr \
-               --libexecdir=/usr/lib/glibc \
+               --libexecdir=%{libdir}/glibc \
                --disable-profile \
                --enable-add-ons \
                --enable-kernel=%{OPTIMIZED_KERNEL} \
                --with-selinux \
                --disable-werror \
                --enable-bind-now \
-               --enable-__thread \
-               --enable-tls \
-               --enable-experimental-malloc \
-               --with-gd \
-               --with-nss-crypt
+               --enable-nss-crypt
 
        if "%{DISTRO_ARCH}" == "armv5tel"
                # Disable hardware FP for ARM.
@@ -207,6 +211,7 @@ build
                # Timezone
                cp -v --remove-destination %{BUILDROOT}/usr/share/zoneinfo/GMT \
                        %{BUILDROOT}/etc/localtime
+               rm -rf %{BUILDROOT}/usr/share/zoneinfo
 
                # Configuration
                cp -vf %{DIR_SOURCE}/{ld.so.conf,nsswitch.conf} %{BUILDROOT}/etc
@@ -221,33 +226,36 @@ build
                rm -vf %{BUILDROOT}/etc/ld.so.cache
 
                # Include /usr/lib/gconv/gconv-modules.cache
-               > %{BUILDROOT}/usr/lib/gconv/gconv-modules.cache
-               chmod 644 %{BUILDROOT}/usr/lib/gconv/gconv-modules.cache
+               > %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
+               chmod 644 %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
 
-               strip -g %{BUILDROOT}/usr/lib/*.o
+               strip -g %{BUILDROOT}%{libdir}/*.o
 
                # Move some libs to correct place
-               mv -v %{BUILDROOT}/lib/lib{memusage,pcprofile}.so %{BUILDROOT}/usr/lib/
+               mv -v %{BUILDROOT}/%{lib}/lib{memusage,pcprofile}.so %{BUILDROOT}%{libdir}
        end
 
        keep_libraries
-               /usr/lib/libc_nonshared.a
-               /usr/lib/libpthread_nonshared.a
+               %{libdir}/libc_nonshared.a
+               %{libdir}/libpthread_nonshared.a
        end
 end
 
 packages
        package glibc
-               requires = glibc-common=%{thisver}      
+               requires = glibc-common=%{thisver}
        end
 
        package glibc-common
                # XXX description and summary are missing
 
+               requires = tzdata
+
                files
                        /usr/bin
                        /usr/sbin
                        /usr/share
+                       /usr/lib/locale
                        !/usr/share/zoneinfo
                end
        end
@@ -269,7 +277,7 @@ packages
 
                requires = glibc-headers=%{thisver}
 
-               files = /usr/lib/*.a /usr/lib/*.o
+               files = %{libdir}/*.a %{libdir}/*.o
        end
 
        package glibc-headers
@@ -322,8 +330,12 @@ packages
                        /usr/bin/mtrace
                        /usr/bin/pcprofiledump
                        /usr/bin/xtrace
-                       /usr/lib/libmemusage.so
-                       /usr/lib/libpcprofile.so
+                       %{libdir}/libmemusage.so
+                       %{libdir}/libpcprofile.so
                end
        end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
+       end
 end