#!/bin/sh # BitchX SlackBuild by Laetitia # Set initial variables: NAME=bitchx VERSION=1.0c19 ARCH=i686 BUILD=1v6 DOCS="README* COMPILE-PROBLEMS INST* IPv6-support doc/* BitchX.help BitchX.ircnames BitchX.quit BitchX.reasons" PATCHES="BitchX-$VERSION" SLACKDESC="# HOW TO EDIT THIS FILE: # The \"handy ruler\" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. # |-----handy-ruler------------------------------------------------------| bitchx: BitchX (chat client) bitchx: bitchx: BitchX is an advanced Internet Relay Chat (IRC) client. bitchx: bitchx: bitchx: bitchx: bitchx: bitchx: bitchx: bitchx:" CWD=`pwd` if [ "$TMP" = "" ] then TMP=/tmp fi PKG=$TMP/package-$NAME if [ ! -d $TMP ] then mkdir -p $TMP # location to build the source fi if [ ! -d $PKG ] then mkdir -p $PKG # place for the package to be built fi cd $TMP tar xzvf $CWD/ircii-pana-$VERSION.tar.gz cd BitchX # Apply patches: for i in $PATCHES do zcat $CWD/$i.patch.gz | patch -p1 done # Compile: CFLAGS=-O2 LDFLAGS="-linet6 -s" ./configure --prefix=/usr \ --enable-cdrom \ --with-ssl \ --with-plugins \ --with-maildir \ --enable-ipv6 make # Install: make install DESTDIR=$PKG chown -R root.bin $PKG/usr/bin chown -R root.root $PKG/usr/lib find $PKG/usr/lib -type d -exec chmod 755 {} \; find $PKG/usr/lib/bx/{help,translation,script,BitchX.*} -type f -exec chmod 644 {} \; find $PKG/usr/lib/bx/{plugins,wserv} -type f -exec chmod 755 {} \; # Compress manpages: bzip2 -d $PKG/usr/man/man1/BitchX.1.bz2 gzip -9 $PKG/usr/man/man1/* chown -R root.root $PKG/usr/man find $PKG/usr/man -type f -exec chmod 644 {} \; find $PKG/usr/man -type d -exec chmod 755 {} \; # Copy the docs: mkdir -p $PKG/usr/doc/BitchX-$VERSION cp -a $DOCS $PKG/usr/doc/BitchX-$VERSION chown -R root.root $PKG/usr/doc/BitchX-$VERSION find $PKG/usr/doc/BitchX-$VERSION -type f -exec chmod 644 {} \; find $PKG/usr/doc/BitchX-$VERSION -type d -exec chmod 755 {} \; # Add the description: mkdir -p $PKG/install echo -e "$SLACKDESC" > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/$NAME-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/BitchX rm -rf $PKG fi