autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
gendiff po/*.in po/*.po po/rpm.pot \
python/*.am python/*.in python/*.c python/*.h python/testit \
- rpm.magic rpmpopt rpm.spec
+ rpm.magic rpmpopt rpm.spec installplatform
EXTRA_PROGRAMS = rpmconvert
LOCALEDIR="`echo ${usrprefix}/share/locale`"
AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
AC_SUBST(LOCALEDIR)
+LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`"
+AC_SUBST(LIBDIR)
RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
AC_DEFINE_UNQUOTED(RPMCONFIGDIR, "$RPMCONFIGDIR")
AC_SUBST(RPMCONFIGDIR)
RPM="./rpm --rcfile $TEMPRC"
-ARCH="`$RPM --eval '%{_arch}'`"
+arch="`$RPM --eval '%{_arch}'`"
VENDOR="`$RPM --eval '%{_vendor}'`"
OS="`$RPM --eval '%{_os}'`"
-TARGET_PLATFORM="`$RPM --eval '%{_target_platform}'`"
-TARGET="`$RPM --eval '%{_target}'`"
-
-PPD="${DESTDIR}/${pkglibdir}/${ARCH}-${VENDOR}-${OS}"
-
-[ -d $PPD ] || mkdir $PPD
-
-RPMRC_OPTFLAGS="`$RPM --eval '%{optflags}'`"
-RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e 's, ,\ ,g'`"
-
-
-cat $PLATFORM | \
- sed -e s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS, -e 's,\${,%{_,' \
-> ${PPD}/macros
-
-#
-# Better try to create these too until the smoke clears. Yuck.
-[ "${ARCH}-${VENDOR}-${OS}" = "${TARGET}" ] || ln -sf ${ARCH}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/${TARGET}
-[ "${ARCH}-${VENDOR}-${OS}" = "${TARGET_PLATFORM}" ] || ln -sf ${ARCH}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/${TARGET_PLATFORM}
+target_platform="`$RPM --eval '%{_target_platform}'`"
+target="`$RPM --eval '%{_target}'`"
+
+case "$arch" in
+ sparc*) SUBSTS="s_sparc64_sparc_ s_sparc_sparc64_" ;;
+ *) SUBST=y___ ;;
+esac
+
+for SUBST in $SUBSTS; do
+ ARCH=`echo $arch | sed -e $SUBST`
+ TARGET_PLATFORM=`echo $target_platform | sed -e $SUBST`
+ TARGET=`echo $target | sed -e $SUBST`
+ LIB=lib
+
+ PPD="${DESTDIR}/${pkglibdir}/${ARCH}-${VENDOR}-${OS}"
+
+ [ -d $PPD ] || mkdir $PPD
+
+ RPMRC_OPTFLAGS="`$RPM --eval '%{optflags}'`"
+ RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e 's, ,\ ,g'`"
+
+ ARCH_INSTALL_POST='%{nil}'
+ case "${ARCH}-${OS}" in
+ sparc64-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-sparc64-linux ;;
+ esac
+
+ cat $PLATFORM | \
+ sed -e s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS, \
+ -e s,@RPMRC_ARCH@,$ARCH, \
+ -e s,@LIB@,$LIB, \
+ -e s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST, \
+ -e 's,\${,%{_,' \
+ > ${PPD}/macros
+
+ #
+ # Better try to create these too until the smoke clears. Yuck.
+ [ "${ARCH}-${VENDOR}-${OS}" = "${TARGET}" ] || ln -sf ${ARCH}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/${TARGET}
+ [ "${ARCH}-${VENDOR}-${OS}" = "${TARGET_PLATFORM}" ] || ln -sf ${ARCH}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/${TARGET_PLATFORM}
+
+done
rm $TEMPRC
-# $Id: macros.in,v 1.50 2000/04/06 15:20:29 jbj Exp $
+# $Id: macros.in,v 1.51 2000/04/19 16:03:49 jbj Exp $
#==============================================================================
# Macro naming conventions (preliminary):
#
# XXX use the rpmrc instantiated macro for now
#%optflags -O2
+%__arch_install_post %{nil}
+%__os_install_post %{___build_post}
+
#==============================================================================
# ---- Scriptlet template templates.
# Global defaults used for building scriptlet templates.
%__spec_install_cmd %{___build_cmd}
%__spec_install_pre %{___build_pre}
%__spec_install_body %{___build_body}
-%__spec_install_post %{___build_post}
+%__spec_install_post\
+%{__arch_install_post}\
+%{__os_install_post}\
+%{nil}
%__spec_install_template #!%{__spec_install_shell}\
%{__spec_install_pre}\
%{nil}
%_sysconfdir %{_prefix}/etc
%_sharedstatedir %{_prefix}/com
%_localstatedir %{_prefix}/var
-%_libdir %{_exec_prefix}/lib
+%_lib lib
+%_libdir %{_exec_prefix}/%{_lib}
%_includedir %{_prefix}/include
%_oldincludedir /usr/include
%_infodir %{_prefix}/info
#==============================================================================
# ---- per-platform macros.
#
-%_arch @RPMCANONARCH@
+%_arch @RPMRC_ARCH@
%_vendor @RPMCANONVENDOR@
%_os @RPMCANONOS@
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
%_sysconfdir @sysconfdir@
%_sharedstatedir @sharedstatedir@
%_localstatedir @localstatedir@
-%_libdir @libdir@
+%_lib @LIB@
+%_libdir @LIBDIR@
%_includedir @includedir@
%_oldincludedir @oldincludedir@
%_infodir @infodir@
# ---- Build policy macros.
#
#------------------------------------------------------------------------
-# Expanded at end of %install (Red Hat uses these for 6.2)
+# Expanded at end of %install
#
-#%__spec_install_post \
-# /usr/lib/rpm/brp-compress \
-# /usr/lib/rpm/brp-strip \
-# /usr/lib/rpm/brp-strip-comment-note \
-#%{nil}
+%__arch_install_post @ARCH_INSTALL_POST@
+%__os_install_post %{___build_post}
+%__spec_install_post\
+ %{__arch_install_post}\
+ %{__os_install_post}\
+%{nil}
#------------------------------------------------------------------------
-# Expanded at end of %prep (Red Hat uses these for 6.2)
+# Expanded at end of %prep
#
%__id_u @__ID_U@
%__chown_Rhf @__CHOWN_RHF@
rpm alias --i18ndomains --define '_i18ndomains !#:+'
# Build policies enabled from command line. Last policy applies.
-rpm alias --buildpolicy --define '__spec_install_post @RPMCONFIGDIR@/brp-!#:+'
+rpm alias --buildpolicy --define '__os_install_post @RPMCONFIGDIR@/brp-!#:+'
# Preferred db interface:
# 0 linux glibc libdb1 routines.
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)
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
--- /dev/null
+#!/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