From: Maximilian Friedersdorff Date: Mon, 25 Sep 2017 11:17:33 +0000 (+0100) Subject: Add slackbuild for mailcheck X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=0b9b079bc34f758f2bdeb5f20afaede7674e7747;p=max%2Fslackbuilds.git Add slackbuild for mailcheck --- diff --git a/office/mailcheck/mailcheck.SlackBuild b/office/mailcheck/mailcheck.SlackBuild new file mode 100644 index 0000000..b612487 --- /dev/null +++ b/office/mailcheck/mailcheck.SlackBuild @@ -0,0 +1,104 @@ +#!/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 . + + +# 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 diff --git a/office/mailcheck/mailcheck.info b/office/mailcheck/mailcheck.info new file mode 100644 index 0000000..4d72902 --- /dev/null +++ b/office/mailcheck/mailcheck.info @@ -0,0 +1,8 @@ +PRGNAM="mailcheck" +VERSION="1.91.2" +HOMEPAGE="http://mailcheck.sourceforge.net/" +DOWNLOAD="https://downloads.sourceforge.net/project/mailcheck/mailcheck/1.91.2/mailcheck_1.91.2.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fmailcheck%2Ffiles%2F&ts=1506336830&use_mirror=netcologne" +MD5SUM="d2a3a22a65b1006d213d8cb3f4738070" +REQUIRES="" +MAINTAINER="Maximilian Friedersdorff" +EMAIL="max@friedersdorff.com" diff --git a/office/mailcheck/slack-desc b/office/mailcheck/slack-desc new file mode 100644 index 0000000..13d3608 --- /dev/null +++ b/office/mailcheck/slack-desc @@ -0,0 +1,19 @@ +# 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: