config root man

Current Path : /compat/linux/proc/68247/root/usr/local/lib/rpm/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/68247/root/usr/local/lib/rpm/brp-sparc64-linux

#!/bin/sh
# If using normal root, avoid changing anything.
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
	exit 0
fi
files=
LC_ALL=
LANG=

# Move 64bit ELF objects from /lib, /usr/lib, /usr/X11R6/lib to */lib64
# directories

for f in `find $RPM_BUILD_ROOT{,/usr,/usr/X11R6}/lib -maxdepth 1 -type f -o -type l 2>/dev/null`; do
	ff=$f
	while [ -L $ff ]; do
		l=`ls -l $ff | awk '{ print $11 }'`
		case $l in
		/*) ff=$RPM_BUILD_ROOT$l ;;
		*) ff=`dirname $ff`/$l ;;
		esac
	done
	if file $ff 2>/dev/null | grep ': ELF 64-bit .SB' | grep -v ': ELF 64-bit .SB executable' > /dev/null; then
		files="$files $f"
	elif file $ff 2>/dev/null | grep 'ar archive' > /dev/null; then
		if objdump -h $ff 2>/dev/null | grep ':[        ]*file format elf64-sparc' > /dev/null; then
			files="$files $f"
		fi
	fi
done
for f in $files; do
	d=`dirname $f`
	n=`basename $f`
	if [ ! -d ${d}64 ]; then mkdir -p ${d}64; fi
	if [ -L $f ]; then
		l=`ls -l $f | awk '{ print $11 }' | sed 's_lib\(/[^/]*\)$_lib64\1_'`
		ln -sf $l ${d}64/$n
		rm -f $f
	else
		mv -f $f ${d}64/$n
	fi
done

Man Man