#!/bin/bash # minicom.SlackBuild # by Stuart Winter for the Slackware porting Project. # Heavily based on the original Slackware build script. # 03-Jun-2004 # Paths to skeleton port's source & real Slackware source tree: export CWD=$SLACKSOURCE/a/minicom export PORTCWD=$PWD # Temporary build locations: export TMPBUILD=$TMP/build-$PKGNAM export PKG=$TMP/package-$PKGNAM mkpkgdirs # Delete & re-create temporary directories then cd into $TMPBUILD # Determine the CFLAGS for the known architectures: case $ARCH in arm) export SLKCFLAGS="-O2 -march=armv4t" export LIBDIRSUFFIX="" ;; *) export SLKCFLAGS="-O2" ;; esac ########## minicom ############################################# # Extract source: tar xvvf $CWD/$PKGNAM-$VERSION.tar.gz cd minicom-* || exit 1 slackhousekeeping # Fix re-declaration of BC in termcap.h zcat $CWD/wintcap.diff.gz | patch -p1 --verbose || exit 1 # The following command renames the internal implementation of getline # to g_getline as newer versions of Glibc provide an incompatible version: sed -i -e "s/getline/g_&/" $(grep -lr getline *) # Configure: CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc || failconfig # Build: make $NUMJOBS || make || failmake make install DESTDIR=$PKG || failinstall # Install config stuff: mkdir -p $PKG/etc zcat $CWD/minicom.users.gz > $PKG/etc/minicom.users.new zcat $CWD/minirc.dfl.gz > $PKG/etc/minirc.dfl.new # Docs: mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a ABOUT-NLS AUTHORS COPYING ChangeLog FILE_ID.DIZ INSTALL NEWS README TODO doc \ $PKG/usr/doc/$PKGNAM-$VERSION ########## lrzsz ############################################# # Extract & patch source: cd $TMPBUILD tar xvvf $CWD/lrzsz_0.12.21.orig.tar.gz cd lrzsz-* || exit 1 slackhousekeeping # Make x86_64 a valid machine type (thanks to Fred Emmott) zcat $CWD/config.sub-x86_64.diff.gz | patch -p1 --verbose || exit 1 zcat $CWD/lrzsz_0.12.21-4.diff.gz | patch -p1 --verbose || exit 1 # Configure: ./configure \ --prefix=/usr \ --build=$ARCH-slackware-linux-gnueabi || failconfig # Build: make $NUMJOBS || make || failmake cd src # Install binaries: install -m755 lrz lsz $PKG/usr/bin # Install man pages: cd ../man install -m644 lrz.1 lsz.1 $PKG/usr/man/man1 ( cd $PKG/usr/man/man1 ln -fs lrz.1 rz.1 ln -fs lsz.1 sz.1 ) # Locale data: cd ../po mkdir -p $PKG/usr/share/locale/de/LC_MESSAGES install -m644 de.gmo $PKG/usr/share/locale/de/LC_MESSAGES/lrzsz.mo cd .. # Install docs: 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 ################################################################## # Enter the package's root: cd $PKG # Fix up package: ( cd usr/bin ; rm -rf rx ; ln -sf rz rx ) ( cd usr/bin ; rm -rf rb ; ln -sf rz rb ) ( cd usr/bin ; rm -rf sb ; ln -sf sz sb ) ( cd usr/bin ; rm -rf sx ; ln -sf sz sx ) ( cd usr/bin ; rm -rf rz ; ln -sf lrz rz ) ( cd usr/bin ; rm -rf lrb ; ln -sf lrz lrb ) ( cd usr/bin ; rm -rf lrx ; ln -sf lrz lrx ) ( cd usr/bin ; rm -rf sz ; ln -sf lsz sz ) ( cd usr/bin ; rm -rf lsb ; ln -sf lsz lsb ) ( cd usr/bin ; rm -rf lrx ; ln -sf lsz lrx ) ################################################################ # If necessary, start the fakeroot server so we can set file/dir ownerships: start_fakeroot # Apply generic Slackware packaging policies: cd $PKG slackstripall # strip all .a archives and all ELFs slackgzpages -i # compress man & info pages and delete usr/info/dir slackslack # chown -R root:root, chmod -R og-w, slackchown, slack644docs slackdesc # install slack-desc and doinst.sh slackmp # run makepkg -l y -c n # Perform any final checks on the package: cd $PKG slackhlinks # search for any hard links