--- /dev/null
+#!/bin/sh -e
+
+# Slackware build script for mailcheck
+
+# Copyright 2017 Maximilian Friederdorff
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# set up some variables for the build process
+CWD=$(pwd)
+if [ "$TMP" = "" ]; then
+ TMP=/tmp
+fi
+
+APP="mailcheck"
+VERSION=${VERSION:-1.91.2}
+PKG_VERSION=$VERSION
+
+# Detect the architecture
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+NUMJOBS=${NUMJOBS:-" -j4 "}
+
+BUILD=${BUILD:-1_maf}
+PKG=$TMP/package-$APP
+
+# Clean build location in case of previous build attempts
+rm -rf $PKG
+mkdir -p $TMP $PKG
+rm -rf $TMP/$APP-$VERSION
+
+cd $TMP || exit 1
+
+# Extract sources
+tar -zxvf $CWD/${APP}_${VERSION}.tar.gz || exit 1
+cd $APP-$VERSION || exit 1
+
+# Ensure ownership and permissions are consistant
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# Build and install
+make $NUMJOBS || exit
+mkdir -p $PKG/usr/bin
+make install prefix=$PKG || exit
+
+# Install documentation
+mkdir -p $PKG/usr/doc/$APP-$VERSION
+cp -a COPYING mailcheckrc mailcheck.1 $PKG/usr/doc/$APP-$VERSION
+find $PKG/usr/doc/$APP-$VERSION -type f -exec chmod 644 {} \;
+cat $CWD/$APP.SlackBuild > $PKG/usr/doc/$APP-$VERSION/$APP.SlackBuild
+
+# Install slack-desc file
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Strip some libraries and binaries
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress man pages if they exist
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+ )
+fi
+
+# Compress info pages if they exist (and remove the dir file)
+if [ -d $PKG/usr/info ]; then
+ gzip -9 $PKG/usr/info/*.info
+ rm -f $PKG/usr/info/dir
+fi
+
+# Make the package
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$APP-$PKG_VERSION-$ARCH-$BUILD.tgz
--- /dev/null
+# 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------------------------------------------------------|
+mailcheck: mailcheck
+mailcheck:
+mailcheck: Mailcheck is a simple, command line, configurable tool that allows
+mailcheck: multiple mailboxes to be checked for the existence of new mail
+mailcheck: messages. It supports both mbox and maildir-style mailboxes. It also
+mailcheck: supports remote POP3 and IMAP mailboxes.
+mailcheck:
+mailcheck: Mailcheck was originally written for the Debian project.
+mailcheck:
+mailcheck: Homepage: http://mailcheck.sourceforge.net/
+mailcheck: