diff options
author | Matthew Marlowe <mattm@gentoo.org> | 2012-04-05 17:57:40 +0000 |
---|---|---|
committer | Matthew Marlowe <mattm@gentoo.org> | 2012-04-05 17:57:40 +0000 |
commit | 2737a3c439a28656859fc294478280445bcd0907 (patch) | |
tree | 49c2618be97a6a57ac8cbc159bc0d7bf04ea34ae /net-misc/hylafaxplus | |
parent | Remove old. (diff) | |
download | historical-2737a3c439a28656859fc294478280445bcd0907.tar.gz historical-2737a3c439a28656859fc294478280445bcd0907.tar.bz2 historical-2737a3c439a28656859fc294478280445bcd0907.zip |
New package, hylafax plus, that is based on upstream fork of hylafax. Initial ebuilds were user submitted (Thanks to all those who contributed to bug 168890). I have made a number of modifications/fixes and have removed all keywords(package is masked). Ebuild now gets through repoman w/o any qa concerns but I will need to continue to revise it until it is ready to keyword as ~amd64 and ~x86 for user testing.
Package-Manager: portage-2.1.10.55/cvs/Linux x86_64
Diffstat (limited to 'net-misc/hylafaxplus')
-rw-r--r-- | net-misc/hylafaxplus/ChangeLog | 17 | ||||
-rw-r--r-- | net-misc/hylafaxplus/Manifest | 21 | ||||
-rw-r--r-- | net-misc/hylafaxplus/files/hylafaxplus-conf | 29 | ||||
-rw-r--r-- | net-misc/hylafaxplus/files/hylafaxplus-init | 176 | ||||
-rw-r--r-- | net-misc/hylafaxplus/files/ldconfig-patch | 10 | ||||
-rw-r--r-- | net-misc/hylafaxplus/hylafaxplus-5.5.1.ebuild | 185 | ||||
-rw-r--r-- | net-misc/hylafaxplus/metadata.xml | 17 |
7 files changed, 455 insertions, 0 deletions
diff --git a/net-misc/hylafaxplus/ChangeLog b/net-misc/hylafaxplus/ChangeLog new file mode 100644 index 000000000000..2fd056b0cc82 --- /dev/null +++ b/net-misc/hylafaxplus/ChangeLog @@ -0,0 +1,17 @@ +# ChangeLog for net-misc/hylafaxplus +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafaxplus/ChangeLog,v 1.1 2012/04/05 17:57:40 mattm Exp $ + + 05 Apr 2012; Matthew Marlowe <mattm@gentoo.org> +hylafaxplus-5.5.1.ebuild, + +files/hylafaxplus-conf, +files/hylafaxplus-init, +files/ldconfig-patch, + +metadata.xml: + several additional fixes requested by repoman + +*hylafaxplus-5.5.1 (05 Apr 2012) + + 05 Apr 2012; Matthew Marlowe <mattm@gentoo.org> +hylafaxplus-5.5.1.ebuild, + +files/hylafaxplus-conf, +files/hylafaxplus-init, +files/ldconfig-patch, + +metadata.xml: + minor fixes to user created ebuild for first version, temp masked until all + bugs and issues worked out + diff --git a/net-misc/hylafaxplus/Manifest b/net-misc/hylafaxplus/Manifest new file mode 100644 index 000000000000..c71753868f8f --- /dev/null +++ b/net-misc/hylafaxplus/Manifest @@ -0,0 +1,21 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX hylafaxplus-conf 572 RMD160 6494a6799af3708890fbe386678dc3f6498bae3b SHA1 7bab9e00be23e752b7deade652799683ef1cd66a SHA256 bc8851e560282ebce22073c146acaf2e848c4c1bdb49c4862b7f66c2062c2942 +AUX hylafaxplus-init 3139 RMD160 f1183b6622cfec7b914dee456c7ce7008ef17967 SHA1 263bd93fc5ca9e9a1e17397776a498b2468f2d93 SHA256 be1280b1e28f7135f9bad491bbd068eabe8c450f43f69892676c5bea1bc7ebfd +AUX ldconfig-patch 463 RMD160 0ec21efb03d7c2e1b8ad109af5f416d6e9503729 SHA1 9d583db8da2eb460a0d48a82c79eef3f85f66c71 SHA256 7f2bef0bad6aa0c6474d3bdaf486a4637b75d3312348e6633a89fab66985786b +DIST hylafax-5.5.1.tar.gz 1304020 RMD160 5d8cfb64e903f5cf616aef9eacf0bea0daa0d316 SHA1 7ed0b864dd89689088c9a4256205afcb2444726b SHA256 96ac3dd60e3740184e3a5a68f0eeeafcede9aa9d3cc38bb3e8a4c06fb45f5f11 +EBUILD hylafaxplus-5.5.1.ebuild 5229 RMD160 f74354dbc17daaedffb0b5bf487905a127e914fa SHA1 98da2b459d4ff26629b6b987de6bac7ad0579d02 SHA256 c396b537b55671da27dbfc594b631cdf9fd36d7ba79525b4d47c0fdff6f9f972 +MISC ChangeLog 741 RMD160 e9d97538525430306103008ff5c0af4e2062a84a SHA1 dcd14d1c6f5e1a45303017afe7c66484b854da32 SHA256 0fd8be88e7afe57814801e6c082831a80f70f8724ce8466c1a7a35e0bb69f77f +MISC metadata.xml 579 RMD160 b975907833247c77f3c0a131dc4b66c928267041 SHA1 79feeb7a8314fd90c8ae3edea9ff413529bbdb0e SHA256 52e22dd8e1acd94aea28b013c232afe316b2b3eb69cd52e4e2d25949fed6bf2d +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iQEcBAEBAgAGBQJPfd0eAAoJEC1LWXx4YDenFzAH/RrW6EPqQAuJfgoal/IXVDWw +RwWQtzlcs/vWFapQjb4b7BeS3bO1QsN+Db2TspaNjZw0g+lu9aXKU6Gfb0/0uuUL +Y8jEnv0zHlpHMvC1RyWylUMeHCiDc2UtxvAT/qyy87UbkCSHEl+YARuZcbIL9i/4 +hfNrJeIM2lLFNu+byO7g8ld8bu+p1oOfcS3/Q6QWeN4NpV48ZuxIumak5dqV31xB +ArBal1AtE6NXqv+dlYFR0O+H9sbIX0pIjICjDkpqIMZKgcDZLh9o4+6Nsh91uWvG +Zp65TU4m8Fekw+0bcCR3ubHIcHC9jgwRVJzhuKMqQPsNUDpYn1R9OiO98n3qJsE= +=rQX2 +-----END PGP SIGNATURE----- diff --git a/net-misc/hylafaxplus/files/hylafaxplus-conf b/net-misc/hylafaxplus/files/hylafaxplus-conf new file mode 100644 index 000000000000..911a59db4078 --- /dev/null +++ b/net-misc/hylafaxplus/files/hylafaxplus-conf @@ -0,0 +1,29 @@ +# Spool directory for HylaFAX +spooldir="/var/spool/fax" + +# Faxq program path +faxq="/usr/sbin/faxq" + +# hfaxd program path +hfaxd="/usr/sbin/hfaxd" + +# faxgetty program path +faxgetty="/usr/sbin/faxgetty" + +# Port of the hfaxd daemon for new protocol +faxport=hylafax + +# Address used by hfaxd as binding address. +faxbind="127.0.0.1" + +# Port of the hfaxd daemon for SNPP protocol +snppport=444 + +# Port of the hfaxd daemon for old protocol +oldprotoport=4557 + +# newproto | oldproto | snpp | any +mode="newproto" + +# Directory where the pidfiles of HylaFAX are saved. +piddir="/var/run" diff --git a/net-misc/hylafaxplus/files/hylafaxplus-init b/net-misc/hylafaxplus/files/hylafaxplus-init new file mode 100644 index 000000000000..47c16fdff2f2 --- /dev/null +++ b/net-misc/hylafaxplus/files/hylafaxplus-init @@ -0,0 +1,176 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Author Geaaru +# Distributed under the terms of the GNU General Public License v2 + +opts="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 || ! -f $hfaxd ]] ; then + eerror "No hfaxd daemon founded" + return 1 + fi + + if [[ x$faxq == x || ! -f $faxq ]] ; then + eerror "No faxq program founded" + return 1 + fi + + if [[ x$faxgetty == x || ! -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 || x$snppport == x || 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/files/ldconfig-patch b/net-misc/hylafaxplus/files/ldconfig-patch new file mode 100644 index 000000000000..8b0f4352d51f --- /dev/null +++ b/net-misc/hylafaxplus/files/ldconfig-patch @@ -0,0 +1,10 @@ +--- faxd/Makefile.LINUXdso.original 2011-12-30 18:17:59.000000000 +0100 ++++ faxd/Makefile.LINUXdso 2011-12-30 18:18:51.000000000 +0100 +@@ -37,7 +37,6 @@ + + installDSO: libfaxserver.${DSO} + ${PUTSERV} -root ${INSTALLROOT} -F ${LIBDIR} -m 755 -O libfaxserver.${DSO} +- [ `id -u` -eq 0 ] && ( PATH=${PATH}:/sbin ldconfig ${LIBDIR} ) || ( echo "ldconfig is required to be run as user root at install time" ) + + uninstallDSO:: + ${RM} -f ${LIBDIR}/libfaxserver.${DSO} diff --git a/net-misc/hylafaxplus/hylafaxplus-5.5.1.ebuild b/net-misc/hylafaxplus/hylafaxplus-5.5.1.ebuild new file mode 100644 index 000000000000..6abd4ec38e53 --- /dev/null +++ b/net-misc/hylafaxplus/hylafaxplus-5.5.1.ebuild @@ -0,0 +1,185 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/hylafaxplus/hylafaxplus-5.5.1.ebuild,v 1.1 2012/04/05 17:57:40 mattm Exp $ + +EAPI="2" + +inherit eutils multilib 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="http://hylafax.sourceforge.net" +SRC_URI="mirror://sourceforge/hylafax/${MY_P}.tar.gz" + +SLOT="0" +LICENSE="hylafaxplus" +KEYWORDS="" + +IUSE="jbig pam mgetty html ldap" + +DEPEND=">=sys-libs/zlib-1.1.4 + !net-misc/hylafax + app-text/ghostscript-gpl + virtual/mta + media-libs/tiff[jbig?] + virtual/jpeg + jbig? ( media-libs/jbigkit ) + sys-apps/gawk + ldap? ( net-nds/openldap ) + pam? ( virtual/pam ) + mgetty? ( net-dialup/mgetty[-fax] )" + +RDEPEND="${DEPEND} + net-mail/metamail + !net-dialup/sendpage" + +S=${WORKDIR}/${MY_P} + +export CONFIG_PROTECT="${CONFIG_PROTECT} /var/spool/fax/etc /usr/lib/fax" + +src_prepare() { + epatch "${FILESDIR}/ldconfig-patch" + # 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 failed" + done + + 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/${P}/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" + + if use html; then + my_conf="${my_conf} --with-HTML=yes" + else + my_conf="${my_conf} --with-HTML=no" + fi + + if use mgetty; then + my_conf="${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="${my_conf} \ + --with-PATH_EGETTY=/bin/false \ + --with-PATH_VGETTY=/bin/false" + fi + + if [ -h /etc/localtime ]; then + local continent=$(readlink /etc/localtime | cut -d / -f 5) + if [ "${continent}" == "Europe" ]; then + my_conf="${my_conf} --with-PAGESIZE=A4" + fi + fi + + #--enable-pam isn't valid + use pam || my_conf="${my_conf} $(use_enable pam)" + use ldap || my_conf="${my_conf} $(use_enable ldap)" + use jbig || my_conf="${my_conf} $(use_enable jbig)" + + myconf="CC=$(tc-getCC) CXX=$(tc-getCXX) ${my_conf}" + + # eval required for quoting in ${my_conf} to work properly, better way? + eval ./configure --nointeractive ${my_conf} || die "./configure failed" +} + +src_install() { + dodir /usr/{bin,sbin} /usr/$(get_libdir)/fax /usr/share/man + dodir /var/spool /var/spool/recvq + fowners uucp:uucp /var/spool/fax + fperms 0600 /var/spool/fax + dodir /usr/share/doc/${P}/samples + + emake \ + 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/${P}/html \ + install DESTDIR="${D}" || die "make install failed" + + keepdir /var/spool/fax/{archive,client,etc,pollq,recvq,tmp} + keepdir /var/spool/fax/{status,sendq,log,info,doneq,docq,dev} + + dosed "s:hostname:hostname -f:g" /var/spool/fax/bin/{faxrcvd,pollrcvd} \ + || die "dosed hostname failed" + + generate_files # in this case, it only generates the env.d entry + + einfo "Adding env.d entry for ${PN}" + doenvd 99${P} + + einfo "Adding init.d and conf.d entries for ${PN}" + newconfd "${FILESDIR}"/${PN}-conf ${PN} + newinitd "${FILESDIR}"/${PN}-init ${PN} + + use pam && pamd_mimic_system ${MY_PN} auth account session + + dodoc CONTRIBUTORS README TODO + docinto samples +} + +pkg_postinst() { + elog + elog "The faxonly USE flag has been removed; since ${PN} does not" + elog "require mgetty, and certain fax files conflict, you must build" + elog "mgetty without fax support if you wish to use them both. You" + elog "may want to add both to package.use so any future updates are" + elog "correctly built:" + elog + elog " net-dialup/mgetty -fax" + elog " net-misc/hylafax [-mgetty|mgetty]" + elog + elog "There are additional files included in the documentation dir." + elog + elog "Note 1: hylafax.cron is provided for vixie-cron users and" + elog "should be placed in /etc/cron.d. Use as-is or adapt it to" + elog "your system config." + elog + elog "Note 2: if you need to use hylafax with iptables, then you" + elog "need to specify the port and use ip_conntrack_ftp as shown" + elog "in the included example modules file." + elog + elog "See the docs and man pages for detailed configuration info." + elog + elog "Now run faxsetup and (if necessary) faxaddmodem." + elog +} + +generate_files() { + cat <<-EOF > 99${P} + PATH="/var/spool/fax/bin" + CONFIG_PROTECT="/var/spool/fax/etc /usr/$(get_libdir)/fax" + EOF +} diff --git a/net-misc/hylafaxplus/metadata.xml b/net-misc/hylafaxplus/metadata.xml new file mode 100644 index 000000000000..09613957e555 --- /dev/null +++ b/net-misc/hylafaxplus/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>mattm@gentoo.org</email> +<name>Matthew Marlowe</name> +</maintainer> +<longdescription> +Enterprise client-server fax package for class 1 and 2 fax modems. +</longdescription> +<use> + <flag name='jbig'>JBIG Fax Compression Support</flag> + <flag name='pam'>hfaxd authentication via PAM</flag> + <flag name='mgetty'>Receive faxes via serial port connections</flag> + <flag name='html'>Convert faxes into html email</flag> +</use> +</pkgmetadata> |