summaryrefslogtreecommitdiff
path: root/net-misc/hylafaxplus
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-27 14:54:15 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-27 14:54:15 +0100
commitd654bb059f90c086625a31ce15747f8418cd4bd5 (patch)
tree0a78e925021da9dc8bfd06ada53004c160b957b3 /net-misc/hylafaxplus
parent4e6378ddac49b7268b7ab55d1f5900b2a6d81923 (diff)
gentoo auto-resync : 27:08:2022 - 14:54:15
Diffstat (limited to 'net-misc/hylafaxplus')
-rw-r--r--net-misc/hylafaxplus/Manifest2
-rw-r--r--net-misc/hylafaxplus/files/hylafaxplus-init-r1176
-rw-r--r--net-misc/hylafaxplus/hylafaxplus-7.0.3-r2.ebuild159
3 files changed, 337 insertions, 0 deletions
diff --git a/net-misc/hylafaxplus/Manifest b/net-misc/hylafaxplus/Manifest
index d1b6fe505592..e959a2fec5f6 100644
--- a/net-misc/hylafaxplus/Manifest
+++ b/net-misc/hylafaxplus/Manifest
@@ -1,7 +1,9 @@
AUX hylafaxplus-7.0.2-tiff-4.2.patch 461 BLAKE2B 8afd4e3b41ee67c6c9d7aab50311fbaa6a08dee1937fc46a976f04dc3279beea791004eec59fcff19d3ef82df1d5be479480a1a49505adad6b1f420d5543e32c SHA512 5ed2b4845800ffeaed2d5df26856e9e7c8e9b375d07f1488cbff7d4c6156900dcb6ef89917d010520e87aeebf79a95b6dc77515019aa72e2058817b7b18a4e75
AUX hylafaxplus-conf 572 BLAKE2B cd2b237704e0607565c16cf81593654d266c212810d0dcb399f35d980d04ed54a5bb961f2fd29dbc8386ef6684fe684a8bcbd21c9cd782490546554ec90e4b2e SHA512 ee97c45e49ed03bf2d393b7861fb8d0a92ce927243b7f1843c52de452540e78633e1a6d7b6892e6f5e30b5518b4b3d998354a3cfebe7adfd84da3f9586585621
AUX hylafaxplus-init 3150 BLAKE2B 67b27c9e773d141c462b62882fa1ec592bdd30397c21c0dc0ef55384ac0d448803a8984c35eb22185c0aa315019eea1588829717b170f0b6168b549a270f2570 SHA512 6bc4db4597ef55aaf01bff66dfe7e9b3ce23d51e8d165f635ad49d9971260f8f131d386869787b2cd0de612d8ee784fb8f4e44fa8b8deb4eabf1aeab441e68f5
+AUX hylafaxplus-init-r1 3123 BLAKE2B 6f52fb3ba7c22130affa19a63492eebb0e034e7e396941deabe97ba89c00ddb9183985871916cef54da45a4d799dfa4ee122d7cca3a07844be538e8cc61d1d0f SHA512 3eaa8a4f3c4da645968770e17ea899ed5a116ea82712118d2a8206aee9fea2ca095578f9488586abd410e6873735bc9d397620e3b9a96c4b4d4f3b388aa4359a
AUX ldconfig-patch 467 BLAKE2B d19f7a8ebc79bb40d9935e1f327f3abfa2d336ea4af2026c784178c8110efe4a1bb2c19a17c9127f039d64c2e9115b5899d1999ed1f5ac7c999cdce79875e5b0 SHA512 eb7c154eac56e20a81b3396770442d93b6833c7961927f8264e3ed1aa72850e018fbe14760d7bd5be739d069769e3db3fd5848aaa936dd7509f03a289a146d4c
DIST hylafax-7.0.3.tar.gz 1405116 BLAKE2B dbf8f87380929eb79ca0f18042c3397460dd6774f16defde8e9427d1d14094e00f6be491552f3ff6cc4c3d1fad0ec67a0c1a5fa3b4cb1e07c2f0c956eaefe8ed SHA512 938a21e4573fdf12bbc03dfee85e00555e7790a83a26316ac9cd1983501860858175d599c35f3b383cb0748518644587c203fb429966b5de3b615689d856281a
EBUILD hylafaxplus-7.0.3-r1.ebuild 4188 BLAKE2B 6082d7c490a3fa8f28e41219bfc89929413db69b4582692130e69c30826782fcebb9be39ffb4096c3c69339c2625c8e16435393ca63972478a9d56a6445861bf SHA512 f2debfe6529ffb34e92bc5b055eb8b699ea596484876b4746300727a1dd07e7ed7a83b704f8a1cedc6d82a8765ba4e8d7c96703703f487f658c935d1ff1fa020
+EBUILD hylafaxplus-7.0.3-r2.ebuild 4040 BLAKE2B 3de38d0c5fe1098f48e8f8f3e2903c5b840c58a96e50279efedc33616115a1cdfbe2e82aaf428f8582fae692dc5037b07785e655be9e725e3cb58f893d25ac92 SHA512 4086aceab9b298b0ba0083c3d4f77eef4ed022f7fa5a661ee6ed3deb63ccab11277c05477bb6dd7e30c31ee4d1cb21182e9085d80b5f778b7f8d65dc5b5a4a15
MISC metadata.xml 497 BLAKE2B b3f400cee9f701675dfc8b5bd0a23d497b5f4d2e7211ba421b442782e90a1b60017d33ba482f614d0017f5abf2fa72e886ab445353eec72a9217c45aa23565ae SHA512 4b0b543bf8816e2ffff95334bf0cb64e022cc507f5ccc6b766dd183d272303d31cb43b4b6c4352991b1ceba8aaefc76276e64c5adda3caae9bff5872189deef3
diff --git a/net-misc/hylafaxplus/files/hylafaxplus-init-r1 b/net-misc/hylafaxplus/files/hylafaxplus-init-r1
new file mode 100644
index 000000000000..37e459f79c99
--- /dev/null
+++ b/net-misc/hylafaxplus/files/hylafaxplus-init-r1
@@ -0,0 +1,176 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Author Geaaru
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="zap"
+
+depend() {
+ use lo
+}
+
+checkconfig() {
+ ebegin "Check hylafax server configuration..."
+
+ if [ x$spooldir = x ] ; then
+ eerror "No spooldir directory defined"
+ return 1
+ else
+ SPOOL=$spooldir
+ einfo "Use spool directory $SPOOL"
+ fi
+
+ if [ x$mode = x ] ; then
+ eerror "No mode defined"
+ return 1
+ fi
+
+ if [ ! -f $SPOOL/etc/setup.cache ] ; then
+ eerror "No $SPOOL/etc/setup.cache file founded. Use faxsetup command"
+ return 1
+ fi
+
+ if [ x$hfaxd = x -o ! -f $hfaxd ] ; then
+ eerror "No hfaxd daemon founded"
+ return 1
+ fi
+
+ if [ x$faxq = x -o ! -f $faxq ] ; then
+ eerror "No faxq program founded"
+ return 1
+ fi
+
+ if [ x$faxgetty = x -o ! -f $faxgetty ] ; then
+ eerror "No faxgetty program founded"
+ return 1
+ fi
+
+ if [ x$faxbind = x ] ; then
+ eerror "No binding address supply"
+ return 1
+ fi
+
+ if [ x$piddir = x ] ; then
+ PIDDIR=$SPOOL
+ else
+ PIDDIR=$piddir
+ fi
+
+
+ hfaxd_args="-l $faxbind -q $SPOOL"
+
+ case $mode in
+ newproto)
+ if [ x$faxport = x ] ; then
+ eerror "No faxport defined"
+ return 1
+ fi
+ hfaxd_args="$hfaxd_args -i $faxport"
+ ;;
+ oldproto)
+ if [ x$oldprotoport = x ] ; then
+ eerror "No oldprotoport defined"
+ return 1
+ fi
+ hfaxd_args="$hfaxd_args -o $oldprotoport"
+ ;;
+ snpp)
+ if [ x$snppport = x ] ; then
+ eerror "No snppport defined"
+ return 1
+ fi
+ hfaxd_args="$hfaxd_args -s $snppport"
+ ;;
+ any)
+ if [ x$faxport = x -o x$snppport = x -o x$oldprotoport = x ] ; then
+ eerror "No port data founded for old services"
+ return 1
+ fi
+ hfaxd_args="$hfaxd_args -i $faxport -s $snppport -o $oldprotoport"
+ ;;
+ *)
+ eerror "Invalid mode"
+ return 1
+ ;;
+
+ esac
+
+ faxq_args="-q $SPOOL"
+
+ # workaround for manage save of pidfile with start-stop-daemon
+ hfaxd_args="$hfaxd_args -d"
+ faxq_args="$faxq_args -D"
+
+ return 0
+}
+
+start() {
+ local result
+
+ checkconfig || return 1
+
+ ebegin "Starting HylaFAX server daemons"
+
+ start_faxq
+ result=$?
+
+ if [ $result -ne 0 ] ; then
+ eerror "Error on start $faxq daemon"
+ return 1
+ fi
+
+ start_hfaxd
+ result=$?
+
+ eend $result
+}
+
+start_hfaxd() {
+ local arguments="--start \
+ --make-pidfile --pidfile $PIDDIR/hfaxd.pid"
+
+ einfo "Starting $hfaxd with args $hfaxd_args"
+
+ start-stop-daemon -b ${arguments} --exec $hfaxd -- $hfaxd_args > /dev/null 2>&1
+
+ return $?;
+}
+
+start_faxq() {
+ local arguments="--start \
+ --make-pidfile --pidfile $PIDDIR/faxq.pid"
+ einfo "Starting $faxq ... "
+
+ start-stop-daemon -b ${arguments} --exec $faxq -- $faxq_args > /dev/null 2>&1
+
+ return $?
+}
+
+stop() {
+ checkconfig || return 1
+
+ ebegin "Stopping HylaFAX server daemons"
+
+ start-stop-daemon --stop --quiet --pidfile $PIDDIR/hfaxd.pid
+ start-stop-daemon --stop --quiet --pidfile $PIDDIR/faxq.pid
+ eend $?
+}
+
+zap() {
+ checkconfig || return 1
+
+ ebegin "Zap HylaFAX server daemon files"
+
+ if [ -f $PIDFILE/hfaxd.pid ] ; then
+ rm -f $PIDFILE/hfaxd.pid
+ fi
+
+ if [ -f $PIDFILE/faxq.pid ] ; then
+ rm -f $PIDFILE/faxq.pid
+ fi
+}
+
+restart() {
+ stop
+ start
+}
diff --git a/net-misc/hylafaxplus/hylafaxplus-7.0.3-r2.ebuild b/net-misc/hylafaxplus/hylafaxplus-7.0.3-r2.ebuild
new file mode 100644
index 000000000000..1207db6e57cb
--- /dev/null
+++ b/net-misc/hylafaxplus/hylafaxplus-7.0.3-r2.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit edo pam toolchain-funcs
+
+MY_PN="${PN/plus/}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Enterprise client-server fax package for class 1 and 2 fax modems"
+HOMEPAGE="https://hylafax.sourceforge.io/"
+SRC_URI="mirror://sourceforge/hylafax/${MY_P}.tar.gz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="hylafaxplus"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="html jbig lcms ldap mgetty pam"
+
+DEPEND="
+ app-text/ghostscript-gpl
+ media-libs/tiff[jbig?]
+ media-libs/libjpeg-turbo:=
+ >=sys-libs/zlib-1.1.4
+ virtual/awk
+ virtual/libcrypt:=
+ virtual/mta
+ jbig? ( media-libs/jbigkit )
+ lcms? ( media-libs/lcms )
+ ldap? ( net-nds/openldap:= )
+ mgetty? ( net-dialup/mgetty[-fax] )
+ pam? ( sys-libs/pam )
+"
+RDEPEND="
+ ${DEPEND}
+ !net-dialup/mgetty[fax]
+ !net-dialup/sendpage
+ net-mail/metamail
+"
+
+CONFIG_PROTECT="${CONFIG_PROTECT} /var/spool/fax/etc /usr/lib/fax"
+CONFIG_PROTECT_MASK="${CONFIG_PROTECT_MASK} /var/spool/fax/etc/xferfaxlog"
+
+PATCHES=(
+ "${FILESDIR}"/ldconfig-patch
+ "${FILESDIR}"/${PN}-7.0.2-tiff-4.2.patch
+)
+
+src_prepare() {
+ default
+
+ # Force it not to strip binaries
+ for dir in etc util faxalter faxcover faxd faxmail faxrm faxstat \
+ hfaxd sendfax sendpage ; do
+ sed -i -e "s:-idb:-idb \"nostrip\" -idb:g" \
+ "${dir}"/Makefile.in || die "sed on ${dir}/Makefile.in failed"
+ done
+
+ sed -i -e "s:hostname:hostname -f:g" util/{faxrcvd,pollrcvd}.sh.in || die "sed on hostname failed"
+
+ # Respect LDFLAGS (at least partially)
+ sed -i -e "/^LDFLAGS/s/LDOPTS}/LDOPTS} ${LDFLAGS}/" defs.in || die "sed on defs.in failed"
+
+ sed -i -e "s|-fpic|-fPIC|g" \
+ configure || die
+}
+
+src_configure() {
+ local my_conf=(
+ --with-DIR_BIN=/usr/bin
+ --with-DIR_SBIN=/usr/sbin
+ --with-DIR_LIB=/usr/$(get_libdir)
+ --with-DIR_LIBEXEC=/usr/sbin
+ --with-DIR_LIBDATA=/usr/$(get_libdir)/fax
+ --with-DIR_LOCALE=/usr/share/locale
+ --with-DIR_LOCKS=/var/lock
+ --with-DIR_MAN=/usr/share/man
+ --with-DIR_SPOOL=/var/spool/fax
+ --with-DIR_HTML=/usr/share/doc/${PF}/html
+ --with-DIR_CGI="${WORKDIR}"
+ --with-PATH_DPSRIP=/var/spool/fax/bin/ps2fax
+ --with-PATH_IMPRIP=""
+ --with-SYSVINIT=no
+ --with-REGEX=yes
+ --with-LIBTIFF="-ltiff -ljpeg -lz"
+ --with-OPTIMIZER="${CFLAGS}"
+ --with-DSO=auto
+ --with-HTML=$(usex html)
+ )
+
+ if use mgetty; then
+ my_conf+=(
+ --with-PATH_GETTY=/sbin/mgetty
+ --with-PATH_EGETTY=/sbin/mgetty
+ --with-PATH_VGETTY=/usr/sbin/vgetty
+ )
+ else
+ # GETTY defaults to /sbin/agetty
+ my_conf+=(
+ --with-PATH_EGETTY=/bin/false
+ --with-PATH_VGETTY=/bin/false
+ )
+ fi
+
+ # --enable-pam isn't valid
+ use pam || my_conf+=( $(use_enable pam) )
+ use lcms || my_conf+=( $(use_enable lcms) )
+ use ldap || my_conf+=( $(use_enable ldap) )
+ use jbig || my_conf+=( $(use_enable jbig) )
+
+ tc-export CC CXX AR RANLIB
+
+ edo ./configure --nointeractive "${my_conf[@]}"
+}
+
+src_compile() {
+ # Parallel building is borked, bug #????
+ emake -j1
+}
+
+src_install() {
+ dodir /usr/{bin,sbin} /usr/$(get_libdir)/fax /usr/share/man
+ dodir /var/spool /var/spool/fax
+ fowners uucp:uucp /var/spool/fax
+ fperms 0600 /var/spool/fax
+
+ dodir /usr/share/doc/${PF}/samples
+ emake DESTDIR="${D}" \
+ BIN="${D}/usr/bin" \
+ SBIN="${D}/usr/sbin" \
+ LIBDIR="${D}/usr/$(get_libdir)" \
+ LIB="${D}/usr/$(get_libdir)" \
+ LIBEXEC="${D}/usr/sbin" \
+ LIBDATA="${D}/usr/$(get_libdir)/fax" \
+ DIR_LOCALE="${D}/usr/share/locale" \
+ MAN="${D}/usr/share/man" \
+ SPOOL="${D}/var/spool/fax" \
+ HTMLDIR="${D}/usr/share/doc/${PF}/html" \
+ install
+
+ keepdir /var/spool/fax/{archive,client,etc,pollq,recvq,tmp}
+ keepdir /var/spool/fax/{status,sendq,log,info,doneq,docq,dev}
+
+ einfo "Adding env.d entry for ${PN}"
+ newenvd - 99hylafaxplus <<-EOF
+ PATH="/var/spool/fax/bin"
+ CONFIG_PROTECT="/var/spool/fax/etc /usr/$(get_libdir)/fax"
+ CONFIG_PROTECT_MASK="/var/spool/fax/etc/xferfaxlog"
+ EOF
+
+ newconfd "${FILESDIR}"/${PN}-conf ${PN}
+ newinitd "${FILESDIR}"/${PN}-init-r1 ${PN}
+
+ use pam && pamd_mimic_system ${MY_PN} auth account session
+
+ einstalldocs
+ docinto samples
+}