Skip to content

Commit

Permalink
mail-mta/msmtp: Bump to version 1.8.1
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Lars Wendler <[email protected]>
  • Loading branch information
Lars Wendler committed Dec 11, 2018
1 parent 0b9c860 commit 8adb087
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 0 deletions.
1 change: 1 addition & 0 deletions mail-mta/msmtp/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DIST msmtp-1.6.6.tar.xz 283744 BLAKE2B 41745d9f20a33b0e4c6f7eee3ad5897c5a555a8cd1e27eb0bf7d347054d072b9eadfc7a31583e12a4f35f071aa710bb403980cba0e06920f65fdb727c786447b SHA512 30f33648b66a6b230cd38d0eee4c916a631a51bddcc1a15c9f7b324305506cb83b9c95f95def9150d0b783d38000db409981331b3c6a756232f0ce49e9b343ab
DIST msmtp-1.6.8.tar.xz 294872 BLAKE2B 156237dcc10c320ef15b368ebfe823d6f30f1a740061c5846878a8e478c1f3a3129c52af8327995933ecb15cd8cec0c18a3104993b030bcbfa09e3b0b6c2a58b SHA512 58ccdb6f16ab31959aeb1929c11f820219d4be062edca209c5986e4e0932d718f6f39c81727d05cd448779cedc4ab3e7bb557ce9f5dd3e7cc95e0aa5c3b623bf
DIST msmtp-1.8.0.tar.xz 302680 BLAKE2B 41537a883dd59e1f2281c0428aa57af985a74aeaa9aad34bdce882c3cca79ad65a796b6ef509c7546079d8f3e647eb493481ddbd5f7781a92c560986cb9958a9 SHA512 986cf8ceca847b857f3884fcef26202429b3099820aa20e4e458768a80421bfb163d8aab9d950da2190ae0e2e95bafb80f4c2647d28dbd470d78c439bfba4f77
DIST msmtp-1.8.1.tar.xz 303112 BLAKE2B 6de6c566a0de0f680f354066d1613b3b15be95c24098bdf7019e3f0289f5bce8478d2de65bf5711863617d41eb23b14b6157e25b92fce60f1cd4d33f4a593810 SHA512 00c5d8b810d48c171fc975115911c4cdf3e18efb91448800bdab320d0f850f4893343b436899722d3b9c82e3781c3e103dc31175c89a5c867511c14df5b9785a
147 changes: 147 additions & 0 deletions mail-mta/msmtp/msmtp-1.8.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit fcaps multilib user

DESCRIPTION="An SMTP client and SMTP plugin for mail user agents such as Mutt"
HOMEPAGE="https://marlam.de/msmtp/"
SRC_URI="https://marlam.de/msmtp/releases/${P}.tar.xz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
IUSE="daemon doc gnome-keyring idn +mta nls sasl ssl vim-syntax"

# fcaps.eclass unconditionally defines "filecaps" USE flag which we need for
# USE="daemon" in order to set the caps we need.
REQUIRED_USE="daemon? ( filecaps )"

# Upstream discourages usage of openssl. See also
# https://marlam.de/msmtp/news/openssl-discouraged/
DEPEND="
gnome-keyring? ( app-crypt/libsecret )
nls? ( virtual/libintl )
sasl? ( virtual/gsasl )
ssl? ( net-libs/gnutls[idn?] )
!ssl? ( idn? ( net-dns/libidn2:= ) )
"

RDEPEND="${DEPEND}
net-mail/mailbase
mta? (
!mail-mta/courier
!mail-mta/esmtp
!mail-mta/exim
!mail-mta/mini-qmail
!mail-mta/netqmail
!mail-mta/nullmailer
!mail-mta/postfix
!mail-mta/qmail-ldap
!mail-mta/sendmail
!mail-mta/opensmtpd
!<mail-mta/ssmtp-2.64-r2
!>=mail-mta/ssmtp-2.64-r2[mta]
)
"

BDEPEND="${DEPEND}
doc? ( virtual/texi2dvi )
nls? ( sys-devel/gettext )
virtual/pkgconfig
"

DOCS="AUTHORS ChangeLog NEWS README THANKS doc/msmtprc*"

src_prepare() {
# Use default Gentoo location for mail aliases
sed -i 's:/etc/aliases:/etc/mail/aliases:' scripts/find_alias/find_alias_for_msmtp.sh || die

default
}

src_configure() {
local myeconfargs=(
$(use_enable nls)
$(use_with daemon msmtpd)
$(use_with gnome-keyring libsecret)
$(use_with idn libidn)
$(use_with sasl libgsasl)
$(use_with ssl tls gnutls)
)
econf "${myeconfargs[@]}"
}

src_compile() {
default

if use doc ; then
cd doc || die
emake html pdf
fi
}

src_install() {
default

if use daemon ; then
fcaps CAP_NET_BIND_SERVICE usr/bin/msmtpd
newinitd "${FILESDIR}"/msmtpd.init msmtpd
newconfd "${FILESDIR}"/msmtpd.confd msmtpd
fi

if use doc ; then
dodoc doc/msmtp.{html,pdf}
fi

if use mta ; then
dodir /usr/sbin
dosym ../bin/msmtp /usr/sbin/sendmail
dosym msmtp /usr/bin/sendmail
dosym ../bin/msmtp /usr/$(get_libdir)/sendmail
fi

if use vim-syntax ; then
insinto /usr/share/vim/vimfiles/syntax
doins scripts/vim/msmtp.vim
fi

insinto /etc
newins doc/msmtprc-system.example msmtprc

src_install_contrib find_alias find_alias_for_msmtp.sh
src_install_contrib msmtpqueue "*.sh" "README ChangeLog"
src_install_contrib msmtpq "msmtpq msmtp-queue" README.msmtpq
src_install_contrib set_sendmail set_sendmail.sh set_sendmail.conf
}

pkg_preinst() {
if use daemon ; then
enewuser msmtpd
fi
}

pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]]; then
einfo "Please edit ${EROOT%/}/etc/msmtprc before first use."
einfo "In addition, per user configuration files can be placed"
einfo "as '~/.msmtprc'. See the msmtprc-user.example file under"
einfo "/usr/share/doc/${PF}/ for an example."
fi
}

src_install_contrib() {
subdir="$1"
bins="$2"
docs="$3"
local dir=/usr/share/${PN}/${subdir}
insinto ${dir}
exeinto ${dir}
for i in ${bins} ; do
doexe scripts/${subdir}/${i}
done
for i in ${docs} ; do
newdoc scripts/${subdir}/${i} ${subdir}.${i}
done
}

0 comments on commit 8adb087

Please sign in to comment.