Initial import of sma from Jim Geovedi <jim@corebsd.or.id>.

SMA is a program that analyses mail log files and produces a nice
summary of mail activity. It works by taking its input from files
or standard input and outputting the results to standard output or
file. All error messages and debugging information are printed to
standard error.

WWW: http://www.klake.org/sma/

ok couderc@
This commit is contained in:
grange 2002-12-11 15:34:55 +00:00
parent 290fc199c6
commit 5ca92a71dc
7 changed files with 169 additions and 0 deletions

35
mail/sma/Makefile Normal file
View File

@ -0,0 +1,35 @@
# $OpenBSD: Makefile,v 1.1.1.1 2002/12/11 15:34:55 grange Exp $
COMMENT= "Sendmail Log Analysis Report"
VERSION= 1.3.2
DISTNAME= sma-${VERSION}
CATEGORIES= mail
HOMEPAGE= http://www.klake.org/sma/
MAINTAINER= Jim Geovedi <jim@corebsd.or.id>
# BSD
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= http://www.klake.org/sma/dl/
NO_REGRESS= Yes
ALL_TARGET= sma
pre-patch:
@perl -pi -e 's,./sma.conf,${SYSCONFDIR}/sma.conf,g' \
${WRKSRC}/docs/sma.8 ${WRKSRC}/conf.h
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sma ${PREFIX}/bin/sma
${INSTALL_MAN} ${WRKSRC}/docs/sma.8 ${PREFIX}/man/man8/sma.8
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/sma
${INSTALL_DATA} ${WRKSRC}/sma.conf ${PREFIX}/share/examples/sma
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/sma
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/sma
.include <bsd.port.mk>

3
mail/sma/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (sma-1.3.2.tar.gz) = f7fc3f4fc16ae13f15cc6f3313c958a3
RMD160 (sma-1.3.2.tar.gz) = e20dd1f202781e899e768a39323293cc0e45c890
SHA1 (sma-1.3.2.tar.gz) = f6420ee4e9a44527182f7e4504b812ed0628944a

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2002/12/11 15:34:55 grange Exp $
--- Makefile.orig Thu Nov 14 20:09:54 2002
+++ Makefile Wed Dec 11 13:42:53 2002
@@ -2,12 +2,12 @@
# $Id: patch-Makefile,v 1.1.1.1 2002/12/11 15:34:55 grange Exp $
#
-BINDIR = /usr/local/bin
-MANDIR = /usr/local/man/man8
+BINDIR ?= /usr/local/bin
+MANDIR ?= /usr/local/man/man8
-CC = gcc
+CC ?= gcc
# XPG3 regular expressions (GNU/BSD/SVR4)
-CFLAGS = -Wall -O -DUSE_REGEXP
+CFLAGS += -DUSE_REGEXP
# Others
#CFLAGS = -Wall -O
@@ -16,7 +16,7 @@ PROG = sma
OBJS = sma.o getopt.o parse.o utils.o hash.o html.o ascii.o init.o
$(PROG): $(OBJS)
- $(CC) $(CFLAGS) -o $(PROG) $(OBJS)
+ $(CC) $(LDFLAGS) -o $(PROG) $(OBJS)
cp docs/$(MAN) .
clean:

25
mail/sma/pkg/DEINSTALL Normal file
View File

@ -0,0 +1,25 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.1.1.1 2002/12/11 15:34:55 grange Exp $
#
# sma de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=${SYSCONFDIR}/sma.conf
if [ -f $CONFIG_FILE ]; then
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you need to perform"
echo "| this step as root:"
echo "|"
echo "| rm -f $CONFIG_FILE"
echo "|"
echo "| Do not do this if you plan on re-installing $1"
echo "| at some future time."
echo "+---------------"
echo
fi
exit 0

7
mail/sma/pkg/DESCR Normal file
View File

@ -0,0 +1,7 @@
SMA is a program that analyses mail log files and produces a nice
summary of mail activity. It works by taking its input from files
or standard input and outputting the results to standard output or
file. All error messages and debugging information are printed to
standard error.
WWW: ${HOMEPAGE}

63
mail/sma/pkg/INSTALL Normal file
View File

@ -0,0 +1,63 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1.1.1 2002/12/11 15:34:55 grange Exp $
#
# Pre/post-installation setup of sma
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=${SYSCONFDIR}/sma.conf
SAMPLE_CONFIG_FILE=$PREFIX/share/examples/sma/sma.conf
do_notice()
{
echo
echo "+------------"
echo "| The existing $1 configuration file in $CONFIG_FILE"
echo "| has NOT been changed."
echo "| You may want to compare it to the current sample"
echo "| file in $SAMPLE_CONFIG_FILE"
echo "| and update your configuration as needed."
echo "+------------"
}
do_install()
{
install -o root -g wheel $SAMPLE_CONFIG_FILE $CONFIG_FILE
echo
echo "+------------"
echo "| The $1 configuration file has been installed"
echo "| into $CONFIG_FILE. Please view this file and"
echo "| change the configuration to meet your needs."
echo "+------------"
}
# verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
if [ ! -f $CONFIG_FILE ]; then
do_install $1
else
do_notice $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

7
mail/sma/pkg/PLIST Normal file
View File

@ -0,0 +1,7 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2002/12/11 15:34:55 grange Exp $
bin/sma
man/man8/sma.8
share/doc/sma/README
share/examples/sma/sma.conf
@dirrm share/examples/sma
@dirrm share/doc/sma