diff options
author | jbj <devnull@localhost> | 2000-04-19 16:03:49 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2000-04-19 16:03:49 +0000 |
commit | c89b7ff341c504ce2f684149d46b2e6939faed31 (patch) | |
tree | fcb2f681bc1fadfaf917dc7bb5eaa58394e261bb /scripts/brp-sparc64-linux | |
parent | bb4eafd53dc21710f0618499cba70bc4d046aa00 (diff) | |
download | librpm-tizen-c89b7ff341c504ce2f684149d46b2e6939faed31.tar.gz librpm-tizen-c89b7ff341c504ce2f684149d46b2e6939faed31.tar.bz2 librpm-tizen-c89b7ff341c504ce2f684149d46b2e6939faed31.zip |
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).
CVS patchset: 3685
CVS date: 2000/04/19 16:03:49
Diffstat (limited to 'scripts/brp-sparc64-linux')
-rw-r--r-- | scripts/brp-sparc64-linux | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/brp-sparc64-linux b/scripts/brp-sparc64-linux new file mode 100644 index 000000000..5f47c77ef --- /dev/null +++ b/scripts/brp-sparc64-linux @@ -0,0 +1,29 @@ +#!/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 + if objdump -h $f 2>/dev/null | grep ':[ ]*file format elf64-sparc$' >/dev/null 2>&1; then + files="$files $f" + 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 |