#!/bin/sh CWD=`pwd` TMP=${TMP:-/tmp} PKG=$TMP/package-minicom VERSION=2.1 ARCH=${ARCH:-x86_64} BUILD=1 if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mcpu=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" fi if [ ! -d $TMP ]; then mkdir -p $TMP fi rm -rf $PKG mkdir -p $PKG # minicom cd $TMP rm -rf minicom-$VERSION tar xzvf $CWD/minicom-$VERSION.tar.gz cd minicom-$VERSION chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc make -j3 make install DESTDIR=$PKG mkdir -p $PKG/etc zcat $CWD/minicom.users.gz > $PKG/etc/minicom.users.new zcat $CWD/minirc.dfl.gz > $PKG/etc/minirc.dfl.new gzip -9 $PKG/usr/man/man?/*.? chown -R root:bin $PKG/usr/bin mkdir -p $PKG/usr/doc/minicom-$VERSION cp -a \ ABOUT-NLS AUTHORS COPYING ChangeLog FILE_ID.DIZ INSTALL NEWS README TODO \ doc \ $PKG/usr/doc/minicom-$VERSION # lzrz # If autoconf causes failure here (which it probably will), # remove it temporarily and the build should work fine... cd $TMP tar xzvf $CWD/lrzsz_0.12.21.orig.tar.gz cd lrzsz-990823 zcat $CWD/lrzsz_0.12.21-4.diff.gz | patch -p1 --verbose chown -R root.root . ./configure \ --prefix=/usr \ $ARCH-slackware-linux make -j3 cd src cat lrz > $PKG/usr/bin/lrz cat lsz > $PKG/usr/bin/lsz chown -R root.bin $PKG/usr/bin chmod 755 $PKG/usr/bin/l*z cd ../man for page in lrz.1 lsz.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done echo '.so man1/lrz.1' | gzip -9c > $PKG/usr/man/man1/rz.1.gz echo '.so man1/lsz.1' | gzip -9c > $PKG/usr/man/man1/sz.1.gz cd ../po mkdir -p $PKG/usr/share/locale/de/LC_MESSAGES cat de.gmo > $PKG/usr/share/locale/de/LC_MESSAGES/lrzsz.mo cd .. mkdir -p $PKG/usr/doc/lrzsz-0.12.21 cp -a ABOUT-NLS AUTHORS COMPATABILITY COPYING INSTALL NEWS README-alpha \ README.cvs README.gettext README.isdn4linux README.systems \ README.tests THANKS TODO $PKG/usr/doc/lrzsz-0.12.21 ( cd $PKG ( cd usr/bin ; rm -rf rx ) ( cd usr/bin ; ln -sf rz rx ) ( cd usr/bin ; rm -rf rb ) ( cd usr/bin ; ln -sf rz rb ) ( cd usr/bin ; rm -rf sb ) ( cd usr/bin ; ln -sf sz sb ) ( cd usr/bin ; rm -rf sx ) ( cd usr/bin ; ln -sf sz sx ) ( cd usr/bin ; rm -rf rz ) ( cd usr/bin ; ln -sf lrz rz ) ( cd usr/bin ; rm -rf lrb ) ( cd usr/bin ; ln -sf lrz lrb ) ( cd usr/bin ; rm -rf lrx ) ( cd usr/bin ; ln -sf lrz lrx ) ( cd usr/bin ; rm -rf sz ) ( cd usr/bin ; ln -sf lsz sz ) ( cd usr/bin ; rm -rf lsb ) ( cd usr/bin ; ln -sf lsz lsb ) ( cd usr/bin ; rm -rf lrx ) ( cd usr/bin ; ln -sf lsz lrx ) 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/install cat $CWD/slack-desc > $PKG/install/slack-desc zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG makepkg -l y -c n $TMP/minicom-$VERSION-$ARCH-$BUILD.tgz