From 651988f1275f96bc5f3af97862aa5c73615f12c4 Mon Sep 17 00:00:00 2001 From: John Regan Date: Fri, 17 Jun 2016 15:57:30 -0500 Subject: [PATCH] New package: libmilter-1.0.2 --- common/shlibs | 1 + srcpkgs/libmilter/files/site.config.m4 | 3 + .../patches/enabled-shared-library.patch | 58 +++++++++++++++++++ srcpkgs/libmilter/patches/musl-fix.patch | 12 ++++ srcpkgs/libmilter/template | 56 ++++++++++++++++++ 5 files changed, 130 insertions(+) create mode 100644 srcpkgs/libmilter/files/site.config.m4 create mode 100644 srcpkgs/libmilter/patches/enabled-shared-library.patch create mode 100644 srcpkgs/libmilter/patches/musl-fix.patch create mode 100644 srcpkgs/libmilter/template diff --git a/common/shlibs b/common/shlibs index f5f2014ef7..995bce92e5 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2555,3 +2555,4 @@ libply.so.2 plymouth-0.8.8_1 libply-splash-core.so.2 plymouth-0.8.8_1 libply-splash-graphics.so.2 plymouth-0.8.8_1 libply-boot-client.so.2 plymouth-0.8.8_1 +libmilter.so.1.0.2 libmilter-1.0.2_1 diff --git a/srcpkgs/libmilter/files/site.config.m4 b/srcpkgs/libmilter/files/site.config.m4 new file mode 100644 index 0000000000..f306d1e94d --- /dev/null +++ b/srcpkgs/libmilter/files/site.config.m4 @@ -0,0 +1,3 @@ +APPENDDEF(`conf_libmilter_ENVDEF',`-D_FFR_WORKERS_POOL=1 -DMIN_WORKERS=4') +APPENDDEF(`conf_libmilter_ENVDEF',`-DSM_CONF_POLL=1') +APPENDDEF(`conf_libmilter_ENVDEF',`-fPIC') diff --git a/srcpkgs/libmilter/patches/enabled-shared-library.patch b/srcpkgs/libmilter/patches/enabled-shared-library.patch new file mode 100644 index 0000000000..a2629cb293 --- /dev/null +++ b/srcpkgs/libmilter/patches/enabled-shared-library.patch @@ -0,0 +1,58 @@ +diff --git devtools/M4/UNIX/milterlibrary.m4 devtools/M4/UNIX/milterlibrary.m4 +new file mode 100644 +index 0000000..5b13615 +--- /dev/null ++++ devtools/M4/UNIX/milterlibrary.m4 +@@ -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 --git libmilter/Makefile.m4 libmilter/Makefile.m4 +index 0ad4501..8ee339b 100644 +--- libmilter/Makefile.m4 ++++ libmilter/Makefile.m4 +@@ -9,7 +9,7 @@ define(`confMT', `true') + 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') diff --git a/srcpkgs/libmilter/patches/musl-fix.patch b/srcpkgs/libmilter/patches/musl-fix.patch new file mode 100644 index 0000000000..d3490381b9 --- /dev/null +++ b/srcpkgs/libmilter/patches/musl-fix.patch @@ -0,0 +1,12 @@ +diff --git devtools/OS/Linux devtools/OS/Linux +index bc02f82..9dc3862 100644 +--- devtools/OS/Linux ++++ devtools/OS/Linux +@@ -9,7 +9,6 @@ define(`confSM_OS_HEADER', `sm_os_linux') + define(`confMANROOT', `/usr/man/man') + define(`confLIBS', `-ldl') + define(`confEBINDIR', `/usr/sbin') +-APPENDDEF(`confLIBSEARCH', `crypt nsl') + + define(`confLD', `ld') + define(`confMTCCOPTS', `-D_REENTRANT') diff --git a/srcpkgs/libmilter/template b/srcpkgs/libmilter/template new file mode 100644 index 0000000000..1748403ae7 --- /dev/null +++ b/srcpkgs/libmilter/template @@ -0,0 +1,56 @@ +# Template file for 'libmilter' +pkgname=libmilter +version=1.0.2 +revision=1 +_pkgname=sendmail +_version=8.15.2 +hostmakedepends="m4" +short_desc="Implementation of the sendmail Mail Filter API" +maintainer="John Regan " +license="Sendmail" +homepage="https://www.milter.org/developers/api/" +distfiles="ftp://ftp.sendmail.org/pub/${_pkgname}/${_pkgname}.${_version}.tar.gz" +checksum=24f94b5fd76705f15897a78932a5f2439a32b1a2fdc35769bb1a5f5d9b4db439 +wrksrc="${_pkgname}-${_version}" + +pre_build() { + cp "${FILESDIR}/site.config.m4" devtools/Site/site.config.m4 + cat >> devtools/Site/site.config.m4 <> devtools/Site/site.config.m4 + ;; + *) + echo "APPENDDEF(\`confLIBSEARCH', \`crypt nsl')" >> devtools/Site/site.config.m4 + ;; + esac +} + +do_build() { + make -j1 -C libmilter MILTER_SOVER=${version} +} + +do_install() { + install -d "${DESTDIR}/usr/lib" + make -j1 -C libmilter MILTER_SOVER=${version} DESTDIR="${DESTDIR}" install +} + +post_install() { + vlicense LICENSE +} + +libmilter-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/lib/*.a + vmove usr/lib/*.so + } +}