logo

overlay

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

opensmtpd-filter-rspamd-0.1.8.ebuild (1174B)


  1. # Copyright 2020-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. EGO_PN="github.com/poolpOrg/filter-rspamd"
  5. DESCRIPTION="OpenSMTPD filter for putting emails through rspamd"
  6. HOMEPAGE="https://github.com/poolpOrg/filter-rspamd"
  7. SRC_URI="https://github.com/poolpOrg/filter-rspamd/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
  8. S="${WORKDIR}/src/${EGO_PN}"
  9. LICENSE="ISC"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE=""
  13. DEPEND="
  14. >=dev-lang/go-1.15
  15. >=dev-go/sys-0.13.0
  16. "
  17. RDEPEND="${DEPEND} mail-mta/opensmtpd"
  18. BDEPEND=""
  19. RESTRICT="strip"
  20. QA_FLAGS_IGNORED='.*'
  21. DOCS=( README.md )
  22. src_unpack() {
  23. default
  24. mkdir -p "$(dirname "${S}")" || die
  25. mv "${WORKDIR}/filter-rspamd-${PV}" "${S}" || die
  26. }
  27. src_compile() {
  28. # disable module-aware mode
  29. export GO111MODULE=off
  30. # no network access
  31. export GOPROXY=off
  32. # don't try to update the toolchain
  33. export GOTOOLCHAIN="local"
  34. # With GO111MODULE=off WORKDIR needs to be included
  35. export GOPATH="${WORKDIR}:${EPREFIX}/usr/lib/go-gentoo"
  36. go build -ldflags="-s -w" -buildmode=pie -o filter-rspamd || die
  37. }
  38. src_install() {
  39. default
  40. exeinto /usr/libexec/opensmtpd
  41. doexe filter-rspamd
  42. }