home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / usr / lib / rpm / cross-build < prev    next >
Text File  |  2006-11-29  |  624b  |  18 lines

  1. #!/bin/sh
  2. #
  3. # Example script to cross-build for the platform "sh-linux-gnu".
  4. #
  5. #
  6.  
  7. SHMAKE='make CC=sh-linux-gnu-gcc CONFIG_SITE=/usr/lib/rpm/config.site RANLIB=sh-linux-gnu-ranlib LD=sh-linux-gnu-ld AS=sh-linux-gnu-as GAS=sh-linux-gnu-as STRIP=sh-linux-gnu-strip CC_FOR_BUILD=gcc OBJDUMP=sh-linux-gnu-objdump AR="sh-linux-gnu-ar" CXX=sh-linux-g++'
  8.  
  9. for pkg in $@ ; do 
  10.     echo $pkg
  11.     if [ ! -r $pkg.log ]; then 
  12.         $SHMAKE RPMFILE=$pkg 2>&1 | tee $pkg.log  
  13.     if [ -r /usr/src/redhat/RPMS/sh/`echo $pkg | sed -e "s:/tmp/srpms/::" -e "s/.src.rpm/.sh.rpm/"` ]; then
  14.         mv $pkg $pkg.log /tmp/srpms/done
  15.     fi
  16.     fi
  17. done
  18.