#!/bin/bash # lynx.SlackBuild # Heavily based on the original Slackware build script, # Modified by Stuart Winter for the Slackware porting Project. # 09-Jul-2004 # Version of source archive (not necessarily aligned with the Slackware package name); # the Slackware package version matches the latest official patch level. # The package version is stored in /build # Record toolchain & other info for the build log: slackbuildinfo # Paths to skeleton port's source & real Slackware source tree: export CWD=$SLACKSOURCE/$PKGSERIES/$PKGNAM 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 # Extract source: tar xvvf $CWD/${PKGNAM}${VERSION}.tar.?z* cd $PKGNAM* || exit 1 slackhousekeeping # Apply recolorizing patch: zcat $CWD/lynx.cfg.diff.gz | patch -p1 --verbose --backup || exit 1 # Configure: ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --datadir=/usr/share/lynx \ --mandir=/usr/man \ --libdir=/usr/lib/lynx \ --enable-default-colors \ --with-screen=ncursesw \ --enable-widec \ --enable-gzip-help \ --with-zlib \ --enable-read-eta \ --enable-scrollbar \ --with-ssl \ --enable-ipv6 \ --enable-color-style \ --enable-prettysrc \ --enable-source-cache \ --enable-nsl-fork \ --enable-nls \ --enable-persistent-cookies \ --enable-vertrace \ --disable-full-paths \ --enable-addrlist-page \ --enable-charset-choice \ --enable-cjk \ --enable-htmlized-cfg \ --enable-justify-elts \ --enable-locale-charset \ --enable-externs \ --enable-cgi-links \ --enable-change-exec \ --enable-exec-links \ --enable-exec-scripts \ --enable-internal-links \ --with-bzlib \ --build=$ARCH-slackware-linux-gnueabi || failconfig # Build: make $NUMJOBS || make || failmake # Install into package: mkdir -pm755 $PKG/usr/lib/lynx make install DESTDIR=$PKG make install-help DESTDIR=$PKG make install-doc DESTDIR=$PKG # Correct $DESTDIR brokenness: ( cd $PKG/usr/share/lynx/lynx_help rm -f COPYHEADER COPYING ln -sf ../lynx_doc/COPYHEADER . ln -sf ../lynx_doc/COPYING . ) # Add documentation symlinks: ( mkdir -p $PKG/usr/doc/lynx-$PKGVER cd $PKG/usr/doc/lynx-$PKGVER ln -sf ../../share/lynx/lynx_doc . ln -sf ../../share/lynx/lynx_help . ) # If there's a ChangeLog, installing at least part of the recent history # is useful, but don't let it get totally out of control: if [ -r CHANGES ]; then DOCSDIR=$(echo $PKG/usr/share/lynx/lynx_doc) cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES touch -r CHANGES $DOCSDIR/CHANGES fi # 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