#!/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-$PACKAGE export PKG=$TMP/package-$PACKAGE mkpkgdirs # Delete & re-create temporary directories then cd into $TMPBUILD # Determine the CFLAGS for the known architectures: case $PORTARCH in arm) ARCH_CFLAGS="-march=armv3 -mtune=xscale" ;; powerpc) ARCH_CFLAGS="" ;; sparc) ARCH_CFLAGS="" ;; *) ARCH_CFLAGS="" ;; esac ########## minicom ############################################# # Untar source: tar zxvvf $CWD/$PACKAGE-$VERSION.tar.gz cd minicom-$VERSION slackhousekeeping # Apply patches: #zcat $CWD/minicom.lrzsz.diff.gz | patch -p1 -E --verbose --backup # Configure: CFLAGS="$ARCH_CFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc || failconfig # Make: 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/$PACKAGE-$VERSION cp -a ABOUT-NLS AUTHORS COPYING ChangeLog FILE_ID.DIZ INSTALL NEWS README TODO doc \ $PKG/usr/doc/$PACKAGE-$VERSION ########## lrzsz ############################################# # Extract & patch source: cd $TMPBUILD 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 slackhousekeeping # Configure: ./configure \ --prefix=/usr \ $ARCH-slackware-linux || failconfig # Build: 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 ) # Slackware policies: slackstripall # strip all .a archives and all ELFs slackgzpages -i # compress man & info pages and delete usr/info/dir slackslack # set all files to root.root, chmod -R og-w, slackchown, slack644docs slackdesc # install slack-desc and doinst.sh # Build the package: if [ $PORTARCH = arm ]; then . $PORTCWD/arm/pkger else makepkg -l y -c n $PKGSTORE/$PKGSERIES/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz fi # Perform any final checks on the package: cd $PKG slackhlinks # search for any hard links