Solaris per-platform macros.
authorjbj <devnull@localhost>
Tue, 13 Jun 2000 09:12:39 +0000 (09:12 +0000)
committerjbj <devnull@localhost>
Tue, 13 Jun 2000 09:12:39 +0000 (09:12 +0000)
CVS patchset: 3838
CVS date: 2000/06/13 09:12:39

Makefile.am
installplatform

index ef0c2c6..87b306e 100644 (file)
@@ -118,15 +118,21 @@ install-data-local:
        done
        @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/BUILD
        @case "@build_cpu@" in \
-       *86) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/i386 ;;\
+       *86)    $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/i386;\
+               $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/i486;\
+               $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/i586;\
+               $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/i686;\
+               $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/athlon ;;\
        alpha*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/alpha ;;\
        sparc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparc;\
+               $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparcv9;\
                $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparc64 ;;\
        powerpc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/ppc ;;\
        esac
        @case "@build_os@" in \
        mint) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/m68kmint ;;\
-       linux*) chmod u+x ./installplatform; DESTDIR="$(DESTDIR)" pkglibdir="$(pkglibdir)" ./installplatform rpmrc macros platform ; \
+       solaris*|linux*) \
+          chmod u+x ./installplatform; DESTDIR="$(DESTDIR)" pkglibdir="$(pkglibdir)" ./installplatform rpmrc macros platform ; \
           $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/@build_cpu@ ;;\
        *) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/@build_cpu@ ;;\
        esac
index 8dfca14..ec993c2 100755 (executable)
@@ -27,8 +27,10 @@ OS="`$RPM --eval '%{_os}'`"
 target_platform="`$RPM --eval '%{_target_platform}'`"
 target="`$RPM --eval '%{_target}'`"
 
-ln -sf ${arch}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/noarch-${VENDOR}-${OS}
-ln -sf ${arch}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/noarch-${OS}
+rm -f ${DESTDIR}/${pkglibdir}/noarch-${VENDOR}-${OS}
+ln -s ${arch}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/noarch-${VENDOR}-${OS}
+rm -f ${DESTDIR}/${pkglibdir}/noarch-${OS}
+ln -s ${arch}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/noarch-${OS}
 
 case "$arch" in
   i[3456]86) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_' ;;
@@ -67,8 +69,14 @@ for SUBST in $SUBSTS ; do
 
   #
   # 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}
+  [ "${ARCH}-${VENDOR}-${OS}" = "${TARGET}" ] || {
+    rm -f ${DESTDIR}/${pkglibdir}/${TARGET}
+    ln -s ${ARCH}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/${TARGET}
+  }
+  [ "${ARCH}-${VENDOR}-${OS}" = "${TARGET_PLATFORM}" ] || {
+    rm -f ${DESTDIR}/${pkglibdir}/${TARGET_PLATFORM}
+    ln -s ${ARCH}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/${TARGET_PLATFORM}
+  }
 
 done