logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

opensmtpd-6.8.0_p2-r2.ebuild (1976B)


  1. # Copyright 1999-2022 Gentoo Authors
  2. # Copyright 2018-2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
  3. # Distributed under the terms of the GNU General Public License v2
  4. EAPI=7
  5. inherit pam systemd
  6. DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD"
  7. HOMEPAGE="https://www.opensmtpd.org"
  8. SRC_URI="https://www.opensmtpd.org/archives/${P/_}.tar.gz"
  9. LICENSE="ISC BSD BSD-1 BSD-2 BSD-4"
  10. SLOT="0"
  11. KEYWORDS="~amd64"
  12. IUSE="berkdb +mta pam"
  13. # < openssl 3 for bug #881701
  14. DEPEND="
  15. acct-user/smtpd
  16. acct-user/smtpq
  17. <dev-libs/openssl-3:=
  18. >=dev-libs/openssl-1.1.0:0=
  19. sys-libs/zlib
  20. pam? ( sys-libs/pam )
  21. berkdb? ( sys-libs/db:= )
  22. elibc_musl? (
  23. sys-libs/fts-standalone
  24. sys-libs/queue-standalone
  25. )
  26. dev-libs/libevent
  27. app-misc/ca-certificates
  28. net-mail/mailbase
  29. net-libs/libasr
  30. !mail-mta/courier
  31. !mail-mta/esmtp
  32. !mail-mta/exim
  33. !mail-mta/mini-qmail
  34. !mail-mta/msmtp[mta]
  35. !mail-mta/netqmail
  36. !mail-mta/nullmailer
  37. !mail-mta/postfix
  38. !mail-mta/qmail-ldap
  39. !mail-mta/sendmail
  40. !mail-mta/ssmtp[mta]
  41. "
  42. RDEPEND="${DEPEND}"
  43. # Broken build when libbsd is present at configure time
  44. BDEPEND="!dev-libs/libbsd"
  45. S=${WORKDIR}/${P/_}
  46. src_configure() {
  47. econf \
  48. --sysconfdir=/etc/smtpd \
  49. --with-path-mbox=/var/spool/mail \
  50. --with-path-empty=/var/empty \
  51. --with-path-socket=/run \
  52. --with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \
  53. --with-user-smtpd=smtpd \
  54. --with-user-queue=smtpq \
  55. --with-group-queue=smtpq \
  56. --with-mantype=doc \
  57. $(use_with pam auth-pam) \
  58. $(use_with berkdb table-db)
  59. }
  60. src_install() {
  61. default
  62. newinitd "${FILESDIR}"/smtpd.initd smtpd
  63. systemd_dounit "${FILESDIR}"/smtpd.{service,socket}
  64. use pam && newpamd "${FILESDIR}"/smtpd.pam smtpd
  65. dosym /usr/sbin/smtpctl /usr/sbin/makemap
  66. dosym /usr/sbin/smtpctl /usr/sbin/newaliases
  67. if use mta ; then
  68. dodir /usr/sbin
  69. dosym /usr/sbin/smtpctl /usr/sbin/sendmail
  70. dosym /usr/sbin/smtpctl /usr/bin/sendmail
  71. dosym /usr/sbin/smtpctl /usr/$(get_libdir)/sendmail
  72. fi
  73. }