diff options
author | Alin Năstac <mrness@gentoo.org> | 2009-05-09 12:09:41 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2009-05-09 12:09:41 +0000 |
commit | df55b6c9376feb11ea1d6ae34f3d073e4a2f61ff (patch) | |
tree | ad7d429889477fa2ecf683830dc1ff077fbaacc9 /mail-filter/dk-milter | |
parent | Stable on x86. (diff) | |
download | gentoo-2-df55b6c9376feb11ea1d6ae34f3d073e4a2f61ff.tar.gz gentoo-2-df55b6c9376feb11ea1d6ae34f3d073e4a2f61ff.tar.bz2 gentoo-2-df55b6c9376feb11ea1d6ae34f3d073e4a2f61ff.zip |
Migrate to EAPI 2.
(Portage version: 2.1.6.7/cvs/Linux x86_64)
Diffstat (limited to 'mail-filter/dk-milter')
-rw-r--r-- | mail-filter/dk-milter/ChangeLog | 7 | ||||
-rw-r--r-- | mail-filter/dk-milter/dk-milter-1.0.1-r1.ebuild | 136 | ||||
-rw-r--r-- | mail-filter/dk-milter/dk-milter-1.0.2.ebuild | 8 | ||||
-rw-r--r-- | mail-filter/dk-milter/files/dk-milter-1.0.1-as-needed.patch | 21 |
4 files changed, 10 insertions, 162 deletions
diff --git a/mail-filter/dk-milter/ChangeLog b/mail-filter/dk-milter/ChangeLog index 17343c2bb871..8b578d615706 100644 --- a/mail-filter/dk-milter/ChangeLog +++ b/mail-filter/dk-milter/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for mail-filter/dk-milter # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/dk-milter/ChangeLog,v 1.16 2009/03/07 14:05:40 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/dk-milter/ChangeLog,v 1.17 2009/05/09 12:09:40 mrness Exp $ + + 09 May 2009; Alin Năstac <mrness@gentoo.org> + -files/dk-milter-1.0.1-as-needed.patch, -dk-milter-1.0.1-r1.ebuild, + dk-milter-1.0.2.ebuild: + Migrate to EAPI 2. *dk-milter-1.0.2 (07 Mar 2009) diff --git a/mail-filter/dk-milter/dk-milter-1.0.1-r1.ebuild b/mail-filter/dk-milter/dk-milter-1.0.1-r1.ebuild deleted file mode 100644 index 8bdaf0a4fe0a..000000000000 --- a/mail-filter/dk-milter/dk-milter-1.0.1-r1.ebuild +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/dk-milter/dk-milter-1.0.1-r1.ebuild,v 1.1 2008/12/12 06:36:18 mrness Exp $ - -inherit eutils toolchain-funcs - -DESCRIPTION="A milter-based application provide DomainKeys service" -HOMEPAGE="http://sourceforge.net/projects/dk-milter/" -SRC_URI="mirror://sourceforge/dk-milter/${P}.tar.gz" - -LICENSE="Sendmail-Open-Source" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="ipv6" - -RDEPEND="dev-libs/openssl - >=sys-libs/db-3.2" -DEPEND="${RDEPEND} - || ( mail-filter/libmilter mail-mta/sendmail )" # libmilter is a static library - -pkg_setup() { - enewgroup milter - enewuser milter -1 -1 -1 milter -} - -src_unpack() { - unpack ${A} - - epatch "${FILESDIR}"/${P}-as-needed.patch - - local ENVDEF="" - use ipv6 && ENVDEF="${ENVDEF} -DNETINET6" - sed -e "s:@@CFLAGS@@:${CFLAGS}:" \ - -e "s:@@LDFLAGS@@:${LDFLAGS}:" \ - -e "s/@@ENVDEF@@/${ENVDEF}/" \ - "${FILESDIR}/gentoo.config.m4" > "${S}/devtools/Site/site.config.m4" \ - || die "failed to generate site.config.m4" -} - -src_compile() { - emake -j1 CC="$(tc-getCC)" || die "emake failed" -} - -src_install() { - # no other program need to read from here - dodir /etc/mail/dk-filter - fowners milter:milter /etc/mail/dk-filter - fperms 700 /etc/mail/dk-filter - - newinitd "${FILESDIR}/dk-filter.init" dk-filter \ - || die "newinitd failed" - newconfd "${FILESDIR}/dk-filter.conf" dk-filter \ - || die "newconfd failed" - - # prepare directory for .pid and .sock files - dodir /var/run/dk-filter - fowners milter:milter /var/run/dk-filter - - dodir /usr/bin - emake -j1 DESTDIR="${D}" \ - SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \ - install || die "make install failed" - - # man build is broken; do man page installation by hand - doman */*.8 - - # some people like docs - dodoc README RELEASE_NOTES KNOWNBUGS *.txt -} - -pkg_postinst() { - ewarn "DomainKeys RFC is obsoleted by DKIM and therefore you should only use" - ewarn "dk-milter for verifying mail signed with DomainKeys-Signature." - echo - elog "However, if you still want to use this in sign mode, you should run" - elog " emerge --config ${CATEGORY}/${PN}" - elog "It will help you create your key and give you hints on how" - elog "to configure your DNS and MTA." -} - -pkg_config() { - local selector pubkey - - read -p "Enter the selector name (default ${HOSTNAME}): " selector - [[ -n "${selector}" ]] || selector=${HOSTNAME} - if [[ -z "${selector}" ]]; then - eerror "Oddly enough, you don't have a HOSTNAME." - return 1 - fi - if [[ -f "${ROOT}"etc/mail/dk-filter/${selector}.private ]]; then - ewarn "The private key for this selector already exists." - else - einfo "Select the size of private key:" - einfo " [1] 512 bits" - einfo " [2] 1024 bits" - while read -n 1 -s -p " Press 1 or 2 on the keyboard to select the key size " keysize ; do - [[ "${keysize}" == "1" || "${keysize}" == "2" ]] && echo && break - done - case ${keysize} in - 1) keysize=512 ;; - *) keysize=1024 ;; - esac - - # generate the private and public keys - openssl genrsa -out "${ROOT}"etc/mail/dk-filter/${selector}.private ${keysize} && \ - chown milter:milter "${ROOT}"etc/mail/dk-filter/${selector}.private && chmod u=r,g-rwx,o-rwx "${ROOT}"etc/mail/dk-filter/${selector}.private && - openssl rsa -in "${ROOT}"etc/mail/dk-filter/${selector}.private -out "${ROOT}"etc/mail/dk-filter/${selector}.public -pubout -outform PEM || \ - { eerror "Failed to create private and public keys." ; return 1; } - fi - - # dk-filter selector configuration - echo - einfo "Make sure you add these parameters to your dk-filter command line:" - einfo " -b sv -d your-domain.com -H -s /etc/mail/dk-filter/${selector}.private -S ${selector}" - - # MTA configuration - echo - einfo "If you are using Postfix, add following lines to your main.cf:" - einfo " smtpd_milters = unix:/var/run/dk-filter/dk-filter.sock" - einfo " non_smtpd_milters = unix:/var/run/dk-filter/dk-filter.sock" - - # DNS configuration - { - local line - pubkey= - while read line; do - [[ "${line}" == "--"* ]] || pubkey="${pubkey}${line}" - done - } < "${ROOT}"etc/mail/dk-filter/${selector}.public - echo - einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:" - einfo " ${selector}._domainkey IN TXT \"g=\\; k=rsa\\; t=y\\; o=~\\; p=${pubkey}\"" - echo - einfo "t=y signifies you only test the DK on your domain." - einfo "See the DomainKeys specification for more info." -} diff --git a/mail-filter/dk-milter/dk-milter-1.0.2.ebuild b/mail-filter/dk-milter/dk-milter-1.0.2.ebuild index 8626fe5cbf98..aacc7c9ad361 100644 --- a/mail-filter/dk-milter/dk-milter-1.0.2.ebuild +++ b/mail-filter/dk-milter/dk-milter-1.0.2.ebuild @@ -1,6 +1,8 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/dk-milter/dk-milter-1.0.2.ebuild,v 1.1 2009/03/07 14:05:40 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/dk-milter/dk-milter-1.0.2.ebuild,v 1.2 2009/05/09 12:09:40 mrness Exp $ + +EAPI="2" inherit eutils toolchain-funcs @@ -23,9 +25,7 @@ pkg_setup() { enewuser milter -1 -1 -1 milter } -src_unpack() { - unpack ${A} - +src_prepare() { epatch "${FILESDIR}"/${P}-as-needed.patch local ENVDEF="" diff --git a/mail-filter/dk-milter/files/dk-milter-1.0.1-as-needed.patch b/mail-filter/dk-milter/files/dk-milter-1.0.1-as-needed.patch deleted file mode 100644 index 79fc66c1d473..000000000000 --- a/mail-filter/dk-milter/files/dk-milter-1.0.1-as-needed.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Nru dk-milter-1.0.1.orig/devtools/M4/UNIX/defines.m4 dk-milter-1.0.1/devtools/M4/UNIX/defines.m4 ---- dk-milter-1.0.1.orig/devtools/M4/UNIX/defines.m4 2006-10-06 05:44:44.000000000 +0000 -+++ dk-milter-1.0.1/devtools/M4/UNIX/defines.m4 2008-12-12 06:30:55.000000000 +0000 -@@ -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 -@@ -68,7 +68,7 @@ - LIBDIRS=confLIBDIRS - - # Additional libs needed --LIBADD= ifdef(`conf_'bldCURRENT_PRD`_LIBS', `conf_'bldCURRENT_PRD`_LIBS') -+LIBADD= ifdef(`conf_'bldCURRENT_PRD`_LIBS', `conf_'bldCURRENT_PRD`_LIBS') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `') - - # libraries required on your system - LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST') |