diff --git a/mail/sma/Makefile b/mail/sma/Makefile new file mode 100644 index 00000000000..7f3d2de0376 --- /dev/null +++ b/mail/sma/Makefile @@ -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 + +# 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 diff --git a/mail/sma/distinfo b/mail/sma/distinfo new file mode 100644 index 00000000000..02d5d98c596 --- /dev/null +++ b/mail/sma/distinfo @@ -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 diff --git a/mail/sma/patches/patch-Makefile b/mail/sma/patches/patch-Makefile new file mode 100644 index 00000000000..79bfd7e27b2 --- /dev/null +++ b/mail/sma/patches/patch-Makefile @@ -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: diff --git a/mail/sma/pkg/DEINSTALL b/mail/sma/pkg/DEINSTALL new file mode 100644 index 00000000000..770175a2123 --- /dev/null +++ b/mail/sma/pkg/DEINSTALL @@ -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 diff --git a/mail/sma/pkg/DESCR b/mail/sma/pkg/DESCR new file mode 100644 index 00000000000..029c757d716 --- /dev/null +++ b/mail/sma/pkg/DESCR @@ -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} diff --git a/mail/sma/pkg/INSTALL b/mail/sma/pkg/INSTALL new file mode 100644 index 00000000000..eaaa0d763f2 --- /dev/null +++ b/mail/sma/pkg/INSTALL @@ -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 diff --git a/mail/sma/pkg/PLIST b/mail/sma/pkg/PLIST new file mode 100644 index 00000000000..9cfd9a25838 --- /dev/null +++ b/mail/sma/pkg/PLIST @@ -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