Skip to content

Commit

Permalink
mail-mta/qpsmtpd: port to EAPI 7
Browse files Browse the repository at this point in the history
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Mar 16, 2021
1 parent 803a44f commit c7d2e20
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 24 deletions.
20 changes: 9 additions & 11 deletions mail-mta/qpsmtpd/qpsmtpd-0.95.ebuild
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5
EAPI=7

[[ ${PV} == *9999 ]] && SCM="git-2"
inherit eutils perl-module user ${SCM}
[[ ${PV} == *9999 ]] && SCM="git-r3"
inherit perl-module user ${SCM}

DESCRIPTION="qpsmtpd is a flexible smtpd daemon written in Perl"
HOMEPAGE="https://smtpd.github.io/qpsmtpd/"
Expand Down Expand Up @@ -47,7 +47,7 @@ src_unpack() {
unpack ${A}
cd "${S}"
else
git-2_src_unpack
git-r3_src_unpack
cd "${S}"
fi
}
Expand All @@ -59,25 +59,23 @@ src_install() {
newins "${FILESDIR}"/qpsmtpd.xinetd qpsmtpd

dodir /usr/share/qpsmtpd
cp -Rf plugins "${D}"/usr/share/qpsmtpd/
cp -Rf plugins "${ED}"/usr/share/qpsmtpd/ || die

diropts -m 0755 -o smtpd -g smtpd
dodir /var/spool/qpsmtpd
keepdir /var/spool/qpsmtpd

dodir /etc/qpsmtpd
insinto /etc/qpsmtpd
doins config.sample/*

echo "/usr/share/qpsmtpd/plugins" > "${D}"/etc/qpsmtpd/plugin_dirs
echo "/var/spool/qpsmtpd" > "${D}"/etc/qpsmtpd/spool_dir
echo "/usr/share/qpsmtpd/plugins" > "${ED}"/etc/qpsmtpd/plugin_dirs || die
echo "/var/spool/qpsmtpd" > "${ED}"/etc/qpsmtpd/spool_dir || die
if use syslog; then
echo "logging/syslog loglevel LOGINFO priority LOG_NOTICE" > "${D}"/etc/qpsmtpd/logging
echo "logging/syslog loglevel LOGINFO priority LOG_NOTICE" > "${ED}"/etc/qpsmtpd/logging
else
diropts -m 0755 -o smtpd -g smtpd
dodir /var/log/qpsmtpd
keepdir /var/log/qpsmtpd
echo "logging/file loglevel LOGINFO /var/log/qpsmtpd/%Y-%m-%d" > "${D}"/etc/qpsmtpd/logging
echo "logging/file loglevel LOGINFO /var/log/qpsmtpd/%Y-%m-%d" > "${ED}"/etc/qpsmtpd/logging
fi

newenvd "${FILESDIR}"/qpsmtpd.envd 99qpsmtpd
Expand Down
39 changes: 26 additions & 13 deletions mail-mta/qpsmtpd/qpsmtpd-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5
EAPI=7

inherit eutils perl-module user git-r3
[[ ${PV} == *9999 ]] && SCM="git-r3"
inherit perl-module user ${SCM}

DESCRIPTION="qpsmtpd is a flexible smtpd daemon written in Perl"
HOMEPAGE="https://smtpd.github.io/qpsmtpd/"
# This is a spotted development fork with many improvements
EGIT_REPO_URI="https://github.com/smtpd/${PN}.git"
if [[ ${PV} != *9999 ]]; then
SRC_URI="https://github.com/smtpd/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
else
# This is a spotted development fork with many improvements
EGIT_REPO_URI="https://github.com/smtpd/${PN}.git"
fi

LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE="postfix ipv6 syslog"

RDEPEND=">=dev-lang/perl-5.8.0
Expand All @@ -37,32 +42,40 @@ pkg_setup() {
enewuser smtpd -1 -1 /var/spool/qpsmtpd smtpd${additional_groups}
}

src_unpack() {
if [[ ${PV} != *9999 ]]; then
unpack ${A}
cd "${S}"
else
git-r3_src_unpack
cd "${S}"
fi
}

src_install() {
perl-module_src_install

insinto /etc/xinetd.d
newins "${FILESDIR}"/qpsmtpd.xinetd qpsmtpd

dodir /usr/share/qpsmtpd
cp -Rf plugins "${D}"/usr/share/qpsmtpd/
cp -Rf plugins "${ED}"/usr/share/qpsmtpd/ || die

diropts -m 0755 -o smtpd -g smtpd
dodir /var/spool/qpsmtpd
keepdir /var/spool/qpsmtpd

dodir /etc/qpsmtpd
insinto /etc/qpsmtpd
doins config.sample/*

echo "/usr/share/qpsmtpd/plugins" > "${D}"/etc/qpsmtpd/plugin_dirs
echo "/var/spool/qpsmtpd" > "${D}"/etc/qpsmtpd/spool_dir
echo "/usr/share/qpsmtpd/plugins" > "${ED}"/etc/qpsmtpd/plugin_dirs || die
echo "/var/spool/qpsmtpd" > "${ED}"/etc/qpsmtpd/spool_dir || die
if use syslog; then
echo "logging/syslog loglevel LOGINFO priority LOG_NOTICE" > "${D}"/etc/qpsmtpd/logging
echo "logging/syslog loglevel LOGINFO priority LOG_NOTICE" > "${ED}"/etc/qpsmtpd/logging
else
diropts -m 0755 -o smtpd -g smtpd
dodir /var/log/qpsmtpd
keepdir /var/log/qpsmtpd
echo "logging/file loglevel LOGINFO /var/log/qpsmtpd/%Y-%m-%d" > "${D}"/etc/qpsmtpd/logging
echo "logging/file loglevel LOGINFO /var/log/qpsmtpd/%Y-%m-%d" > "${ED}"/etc/qpsmtpd/logging
fi

newenvd "${FILESDIR}"/qpsmtpd.envd 99qpsmtpd
Expand Down

0 comments on commit c7d2e20

Please sign in to comment.