diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-07-31 20:45:44 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-07-31 20:45:44 +0000 |
commit | 3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc (patch) | |
tree | 59f0163f13e99eefb959385243c564c5662bc5c2 /patches/pine/pine.SlackBuild | |
download | slackbuilds-3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc.tar.gz slackbuilds-3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc.tar.bz2 |
initial import
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'patches/pine/pine.SlackBuild')
-rwxr-xr-x | patches/pine/pine.SlackBuild | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/patches/pine/pine.SlackBuild b/patches/pine/pine.SlackBuild new file mode 100755 index 00000000..ee292f99 --- /dev/null +++ b/patches/pine/pine.SlackBuild @@ -0,0 +1,147 @@ +#!/bin/bash +# +# got it from ftp://ftp.slackware.com/pub/slackware/slackware-10.2/patches/source/pine/pine.SlackBuild +# small changes by rhatto +# + +# Set initial variables: + +CWD="`pwd`" + +if [ -f "/etc/slackbuildrc" ]; then + source /etc/slackbuildrc +fi + +if [ -f "~/.slackbuildrc" ]; then + source ~/.slackbuildrc +fi + +VERSION=${VERSION:=4.64} +PINEPGP=${PINEPGP:=0.18.0} +ARCH=${ARCH:=x86_64} +PINEBUILD=${BUILD:=1rha} +IMAPDBUILD=${BUILD:=1rha} + +TMP=${TMP:=/tmp} +SRC_DIR=${SRC:=$CWD} + +PKG1=$TMP/package-pine +PKG2=$TMP/package-imapd + +RTOOL="wget" +SRC="pine$VERSION.tar.bz2" +URL="ftp://ftp.slackware.com/pub/slackware/slackware-10.2/patches/source/pine/$SRC" +PGP="pinepgp-$PINEPGP.tar.gz" +PGP_URL="ftp://ftp.slackware.com/pub/slackware/slackware-10.2/patches/source/pine/$PGP" + +if [ "$RTOOL" == "wget" ]; then + + if [ ! -f "$SRC_DIR/$SRC" ]; then + wget "$URL" -O "$SRC_DIR/$SRC" + fi + + if [ ! -f "$SRC_DIR/$PGP" ]; then + wget "$PGP_URL" -O "$SRC_DIR/$PGP" + fi + +fi + +if [ ! -d $TMP ]; then + mkdir -p $TMP # location to build the source +fi +rm -rf $PKG1 $PKG2 +mkdir -p $PKG1 $PKG2 + +# Explode the package framework: +cd $PKG1 +explodepkg $CWD/_pine.tar.gz +cd $PKG2 +explodepkg $CWD/_imapd.tar.gz + +echo "+==========+" +echo "| pine$VERSION |" +echo "+==========+" +cd $TMP +rm -rf pine$VERSION +tar xjvf $SRC_DIR/$SRC +cd pine$VERSION + +if [ "$ARCH" == "x86_64" ]; then + ( cd imap/src/osdep/unix; zcat $CWD/fpic.diff.gz | patch -p0 --verbose -E || exit ) +fi + +zcat $CWD/pine-slackware.config.diff.gz | patch -p1 --backup --verbose -E || exit + +# Set default debug level to 0: +zcat $CWD/pine.debug.diff.gz | patch -p1 --backup --verbose -E || exit +echo "#define PASSFILE \".pine.pwd\"" >> pine/osdep/os-lnx.h +# Remove ~ files: +find . -name "*~" | xargs rm --verbose +mkdir $PKG1/usr/doc/pine$VERSION +cp -a README CPYRIGHT $PKG1/usr/doc/pine$VERSION +( cd doc ; cp -a * $PKG1/usr/doc/pine$VERSION ) +( cd $PKG1/usr/doc/pine$VERSION ; rm *.1 tech-notes.txt ) +( cd $PKG1/usr/doc/pine$VERSION ; chown -R root.root * ) +mkdir -p $PKG2/usr/doc/pine$VERSION +cp -a README CPYRIGHT $PKG2/usr/doc/pine$VERSION +chown root.root $PKG2/usr/doc/pine$VERSION/* + +if [ "$ARCH" == "x86_64" ]; then + ./build slx SSLLIB=/usr/lib SSLDIR=/etc/ssl SSLCERTS=/etc/ssl/certs SSLINCLUDE=/usr/include/openssl SSLTYPE=unix OPTIMIZE="-O2" DEBUG=-O2 CC="gcc -fPIC" +else + ./build slx SSLLIB=/usr/lib SSLDIR=/etc/ssl SSLCERTS=/etc/ssl/certs SSLINCLUDE=/usr/include/openssl SSLTYPE=unix OPTIMIZE=-O2 DEBUG=-O2 +fi + +#( cd imap ; make clean ) +#( cd imap ; make slx ) +for file in doc/pico.1 doc/pilot.1 doc/pine.1 ; do + cat $file | gzip -9c > $PKG1/usr/man/man1/`basename $file`.gz +done +for file in imap/src/imapd/imapd.8 imap/src/ipopd/ipopd.8 ; do + cat $file | gzip -9c > $PKG2/usr/man/man8/`basename $file`.gz +done +cd imap/imapd +strip imapd +cat imapd > $PKG2/usr/sbin/imapd +cd ../ipopd +strip ipop3d +cat ipop3d > $PKG2/usr/sbin/ipop3d +cd ../../bin +strip * +cat pico > $PKG1/usr/bin/pico +cat pilot > $PKG1/usr/bin/pilot +cat pine > $PKG1/usr/bin/pine +# Add a default system-wide config file: +$PKG1/usr/bin/pine -conf > $PKG1/etc/pine.conf + +# Add slack-desc files: +mkdir -p $PKG1/install +cat $CWD/slack-desc.pine > $PKG1/install/slack-desc +mkdir -p $PKG2/install +cat $CWD/slack-desc.imapd > $PKG2/install/slack-desc + +# Add pinepgp support: +cd $TMP +tar xzvf $SRC_DIR/pinepgp-$PINEPGP.tar.gz +cd pinepgp-$PINEPGP +chown -R root.root . +./configure --prefix=/usr +make +make install DESTDIR=$PKG1 +chown root.bin $PKG1/usr/bin/* +mkdir -p $PKG1/usr/doc/pinepgp-$PINEPGP +cp -a COPYING README $PKG1/usr/doc/pinepgp-$PINEPGP +chmod 644 $PKG1/usr/doc/pinepgp-$PINEPGP/* + +# Build the package: +cd $PKG1 +makepkg -l y -c n $TMP/pine-$VERSION-$ARCH-$PINEBUILD.tgz +cd $PKG2 +makepkg -l y -c n $TMP/imapd-$VERSION-$ARCH-$IMAPDBUILD.tgz + +# Clean up the extra stuff: +if [ "$1" = "--cleanup" ]; then + rm -rf $TMP/pine$VERSION + rm -rf $PKG1 + rm -rf $PKG2 +fi |