head	1.2;
access;
symbols
	rpm-4_4_8-release:1.2
	rpm-4_4_7-release:1.2
	rpm-4_4_6-release:1.2
	rpm-4_4_5-release:1.2
	rpm-4_4_4-release:1.2
	rpm-4_4_3-release:1.2
	jbj_before_tklcpatches:1.2
	rpm-4_4_2-release:1.2
	pjones-sparse-experiment:1.2.0.14
	rpm-4_4_1-release:1.2
	rpm-4_4-release:1.2
	rpm-4_4:1.2.0.12
	rpm-4_3_1-start:1.2
	rpm-4_3:1.2.0.10
	rpm-4_2_1-release:1.2
	rpm-4_1_1-release:1.2
	rpm-4_2-release:1.2
	rpm-4_2:1.2.0.8
	rpm-4_1-release:1.2
	rpm-4_1:1.2.0.6
	rpm-4_0_4-release:1.2
	jbj-before-beecrypt:1.2
	rpm-4_0_3-release:1.2
	jbj_b4_rollback:1.2
	rpm-4_0_2-release:1.2
	rpm-4_0_1-release:1.2
	rpm-3_0_6-release:1.2.2.1
	rpm-4_0-release:1.2
	rpm-3_0_6:1.2.2.1
	rpm-4_0:1.2.0.4
	rpm-3_0_5:1.2.2.1.0.2
	rpm-3_0_4:1.2.0.2
	jbj_sparc64:1.1.0.2;
locks; strict;
comment	@# @;


1.2
date	2000.06.01.00.54.36;	author jbj;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2000.04.19.16.04.14;	author jbj;	state Exp;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2000.05.31.13.56.06;	author jbj;	state Exp;
branches;
next	;

1.2.2.1
date	2000.06.20.14.22.37;	author jbj;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Add athlon rpmrc config.
Add sparcv9 per-platform config.
@
text
@#!/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
@


1.2.2.1
log
@Orphans.
@
text
@@


1.1
log
@Hi!

I'd like to start building sparc64 packages (eventhough the install rule
details are yet to be designed - IMHO if 64bit SPARC userland is going into
7.0 we should rebuild all packages into 64bit in the next months or so to
have time to chase bugs etc.), and this is about what I need.
Basically I'd like to have %{_lib} to stand for the last part (normally
"lib") of dirname for directories like /lib, /usr/lib, /usr/X11R6/lib
because on sparc64-linux they are /lib64, /usr/lib64, /usr/X11R6/lib64 (and
on Solaris /lib/sparcv9, /usr/lib/sparcv9 etc.), so that one can use things
like
/usr/%{_lib} in the spec files.
Another thing which I need is an arch specific build root policy.
This patch does a few things:
1) add installplatform into EXTRA_DIST files, so that it is actually invoked
   during rpm build not from CVS
2) Define %_lib lib and let target specific macros override it
3) Split __spec_install_post into __arch_install_post and __os_install_post,
   --buildpolicy now specifies the __os_install_post part only. spec files
   can still override the __arch_install_post if the want to.
   brp-sparc64-linux is used to move 64bit libraries to */lib64 directories
   from */lib directories if make install of some package left them there.
4) Change installplatform so that on sparc* it creates both sparc and
   sparc64 target macro dirs (/usr/lib/rpm/sparc{,64}-redhat-linux in
   sparc*-redhat-linux case).
@
text
@d14 9
a22 1
	if objdump -h $f 2>/dev/null | grep ':[ 	]*file format elf64-sparc$' >/dev/null 2>&1; then
d24 4
@


1.1.2.1
log
@Patch Q1 from Jakub.
@
text
@d14 1
a14 9
	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
a15 4
	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
@

