2003-01-07 03:47:33 +08:00
|
|
|
#!/usr/bin/env bash
|
2000-02-26 00:29:44 +08:00
|
|
|
|
|
|
|
DESTDIR="${DESTDIR:-/}"
|
|
|
|
pkglibdir="${pkglibdir:-/usr/lib/rpm}"
|
2008-02-02 02:18:23 +08:00
|
|
|
platformdir="${pkglibdir}/platform"
|
2000-02-26 00:29:44 +08:00
|
|
|
|
|
|
|
RPMRC="${1:-rpmrc}"
|
2011-03-25 20:39:36 +08:00
|
|
|
PLATFORM="${2:-platform}"
|
|
|
|
VENDOR="${3}"
|
|
|
|
OS="${4}"
|
|
|
|
RPMRC_GNU="${5}"
|
2000-02-26 00:29:44 +08:00
|
|
|
|
2011-03-25 20:39:36 +08:00
|
|
|
for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do
|
2000-06-01 20:54:06 +08:00
|
|
|
RPMRC_OPTFLAGS="`sed -n 's/^optflags: '$ARCH' //p' $RPMRC`"
|
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
2000-04-20 00:03:49 +08:00
|
|
|
RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e 's, ,\ ,g'`"
|
2001-03-23 07:39:01 +08:00
|
|
|
case $RPMRC_OPTFLAGS in
|
|
|
|
*-g*) ;;
|
|
|
|
*) RPMRC_OPTFLAGS="$RPMRC_OPTFLAGS -g" ;;
|
|
|
|
esac
|
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
2000-04-20 00:03:49 +08:00
|
|
|
|
|
|
|
ARCH_INSTALL_POST='%{nil}'
|
2011-03-25 20:45:11 +08:00
|
|
|
LIB=lib
|
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
2000-04-20 00:03:49 +08:00
|
|
|
|
2008-04-11 00:36:03 +08:00
|
|
|
# XXX FIXME: incomplete and quite likely wrong too in places,
|
|
|
|
# consult various arch folks for correct names etc.
|
|
|
|
ISANAME=
|
|
|
|
ISABITS=
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=
|
|
|
|
CANONCOLOR=
|
|
|
|
FILTER=cat
|
2008-04-11 00:36:03 +08:00
|
|
|
case "${ARCH}" in
|
2008-10-01 15:06:27 +08:00
|
|
|
sparc64*)
|
2008-04-11 00:36:03 +08:00
|
|
|
ISANAME=sparc
|
2008-10-01 15:06:27 +08:00
|
|
|
ISABITS=64
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=sparc64
|
|
|
|
CANONCOLOR=3
|
2008-04-11 00:36:03 +08:00
|
|
|
;;
|
2008-10-01 15:06:27 +08:00
|
|
|
sparc*)
|
2008-04-11 00:36:03 +08:00
|
|
|
ISANAME=sparc
|
2008-10-01 15:06:27 +08:00
|
|
|
ISABITS=32
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=sparc
|
|
|
|
CANONCOLOR=0
|
2008-04-11 00:36:03 +08:00
|
|
|
;;
|
|
|
|
s390)
|
|
|
|
ISANAME=s390
|
|
|
|
ISABITS=32
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=s390
|
|
|
|
CANONCOLOR=0
|
2008-04-11 00:36:03 +08:00
|
|
|
;;
|
|
|
|
s390x)
|
|
|
|
ISANAME=s390
|
|
|
|
ISABITS=64
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=s390x
|
|
|
|
CANONCOLOR=3
|
2008-04-11 00:36:03 +08:00
|
|
|
;;
|
2008-10-01 15:06:27 +08:00
|
|
|
ppc64*)
|
2008-04-11 00:36:03 +08:00
|
|
|
ISANAME=ppc
|
2008-10-01 15:06:27 +08:00
|
|
|
ISABITS=64
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=ppc64
|
|
|
|
CANONCOLOR=3
|
2008-04-11 00:36:03 +08:00
|
|
|
;;
|
2008-10-01 15:06:27 +08:00
|
|
|
ppc*)
|
2008-04-11 00:36:03 +08:00
|
|
|
ISANAME=ppc
|
2008-10-01 15:06:27 +08:00
|
|
|
ISABITS=32
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=ppc
|
|
|
|
CANONCOLOR=0
|
2008-04-11 00:36:03 +08:00
|
|
|
;;
|
|
|
|
i?86|pentium?|athlon|geode)
|
|
|
|
ISANAME=x86
|
|
|
|
ISABITS=32
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=i386
|
|
|
|
CANONCOLOR=0
|
2008-04-11 00:36:03 +08:00
|
|
|
;;
|
|
|
|
x86_64|amd64|ia32e)
|
|
|
|
ISANAME=x86
|
|
|
|
ISABITS=64
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=x86_64
|
|
|
|
CANONCOLOR=3
|
2008-04-11 00:36:03 +08:00
|
|
|
;;
|
2008-07-08 17:59:51 +08:00
|
|
|
ia64)
|
|
|
|
ISANAME=ia
|
|
|
|
ISABITS=64
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=ia64
|
|
|
|
CANONCOLOR=2
|
2008-07-08 17:59:51 +08:00
|
|
|
;;
|
2008-10-22 15:22:05 +08:00
|
|
|
sh*)
|
|
|
|
ISANAME=sh
|
|
|
|
ISABITS=32
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=${ARCH}
|
|
|
|
CANONCOLOR=0
|
2008-10-22 15:22:05 +08:00
|
|
|
;;
|
2009-01-08 18:07:54 +08:00
|
|
|
arm*)
|
|
|
|
ISANAME=`echo ${ARCH} | sed "s/^\([^-]*\)-.*/\1/"`
|
|
|
|
ISABITS=32
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=arm
|
|
|
|
CANONCOLOR=0
|
2009-01-08 18:07:54 +08:00
|
|
|
;;
|
2009-03-03 14:48:12 +08:00
|
|
|
alpha*)
|
|
|
|
ISANAME=alpha
|
|
|
|
ISABITS=64
|
2011-03-25 20:39:36 +08:00
|
|
|
CANONARCH=alpha
|
|
|
|
CANONCOLOR=0
|
|
|
|
;;
|
|
|
|
noarch)
|
|
|
|
CANONARCH=noarch
|
|
|
|
CANONCOLOR=0
|
|
|
|
FILTER="grep -v -E '^(%optflag|%__isa)'"
|
2009-03-03 14:48:12 +08:00
|
|
|
;;
|
2008-04-11 00:36:03 +08:00
|
|
|
esac
|
|
|
|
|
2011-03-25 20:03:23 +08:00
|
|
|
# skip architectures for which we dont have full config parameters
|
2011-03-25 20:39:36 +08:00
|
|
|
[ -z "$CANONARCH" ] && continue
|
2011-03-25 20:03:23 +08:00
|
|
|
|
2011-03-25 20:45:11 +08:00
|
|
|
if [ "$OS" = "linux" ] && [ "$CANONCOLOR" = 3 ]; then
|
|
|
|
LIB=${LIB}64
|
|
|
|
fi
|
|
|
|
|
2011-03-25 20:03:23 +08:00
|
|
|
PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
|
|
|
|
[ -d $PPD ] || mkdir -p $PPD
|
|
|
|
|
2001-01-18 00:00:36 +08:00
|
|
|
cat $PLATFORM \
|
|
|
|
| sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
|
2011-03-25 20:39:36 +08:00
|
|
|
-e "s,@RPMCANONARCH@,$CANONARCH,g" \
|
|
|
|
-e "s,@RPMCANONCOLOR@,$CANONCOLOR," \
|
2001-08-15 22:03:03 +08:00
|
|
|
-e "s,@RPMRC_GNU@,$RPMRC_GNU," \
|
2000-05-31 17:04:55 +08:00
|
|
|
-e "s,@LIB@,$LIB," \
|
|
|
|
-e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
|
2002-07-31 01:07:39 +08:00
|
|
|
-e '/\${\w*:-/!s,\${,%{_,' \
|
2008-04-11 00:36:03 +08:00
|
|
|
-e "s,@ISANAME@,$ISANAME," \
|
|
|
|
-e "s,@ISABITS@,$ISABITS," \
|
2011-03-25 19:22:53 +08:00
|
|
|
-e "s,^@${VENDOR}@,," \
|
2001-01-18 00:00:36 +08:00
|
|
|
| grep -v '^@' \
|
2011-03-25 20:39:36 +08:00
|
|
|
| ${FILTER} \
|
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
2000-04-20 00:03:49 +08:00
|
|
|
> ${PPD}/macros
|
|
|
|
|
|
|
|
done
|