IGNOREPATH=/etc:/home:/var:/dev:/boot:/root:/tmp:/usr/local:/mnt:/usr/src STRIPLIB=y STRIPBIN=y VERSION=2.15.90.0.3 KVERSION=2.4.9 PROGNAME="GNU binutils $VERSION" DESC="\ binutils (GNU binary development tools) \n\ \n\ Binutils is a collection of binary utilities. It includes "as" (the \n\ portable GNU assembler), "ld" (the GNU linker), and other utilities \n\ for creating and working with binary programs. \n\ \n\ These utilities are REQUIRED to compile C, C++, Objective-C, Fortran, \n\ and most other programming languages." BUILD=1 MAINTAINER="Mark Post " SOURCE=ftp://ftp.kernel.org/pub/linux/devel/binutils/ PKGNAME=binutils-$VERSION-s390xcross-$BUILD TAG=ADD compile() { tar -yxvf $CWD/binutils-$VERSION.tar.bz2 cd binutils-$VERSION/ chown -R root.root . find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; CFLAGS=-O2 LDFLAGS=-s \ ./configure --prefix=/home/s390 \ --enable-shared \ --enable-targets=s390x-slackware-linux,s390x-slackware-linux-gnulibc1,s390x-slackware-linux-gnuaout \ --enable-64-bit-bfd \ --target=s390x-slackware-linux \ --host=s390-slackware-linux make clean make make info cd $TMP tar -yxvf $CWD/ksymoops-$KVERSION.tar.bz2 cd ksymoops-$KVERSION zcat $CWD/ksymoops.dynamic.bfd.diff.gz | patch -p1 chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; make } install() { cd $TMP/ksymoops-$KVERSION make install INSTALL_PREFIX=/package-binutils/home/s390 mkdir -p /package-binutils/home/s390/usr/doc/ksymoops-$KVERSION cp -a COPYING Changelog INSTALL README* /package-binutils/home/s390/usr/doc/ksymoops-$KVERSION cd $TMP/binutils-$VERSION/ make install prefix=/package-binutils/home/s390/usr # "make install" skips this, but binutils.spec doesn't. Sneaky, huh? cp -a include/libiberty.h /package-binutils/home/s390/usr/include/libiberty.h # Fix a stupid security exposure introduced by libtool being brain dead ( cd /package-binutils/home/s390/usr/lib for lib in `grep -l /tmp *.la`;do sed -e 's%-L/tmp/[[:graph:]]*%%g' $lib > $lib.new cat $lib.new > $lib rm $lib.new done ) mkdir -p /package-binutils/home/s390/usr/doc/binutils-$VERSION cp -a $CWD/release.binutils-* COPYING* ChangeLog.linux MAI* README* \ /package-binutils/home/s390/usr/doc/binutils-$VERSION (cd /package-binutils/home/s390/usr/info rm configure.info* standards.info* ) ( cd /package-binutils/home/s390/usr/s390x-slackware-linux/bin ln -sf /home/s390/usr/bin/ar ar ln -sf /home/s390/usr/bin/as as ln -sf /home/s390/usr/bin/ld ld ln -sf /home/s390/usr/bin/nm nm ln -sf /home/s390/usr/bin/ranlib ranlib ln -sf /home/s390/usr/bin/strip strip ) ( mv /package-binutils/home/s390/usr/s390x-slackware-linux/lib/ldscripts /package-binutils/home/s390/usr/lib/ldscripts ) ( cd /package-binutils/home/s390/usr/s390x-slackware-linux/lib rm -rf ldscripts ; ln -sf /home/s390/usr/lib/ldscripts ldscripts ) ( cd /package-binutils/home/s390/usr/bin mv strings strings-GNU ) ( cd /package-binutils/home/s390/usr/man/man1 mv strings.1 strings-GNU.1 rm dlltool.1 windres.1 ) cp -a gas/doc/as.1 /package-binutils/home/s390/usr/man/man1 (cd /package-binutils/home/s390/usr/man/ for dir in 1 8; do ( cd man$dir rm -f *.gz gzip -9 *.$dir ) done ) find . -name "as.info*" -o \ -name "bfd.info*" -o \ -name "ld.info*" -o \ -name "gasp.info*" -o \ -name "gprof.info*" -o \ -name "binutils.info*" | xargs --replace=xx cp -va xx /package-binutils/home/s390/usr/info/ (cd /package-binutils/home/s390/usr/info rm -f *.gz gzip -9 * ) } attributes() { chown -R root.bin $PKG/package-binutils/home/s390/usr/bin chmod 644 $PKG/package-binutils/home/s390/usr/man/man8/ksymoops.8.gz } special () { cd $PKG mv package-binutils/* . rmdir package-binutils cd $CTL cat $CWD/slack-desc > slack-desc sed -e s%package-binutils/%% doinst.sh > doinst.new cat doinst.new > doinst.sh rm doinst.new }