EAPI=8 inherit cmake DESCRIPTION="faxd: the fax API, sender and web portal for fax.trunkmasters.com" HOMEPAGE="https://trunkmasters.com/fax" SRC_URI="https://www.hedronfire.com/distfiles/${P}.tar.gz" # The application carries no grant of an open-source license. LICENSE="all-rights-reserved" SLOT="0" KEYWORDS="~amd64" RESTRICT="mirror bindist" DEPEND=" =dev-libs/boost-1.91.0* =dev-libs/openssl-3.6.5* =dev-db/postgresql-18.6* =dev-cpp/nlohmann_json-3.12.0* sys-libs/libxcrypt " # It runs as the existing `fax` account (on Alpha it predates any acct package), and calls # Ghostscript, tiff2pdf/tiffinfo, ImageMagick, unzip and sendmail. RDEPEND="${DEPEND} app-text/ghostscript-gpl media-libs/tiff media-gfx/imagemagick app-arch/unzip virtual/mta " BDEPEND=" =dev-cpp/catch-3.15.3* " src_configure() { # The project refuses in-source builds and requires an absolute build root. export FAX_BUILD_ROOT="${WORKDIR}/build" local mycmakeargs=( -DFAX_SANITIZER=none ) cmake_src_configure } src_test() { # The parity suite needs root, PostgreSQL and the Rust reference binary; it runs outside the # Portage sandbox (README, "Build and test"). cmake_src_test -R '^unit$' } src_install() { cmake_src_install newinitd "${ED}"/usr/share/fax/openrc/fax.initd fax newconfd "${ED}"/usr/share/fax/openrc/fax.confd fax # It holds AMI_SECRET and FAX_SESSION_SECRET once filled in. fperms 0600 /etc/conf.d/fax # Its own directory: /var/lib/fax is the Python service's old one, left as it is. keepdir /var/lib/faxd/bus-outbox fowners -R fax:fax /var/lib/faxd fperms 0750 /var/lib/faxd /var/lib/faxd/bus-outbox } pkg_postinst() { elog "faxd runs as fax with the settings in /etc/conf.d/fax, on /run/fax/fax.sock and" elog "/run/fax/web.sock, against the fax database and /var/spool/fax, as the Rust daemon did." elog "An existing /etc/init.d/fax and /etc/conf.d/fax are kept (CONFIG_PROTECT): merge the" elog "new init script at the switch." }