#!/bin/sh # SlackBuild by Robert Stan PN=imap PV=0205032002 ARCH=i386 BUILD=1rob DOCS="docs tools CONTENTS CPYRIGHT README SUPPORT WARNING" CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-$PN 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 # Explode the package framework: cd $PKG explodepkg $CWD/_$PN.tar.gz cd $TMP tar xvfZ $CWD/$PN-2002.DEV.SNAP-0205032002.tar.Z cd $PN-2002.DEV.SNAP-0205032002 echo "Building $PN-$PV ..." CFLAGS=-O2 LDFLAGS=-s \ make slx \ SSLTYPE=unix \ SSLDIR=/usr \ SSLCERTS=/etc/ssl/certs for i in imapd/imapd ipopd/ipop3d ; do chmod 755 $i ; strip $i cp -fa $i $PKG/usr/sbin done for i in src/c-client/rfc822.h src/c-client/mail.h \ c-client/linkage.h src/c-client/misc.h ; do cp -fa $i $PKG/usr/include done cp -fa c-client/c-client.a $PKG/usr/lib find . -name "*.8c" -exec cp -a {} $PKG/usr/man/man8 \; gzip -9 $PKG/usr/man/man8/* # Copy the docs mkdir -p $PKG/usr/doc/$PN-$PV cp -a $DOCS $PKG/usr/doc/$PN-$PV rm -rf $PKG/usr/doc/$PN-$PV/docs/rfc # Add the description - edit it first cat $CWD/imapd.txt > $TMP/imapd-${PV}-${ARCH}-${BUILD}.txt cat $CWD/imapd.txt > $PKG/install/slack-desc # Build the package: chown -R root.root $PKG cd $PKG tar czvf $TMP/imapd-${PV}-${ARCH}-${BUILD}.tgz . # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PN-$PV rm -rf $PKG fi