#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-mc VERSION=4.6.1 ARCH=alpha BUILD=2 TARGET=$ARCH-alphaslack-linux mkdir -p $PKG/usr ( cd $TMP tar xjf $CWD/mc-$VERSION.tar.bz2 cd mc-$VERSION zcat $CWD/mc-4.6.1.php.syntax.diff.gz | patch -p1 --verbose || exit 1 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="-O3" ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --enable-charset \ --without-gpm-mouse \ --with-x=no \ --with-mcfs \ --disable-largefile \ --with-glib12 \ --without-samba \ --with-screen=mcslang \ $TARGET || exit # --without-ext2undel \ make || exit make DESTDIR=$PKG install || exit ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) mkdir -p $PKG/etc/profile.d cat $PKG/usr/share/mc/bin/mc.csh > $PKG/etc/profile.d/mc.csh cat $PKG/usr/share/mc/bin/mc.sh > $PKG/etc/profile.d/mc.sh chmod 644 $PKG/etc/profile.d/* strip $PKG/usr/bin/mc $PKG/usr/lib/mc/cons.saver $PKG/usr/bin/mcmfmt $PKG/usr/sbin/mcserv chown -R root.bin $PKG/usr/bin $PKG/usr/sbin ( cd $PKG/usr/man find . -name "*.?" -type f | xargs gzip -9 ) mkdir -p $PKG/usr/doc/mc-$VERSION cp -a ABOUT-NLS AUTHORS COPYING FAQ INSTALL INSTALL.FAST MAINTAINERS NEWS README* $PKG/usr/doc/mc-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/mc-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/mc.build.log