Switching to single %_libdir for AArch64 sandbox/vbarinov/single_lib64
authorSlava Barinov <v.barinov@samsung.com>
Thu, 3 Nov 2016 11:26:43 +0000 (14:26 +0300)
committerSlava Barinov <v.barinov@samsung.com>
Mon, 19 Dec 2016 09:58:29 +0000 (12:58 +0300)
Now the layout is the same to x86_64 one:
/usr/lib64 is the single directory for libraries
/lib64, /lib, /usr/lib are symlinks to /usr/lib64

The 32bit libraries if needed must be installed into /usr/lib32.

Signed-off-by: Slava Barinov <v.barinov@samsung.com>
packaging/linaro-glibc.spec

index b0deed9..2a69f12 100755 (executable)
@@ -74,7 +74,7 @@ Source7:        bindresvport.blacklist
 Source8:        glibc_post_upgrade.c
 Source9:        glibc.rpmlintrc
 Source10:       baselibs.conf
-# For systemd 
+# For systemd
 Source1001:    glibc.manifest
 
 Requires(pre):  filesystem
@@ -199,7 +199,7 @@ is no gurantee that they work for you, you should try to get newer
 versions of your software.
 
 %prep
-%setup -n glibc-%{version} -q 
+%setup -n glibc-%{version} -q
 cp %{SOURCE1001} .
 
 %build
@@ -462,6 +462,13 @@ ln -s ld-%{glibc_major_version}.so %{buildroot}/lib/ld-linux.so.3
 mv %{buildroot}%{_bindir}/getconf %{buildroot}%{_libexecdir}/getconf/getconf
 ln -s %{_libexecdir}/getconf/getconf %{buildroot}%{_bindir}/getconf
 
+# Migrate to one single lib64
+%ifarch aarch64
+mv %{buildroot}/lib/*  %{buildroot}/%{_lib}/
+rm -rf %{buildroot}/lib
+# (cd %{buildroot} && ln -sfn %{_lib} lib)
+%endif
+
 #######################################################################
 ###
 ### ...
@@ -517,7 +524,6 @@ done
 /%{_lib}/ld-linux.so.2
 %endif
 %ifarch aarch64
-/lib/ld-linux-aarch64.so.1
 /%{_lib}/ld-linux-aarch64.so.1
 %endif
 
@@ -607,14 +613,14 @@ done
 %defattr(-,root,root)
 %{_datadir}/locale/locale.alias
 %if %{build_locales}
-/usr/lib/locale/*
+%{_libdir}/locale/*
 %endif
 %{_libdir}/gconv
 
 %files devel
 %manifest %{name}.manifest
 %defattr(-,root,root)
-%license COPYING COPYING.LIB 
+%license COPYING COPYING.LIB
 %doc NEWS README BUGS CONFORMANCE
 %{_bindir}/rpcgen
 %{_includedir}/*