Browse Source

libmilter: Added libmilter 1.0.1 - The Sendmail Content Management and Filter API

user/amery/mess
Christian Wiese 14 years ago committed by Christian Wiese
parent
commit
7549d19e71
  1. 108
      mail/libmilter/libmilter-build-system.patch
  2. 74
      mail/libmilter/libmilter-sharedlib.patch
  3. 30
      mail/libmilter/libmilter.conf
  4. 42
      mail/libmilter/libmilter.desc
  5. 19
      mail/libmilter/site.config.m4.in

108
mail/libmilter/libmilter-build-system.patch

@ -0,0 +1,108 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../libmilter/libmilter-build-system.patch
# Copyright (C) 2010 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
This patch was borrowed from Gentoo Linux:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/mail-filter/libmilter/files/libmilter-build-system.patch?view=markup
diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/defines.m4 sendmail-8.14.3/devtools/M4/UNIX/defines.m4
--- sendmail-8.14.3.orig/devtools/M4/UNIX/defines.m4 2006-10-06 07:44:44.000000000 +0200
+++ sendmail-8.14.3/devtools/M4/UNIX/defines.m4 2009-09-20 10:16:43.000000000 +0200
@@ -26,7 +26,7 @@
CCLINK = ifdef(`confCCLINK', `confCCLINK', `confCC')
# Linker for libraries
LD= ifdef(`confLD', `confLD', `confCC')
-LDOPTS= ifdef(`confLDOPTS', `confLDOPTS') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
+LDOPTS= ifdef(`confLDOPTS', `confLDOPTS')
LDOPTS_SO= ${LDOPTS} ifdef(`confLDOPTS_SO', `confLDOPTS_SO', `-shared')
# Shell
@@ -71,7 +71,7 @@
LIBADD= ifdef(`conf_'bldCURRENT_PRD`_LIBS', `conf_'bldCURRENT_PRD`_LIBS')
# libraries required on your system
-LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST')
+LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
# location of sendmail binary (usually /usr/sbin or /usr/lib)
BINDIR= ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin')
diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/executable.m4 sendmail-8.14.3/devtools/M4/UNIX/executable.m4
--- sendmail-8.14.3.orig/devtools/M4/UNIX/executable.m4 2006-10-06 07:44:44.000000000 +0200
+++ sendmail-8.14.3/devtools/M4/UNIX/executable.m4 2009-09-20 10:16:43.000000000 +0200
@@ -30,12 +30,12 @@
ifdef(`bldNO_INSTALL', ,
`install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT ifdef(`bldTARGET_INST_DEP', `bldTARGET_INST_DEP')
- ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'BINDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'BINDIR}; else :; fi ')
- ${INSTALL} -c -o ${bldBIN_TYPE`'BINOWN} -g ${bldBIN_TYPE`'BINGRP} -m ${bldBIN_TYPE`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${bldINSTALL_DIR`'BINDIR}
+ ifdef(`confMKDIR', `if [ ! -d "${DESTDIR}${bldINSTALL_DIR`'BINDIR}" ]; then confMKDIR -p "${DESTDIR}${bldINSTALL_DIR`'BINDIR}"; else :; fi ')
+ ${INSTALL} -c -o ${bldBIN_TYPE`'BINOWN} -g ${bldBIN_TYPE`'BINGRP} -m ${bldBIN_TYPE`'BINMODE} bldCURRENT_PRODUCT "${DESTDIR}${bldINSTALL_DIR`'BINDIR}"
ifdef(`bldTARGET_LINKS', `bldMAKE_TARGET_LINKS(${bldINSTALL_DIR`'BINDIR}/bldCURRENT_PRODUCT, ${bldCURRENT_PRODUCT`'TARGET_LINKS})')')
strip-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT
- ${STRIP} ${STRIPOPTS} ${DESTDIR}${bldINSTALL_DIR`'BINDIR}`'/bldCURRENT_PRODUCT
+ ${STRIP} ${STRIPOPTS} "${DESTDIR}${bldINSTALL_DIR`'BINDIR}`'/bldCURRENT_PRODUCT"
bldCURRENT_PRODUCT-clean:
rm -f ${OBJS} bldCURRENT_PRODUCT ${MANPAGES}
diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/library.m4 sendmail-8.14.3/devtools/M4/UNIX/library.m4
--- sendmail-8.14.3.orig/devtools/M4/UNIX/library.m4 2006-09-06 00:56:53.000000000 +0200
+++ sendmail-8.14.3/devtools/M4/UNIX/library.m4 2009-09-20 10:16:43.000000000 +0200
@@ -27,8 +27,8 @@
ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.a
-ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'LIBDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'LIBDIR}; else :; fi ')
- ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a ${DESTDIR}${LIBDIR}')
+ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d "${DESTDIR}${LIBDIR}" ]; then confMKDIR -p "${DESTDIR}${LIBDIR}"; else :; fi ')
+ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a "${DESTDIR}${LIBDIR}"')
bldCURRENT_PRODUCT-clean:
rm -f ${OBJS} bldCURRENT_PRODUCT.a ${MANPAGES}
diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/manpage.m4 sendmail-8.14.3/devtools/M4/UNIX/manpage.m4
--- sendmail-8.14.3.orig/devtools/M4/UNIX/manpage.m4 2006-09-08 00:13:07.000000000 +0200
+++ sendmail-8.14.3/devtools/M4/UNIX/manpage.m4 2009-09-20 10:16:43.000000000 +0200
@@ -68,11 +68,11 @@
ifdef(`confNO_MAN_INSTALL', `divert(-1)', `dnl')
define(`bldMAN_INSTALL_CMD',
`ifdef(`confDONT_INSTALL_CATMAN', `dnl',
-` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC} ]; then confMKDIR -p ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}; else :; fi ')
- ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).`${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}' `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'')
+` ifdef(`confMKDIR', `if [ ! -d "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}" ]; then confMKDIR -p "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}"; else :; fi ')
+ ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).`${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}' "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}''")
ifdef(`confINSTALL_RAWMAN',
-` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN} ]; then confMKDIR -p ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}; else :; fi ')
- ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).bldGET_MAN_SOURCE_NUM($1) `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'', `dnl')'
+` ifdef(`confMKDIR', `if [ ! -d "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'" ]; then confMKDIR -p "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'"; else :; fi ')
+ ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).bldGET_MAN_SOURCE_NUM($1) "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}''", `dnl')'
)dnl
bldFOREACH(`bldMAN_INSTALL_CMD(', `bldMAN_PAGES')
ifdef(`confNO_MAN_INSTALL', `divert(0)', `dnl')
diff -Nru sendmail-8.14.3.orig/libmilter/Makefile.m4 sendmail-8.14.3/libmilter/Makefile.m4
--- sendmail-8.14.3.orig/libmilter/Makefile.m4 2009-09-20 09:53:44.000000000 +0200
+++ sendmail-8.14.3/libmilter/Makefile.m4 2009-09-20 10:18:35.000000000 +0200
@@ -32,9 +32,9 @@
MFAPI= ${SRCDIR}/inc`'lude/libmilter/mfapi.h
MFDEF= ${SRCDIR}/inc`'lude/libmilter/mfdef.h
install-mfapi: ${MFAPI}
- if [ ! -d ${DESTDIR}${INCLUDEDIR}/libmilter ]; then mkdir -p ${DESTDIR}${INCLUDEDIR}/libmilter; else :; fi
- ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFAPI} ${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h
- ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFDEF} ${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h
+ if [ ! -d "${DESTDIR}${INCLUDEDIR}/libmilter" ]; then mkdir -p "${DESTDIR}${INCLUDEDIR}/libmilter"; else :; fi
+ ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFAPI} "${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h"
+ ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFDEF} "${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h"
divert(0)
bldFINISH

74
mail/libmilter/libmilter-sharedlib.patch

@ -0,0 +1,74 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../libmilter/libmilter-sharedlib.patch
# Copyright (C) 2010 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
This patch was borrowed from Gentoo Linux:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/mail-filter/libmilter/files/libmilter-sharedlib.patch?view=markup
diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/milterlibrary.m4 sendmail-8.14.3/devtools/M4/UNIX/milterlibrary.m4
--- sendmail-8.14.3.orig/devtools/M4/UNIX/milterlibrary.m4 1970-01-01 01:00:00.000000000 +0100
+++ sendmail-8.14.3/devtools/M4/UNIX/milterlibrary.m4 2009-08-22 21:51:10.000000000 +0200
@@ -0,0 +1,39 @@
+divert(-1)
+#
+# Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
+# All rights reserved.
+#
+# By using this file, you agree to the terms and conditions set
+# forth in the LICENSE file which can be found at the top level of
+# the sendmail distribution.
+#
+#
+# Definitions for Makefile construction for sendmail
+#
+divert(0)dnl
+include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/links.m4')dnl
+bldLIST_PUSH_ITEM(`bldC_PRODUCTS', bldCURRENT_PRODUCT)dnl
+bldPUSH_TARGET(bldCURRENT_PRODUCT`.so' bldCURRENT_PRODUCT`.a')dnl
+bldPUSH_INSTALL_TARGET(`install-'bldCURRENT_PRODUCT)dnl
+bldPUSH_CLEAN_TARGET(bldCURRENT_PRODUCT`-clean')dnl
+
+include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/defines.m4')
+divert(bldTARGETS_SECTION)
+bldCURRENT_PRODUCT.so: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
+ ${CCLINK} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.so -Wl,confSONAME,bldCURRENT_PRODUCT.so.${MILTER_SOVER} ${bldCURRENT_PRODUCT`OBJS'} -lc ${LIBS}
+bldCURRENT_PRODUCT.a: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
+ ${AR} ${AROPTS} bldCURRENT_PRODUCT.a ${bldCURRENT_PRODUCT`OBJS'}
+ ${RANLIB} ${RANLIBOPTS} bldCURRENT_PRODUCT.a
+ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
+
+install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.so bldCURRENT_PRODUCT.a
+ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d "${DESTDIR}${bldINSTALL_DIR`'LIBDIR}" ]; then confMKDIR -p "${DESTDIR}${bldINSTALL_DIR`'LIBDIR}"; else :; fi ')
+ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${UBINMODE} bldCURRENT_PRODUCT.so "${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so.${MILTER_SOVER}"
+ ${LN} ${LNOPTS} bldCURRENT_PRODUCT.so.${MILTER_SOVER} "${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so"
+ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a "${DESTDIR}${LIBDIR}"')
+
+bldCURRENT_PRODUCT-clean:
+ rm -f ${OBJS} bldCURRENT_PRODUCT.so bldCURRENT_PRODUCT.a ${MANPAGES}
+
+divert(0)
+COPTS+= confCCOPTS_SO
diff -Nru sendmail-8.14.3.orig/libmilter/Makefile.m4 sendmail-8.14.3/libmilter/Makefile.m4
--- sendmail-8.14.3.orig/libmilter/Makefile.m4 2008-04-08 07:23:44.000000000 +0200
+++ sendmail-8.14.3/libmilter/Makefile.m4 2009-08-22 21:53:35.000000000 +0200
@@ -9,7 +9,7 @@
SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
-bldPRODUCT_START(`library', `libmilter')
+bldPRODUCT_START(`milterlibrary', `libmilter')
define(`bldINSTALLABLE', `true')
define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')

30
mail/libmilter/libmilter.conf

@ -0,0 +1,30 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../libmilter/libmilter.conf
# Copyright (C) 2010 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
pkg_libmilter_preconf() {
local ENVDEV="-DNETUNIX -DNETINET"
sed -e "s:@@CFLAGS@@:${CFLAGS}:" \
-e "s:@@LDFLAGS@@:${LDFLAGS}:" \
-e "s:@@CC@@:${CC}:" \
-e "s:@@ENVDEF@@:${ENVDEF}:" \
"$confdir/site.config.m4.in" > "devtools/Site/site.config.m4"
}
hook_add preconf 5 'pkg_libmilter_preconf'
# we only build libmilter
hook_add premake 9 'pushd libmilter'
var_append makeopt ' ' "MILTER_SOVER=$ver"
var_append makeinstopt ' ' "MILTER_SOVER=$ver"

42
mail/libmilter/libmilter.desc

@ -0,0 +1,42 @@
[COPY] --- SDE-COPYRIGHT-NOTE-BEGIN ---
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY]
[COPY] Filename: package/.../libmilter/libmilter.desc
[COPY] Copyright (C) 2010 The OpenSDE Project
[COPY]
[COPY] More information can be found in the files COPYING and README.
[COPY]
[COPY] This program is free software; you can redistribute it and/or modify
[COPY] it under the terms of the GNU General Public License as published by
[COPY] the Free Software Foundation; version 2 of the License. A copy of the
[COPY] GNU General Public License can be found in the file COPYING.
[COPY] --- SDE-COPYRIGHT-NOTE-END ---
[I] The Sendmail Content Management and Filter API
[T] The Sendmail Content Management API (Sendmail Milter) enables third-party
[T] programs to access mail messages as they are being processed by the Mail
[T] Transfer Agent (MTA). This allows them to examine and modify message
[T] content and meta-information during the SMTP transaction. Any of these
[T] filters can be added or changed independently of other existing Milters.
[U] http://www.sendmail.org/
[U] http://www.milter.org/
[A] Sendmail, Inc.
[M] The OpenSDE Community <list@opensde.org>
[C] base/system
[F] NOPARALLEL
[L] OpenSource
[S] Stable
[V] 1.0.1
[P] X -----5---9 115.300
[D] 3886365975 sendmail.8.14.3.tar.gz ftp://ftp.sendmail.org/pub/sendmail/
# Note:
# In order to find the right libmilter version number, check SMFI_VERSION
# definition that can be found in $xsrcdir/include/libmilter/mfapi.h
# For example, version 1.0.1 has a SMFI_VERSION of 0x01000001.

19
mail/libmilter/site.config.m4.in

@ -0,0 +1,19 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../libmilter/site.config.m4.in
# Copyright (C) 2010 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
define(`confOPTIMIZE', `@@CFLAGS@@')
define(`confLDOPTS', `@@LDFLAGS@@')
define(`confCC', `@@CC@@')
define(`confENVDEF', `@@ENVDEF@@')
define(`confCCOPTS_SO', `-fPIC')
Loading…
Cancel
Save