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 | |
parent | bb4eafd53dc21710f0618499cba70bc4d046aa00 (diff) | |
download | rpm-c89b7ff341c504ce2f684149d46b2e6939faed31.tar.gz rpm-c89b7ff341c504ce2f684149d46b2e6939faed31.tar.bz2 rpm-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')
-rw-r--r-- | scripts/Makefile.am | 16 | ||||
-rw-r--r-- | scripts/brp-sparc64-linux | 29 |
2 files changed, 37 insertions, 8 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 1bb7d4160..163a2ba4c 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -4,10 +4,10 @@ AUTOMAKE_OPTIONS = 1.4 foreign EXTRA_DIST = \ brp-compress brp-redhat brp-strip brp-strip-comment-note \ - check-prereqs convertrpmrc.sh find-lang.sh find-prov.pl find-req.pl \ - cpanflute find-provides.perl find-requires.perl \ - freshen.sh get_magic.pl getpo.sh http.req magic.prov magic.req \ - perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \ + brp-sparc64-linux check-prereqs convertrpmrc.sh find-lang.sh \ + find-prov.pl find-req.pl cpanflute find-provides.perl \ + find-requires.perl freshen.sh get_magic.pl getpo.sh http.req \ + magic.prov magic.req perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \ vpkg-provides.sh vpkg-provides2.sh installprefix = $(DESTDIR) @@ -17,8 +17,8 @@ all: configdir = ${prefix}/lib/rpm config_SCRIPTS = \ brp-compress brp-redhat brp-strip brp-strip-comment-note \ - check-prereqs convertrpmrc.sh find-lang.sh find-prov.pl find-req.pl \ - cpanflute find-provides.perl find-requires.perl \ - freshen.sh get_magic.pl getpo.sh http.req magic.prov magic.req \ - perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \ + brp-sparc64-linux check-prereqs convertrpmrc.sh find-lang.sh \ + find-prov.pl find-req.pl cpanflute find-provides.perl \ + find-requires.perl freshen.sh get_magic.pl getpo.sh http.req \ + magic.prov magic.req perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \ vpkg-provides.sh vpkg-provides2.sh 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 |