summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2018-08-22 00:34:33 -0400
committerChris Severance2018-08-22 00:34:33 -0400
commita370c2abf8eeca27b427a63deb187b2ae125a9d5 (patch)
tree500d4e076cb8c4648e9dba6d0e8ca065671db388
parentd2c7b3bae6e263080e067884473f1812b6a959f1 (diff)
downloadaur-a370c2abf8eeca27b427a63deb187b2ae125a9d5.tar.gz
autu: Update to 5.6.0-1
-rw-r--r--.SRCINFO20
-rw-r--r--0002-typerules.vertical.margins.patch6
-rw-r--r--0004a-hylafaxplus-systemd.patch102
-rw-r--r--0005-hylafaxplus-faxsetup.patch175
-rw-r--r--PKGBUILD145
-rwxr-xr-xfmfix.pl4
-rw-r--r--hylafax.install1
7 files changed, 374 insertions, 79 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5c76b619481..b98e522265a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Wed Aug 16 02:04:38 UTC 2017
+# Wed Aug 22 04:34:33 UTC 2018
pkgbase = hylafaxplus
pkgdesc = Enterprise Fax Server
- pkgver = 5.5.9
- pkgrel = 3
+ pkgver = 5.6.0
+ pkgrel = 1
url = http://hylafax.sourceforge.net/
install = hylafax.install
arch = i686
@@ -23,9 +23,9 @@ pkgbase = hylafaxplus
optdepends = fax4cups: CUPS fax printer
optdepends = faxfrontend: CUPS fax printer
optdepends = 2Fax: ascii to fax generator including pictures and fonts
- provides = hylafax=5.5.9
+ provides = hylafax=5.6.0
conflicts = hylafax
- source = https://downloads.sourceforge.net/hylafax/hylafax-5.5.9.tar.gz
+ source = https://downloads.sourceforge.net/hylafax/hylafax-5.6.0.tar.gz
source = sendfaxvsi-1.0.0.tgz::https://github.com/severach/sendfaxvsi/archive/18fabc74490362cd26690331d546d727c727db25.tar.gz
source = fmfix.pl
source = localnxxtoregex.sh
@@ -33,14 +33,18 @@ pkgbase = hylafaxplus
source = 0002-typerules.vertical.margins.patch
source = 0003-graphic.logo.instructions.patch
source = 0004-hylafaxplus-systemd.patch
- sha256sums = 22e6b98ae008a37b44136b4d08c85bdc2ef8f90629de424e06ec308063a47e30
+ source = 0004a-hylafaxplus-systemd.patch
+ source = 0005-hylafaxplus-faxsetup.patch
+ sha256sums = d905b4c70ed22d765427bd67cc16e9fed6a0e33bffa06aff6665cdc427090589
sha256sums = 0aed186ab30fdb7cf36895a0ff50b03bd4a68db63cf4f19763995dabd9caffb0
- sha256sums = 613140010f9373998b441eaf7408b59877d00e1f4edb379740d27ccb93250272
+ sha256sums = 466ab17cdaa1eb1f1f0b5bdc444a90df5835a1896b1363584264920bbc3929f2
sha256sums = 80d2e28ee7a7d8f93501e32c96e9895e242409da1326761d36dbf28e5a0e3677
sha256sums = dd4728f8204d0bba2a026768f0e0216778ed26583c3f799f6266554e21b48fe2
- sha256sums = 0a24bee3159a74440a00783c5da1ee2a5e529e46a26a9a91b6be72a5167f40f3
+ sha256sums = 5f19fa1f3b12fd480f4c28a9a2bdf041359d5510e1040b735d5f312071dcbd04
sha256sums = b4b93c149164ed7c96f4f04373c32198c1e19c89ca9e2ab6e92e17c0a48bd1af
sha256sums = 989d6f71a8cfe99a3ca983981f8d8e9368776e2fc7667a809755d8d7292d52ad
+ sha256sums = 528f267805203b792741423f46114fee7b48664f1aab35a0edff7d519555ccc2
+ sha256sums = e2b43c19705ce112dd3a08ecd0cae4c5558910366291524566cdd5890b2c6095
pkgname = hylafaxplus
diff --git a/0002-typerules.vertical.margins.patch b/0002-typerules.vertical.margins.patch
index 2921b6c7c3f..e8a17b93050 100644
--- a/0002-typerules.vertical.margins.patch
+++ b/0002-typerules.vertical.margins.patch
@@ -1,5 +1,5 @@
---- typerules.orig 2017-07-19 00:24:44.000000000 -0400
-+++ typerules 2017-07-19 01:02:17.200865735 -0400
+--- typerules.orig 2018-08-21 22:51:42.000000000 -0400
++++ typerules 2018-08-21 22:51:42.000000000 -0400
@@ -148,11 +148,11 @@
#
0 string WNGZWZSS error Wingz spreadsheet support not configured
@@ -13,7 +13,7 @@
# can be used when a converter is installed. Enable the
# conversion match and disable the corresponding error.
0 string GIF error filetype conversion support not configured
-@@ -209,11 +209,11 @@
+@@ -213,11 +213,11 @@
#
# This causes anything else with ascii-only data to be treated as text.
diff --git a/0004a-hylafaxplus-systemd.patch b/0004a-hylafaxplus-systemd.patch
new file mode 100644
index 00000000000..f49ddac36cf
--- /dev/null
+++ b/0004a-hylafaxplus-systemd.patch
@@ -0,0 +1,102 @@
+--- etc/faxsetup.sh.in.Arch 2018-07-04 20:37:28.000000000 -0400
++++ etc/faxsetup.sh.in 2018-08-21 20:23:55.661109684 -0400
+@@ -113,11 +113,11 @@ PATH_IMPRIP=@IMPRIP@ # pathname of IRIX
+ POSIXLY_CORRECT=1; export POSIXLY_CORRECT # disable GNU extensions
+
+ #
+ # Location of sysv init script
+ #
+-DIR_SYSVINIT=@SYSVINITDIR@
++DIR_SYSVINIT="systemd"
+ FAXQ_SERVER=@FAXQ_SERVER@
+ HFAXD_SERVER=@HFAXD_SERVER@
+ HFAXD_SNPP_SERVER=@HFAXD_SNPP_SERVER@
+
+ #
+@@ -1892,11 +1892,20 @@ fi
+ #
+ # Check that for servers being started at system boot.
+ #
+ if onServer; then
+ signalINETD=no
+- if [ -f ${DIR_SYSVINIT}/hylafax ]; then
++ ishylaInit ()
++ {
++ if [ "${DIR_SYSVINIT}" = "systemd" ]; then
++ systemctl -q is-enabled hylafax-hfaxd.service
++ else
++ [ -f ${DIR_SYSVINIT}/hylafax ]
++ fi
++ }
++
++ if ishylaInit; then
+ # started by init at boot time
+ if [ $FAXQ_SERVER = no ]; then
+ cat <<EOF
+
+ Warning faxq will NOT be automatically started on reboot!
+@@ -2410,11 +2419,14 @@ if onServer; then
+
+ Warning: hfaxd is still running!
+
+ Something is hung. The command
+
+- kill $HFAXD
++ kill $HFAXD (SysV)
++or
++ systemctl stop hylafax-hfaxd.service (systemd)
++
+
+ did not terminate the hfaxd processes as expected.
+ EOF
+ prompt "Should we continue to wait [no]?";
+ if [ "$INTERACTIVE" != "no" ]; then
+@@ -2595,17 +2607,24 @@ EOF
+ fi
+ if isOK "$x"; then
+ for x in $DEVS; do
+ devid="`expr $x : 'config.\(.*\)'`"
+ if [ -w $DIR_SPOOL/FIFO.$devid ]; then
+- echo $DIR_SBIN/faxquit $devid
+- $DIR_SBIN/faxquit $devid >/dev/null 2>&1
++ if [ "$DIR_SYSVINIT" = "systemd" ]; then
++ systemctl enable "faxgetty@$devid.service"
++ systemctl restart "faxgetty@$devid.service"
++ else
++ echo $DIR_SBIN/faxquit $devid
++ $DIR_SBIN/faxquit $devid >/dev/null 2>&1
++ fi
+ fi
+ done
+ fi
+ else
+- if [ -f /etc/inittab ]; then
++ if [ "$DIR_SYSVINIT" = "systemd" ]; then
++ FAXGETTY="`cd /etc/systemd/system/multi-user.target.wants; echo faxgetty@*.service`"; test "$FAXGETTY" = "faxgetty@*.service" && unset FAXGETTY
++ elif [ -f /etc/inittab ]; then
+ FAXGETTY="`$GREP '[^#].*:respawn:faxgetty.*' /etc/inittab`"
+ elif [ -f /etc/ttys ]; then
+ FAXGETTY="`$GREP '[^#].*faxgetty.*' /etc/ttys`"
+ fi
+ if [ "$FAXGETTY" ]; then
+@@ -2623,11 +2642,19 @@ EOF
+ x=
+ echo
+ fi
+ if isOK "$x"; then
+ init="`findproc init`"
+- if [ "$init" ]; then
++ if [ "$DIR_SYSVINIT" = "systemd" ]; then
++ for x in $DEVS; do
++ devid="`expr $x : 'config.\(.*\)'`"
++ if [ -w $DIR_SPOOL/FIFO.$devid ]; then
++ systemctl enable "faxgetty@$devid.service"
++ systemctl restart "faxgetty@$devid.service"
++ fi
++ done
++ elif [ "$init" ]; then
+ if kill -HUP $init; then
+ echo "Sent init a SIGHUP; the faxgetty processes should be started."
+ else
+ echo "Unable to send init a SIGHUP; you may need to do this yourself."
+ fi
diff --git a/0005-hylafaxplus-faxsetup.patch b/0005-hylafaxplus-faxsetup.patch
new file mode 100644
index 00000000000..34119c76697
--- /dev/null
+++ b/0005-hylafaxplus-faxsetup.patch
@@ -0,0 +1,175 @@
+--- etc/faxsetup.sh.in.orig 2018-07-04 20:37:28.000000000 -0400
++++ etc/faxsetup.sh.in 2018-08-21 19:54:21.746958348 -0400
+@@ -39,17 +39,17 @@
+ # faxsetup [options]
+ #
+ # This script interactively prepares and verifies
+ # a HylaFAX client and/or server machine for use.
+ #
+-PATH=/bin:/usr/bin:/etc
+-test -d /usr/ucb && PATH=$PATH:/usr/ucb # Sun and others
+-test -d /usr/bsd && PATH=$PATH:/usr/bsd # Silicon Graphics
+-test -d /usr/5bin && PATH=/usr/5bin:$PATH:/usr/etc # Sun and others
+-test -d /usr/sbin && PATH=/usr/sbin:$PATH # 4.4BSD-derived
+-test -d /usr/local/bin && PATH=$PATH:/usr/local/bin # for GNU tools
+-test -d /usr/gnu/bin && PATH=$PATH:/usr/gnu/bin # for GNU tools (SCO)
++#PATH=/bin:/usr/bin:/etc
++#test -d /usr/ucb && PATH=$PATH:/usr/ucb # Sun and others
++#test -d /usr/bsd && PATH=$PATH:/usr/bsd # Silicon Graphics
++#test -d /usr/5bin && PATH=/usr/5bin:$PATH:/usr/etc # Sun and others
++#test -d /usr/sbin && PATH=/usr/sbin:$PATH # 4.4BSD-derived
++#test -d /usr/local/bin && PATH=$PATH:/usr/local/bin # for GNU tools
++#test -d /usr/gnu/bin && PATH=$PATH:/usr/gnu/bin # for GNU tools (SCO)
+
+ AWK=@AWK@ # awk for use below
+ CAT=@CAT@ # cat command for use below
+ CHGRP=@CHGRP@ # change file group for use below
+ CHMOD=@CHMOD@ # change file mode for use below
+@@ -58,10 +58,11 @@ CP=@CP@ # cp command for use below
+ ECHO=@ECHO@ # echo command for use below
+ ENCODING=@ENCODING@ # encoding style for uuencode/mimencode
+ FILECMD=@FILECMD@ # command for determining filetypes
+ FUSER=@FUSER@ # fuser command to dump in setup.cache
+ GREP=@GREP@ # grep command for use below
++unset LN
+ LN=@LN@ # ln command for use below
+ LN_S=@LN_S@ # ln option for creating a symbolic link
+ MIMENCODE=@MIMENCODE@ # mimencode command to dump in setup.cache
+ MKFIFO=@MKFIFO@ # FIFO creation program for use below
+ MV=@MV@ # move file for use below
+@@ -627,11 +628,11 @@ EOF
+ }
+ ;;
+ *)
+ dumpTTYFuncs()
+ {
+- Note ""
++ # Note ""
+ Note "Beware, I am guessing the tty naming conventions for your system."
+ cat<<'EOF'
+ ttyPort()
+ {
+ expr $1 : 'tty\(.*\)'
+@@ -1236,13 +1237,13 @@ if onClient; then
+ }
+ # If configure --with-PATH_AFM=<path> was used then we need to include it first.
+ RUNTIME_PATH_AFM=$PATH_AFM:`getGSFonts`
+ if [ -n "$RUNTIME_PATH_AFM" \
+ -a "$RUNTIME_PATH_AFM" != "$PATH_AFM" ]; then
+- Note ""
++ # Note ""
+ FONTPATHS=`echo $RUNTIME_PATH_AFM | sed 's/:/ /g'`
+- $PATH_GSRIP -q -sDEVICE=tiffg3 -sFONTPATH="$FONTPATHS" $DIR_SPOOL/bin/genfontmap.ps > $DIR_SPOOL/etc/Fontmap.HylaFAX 2>/dev/null
++ $PATH_GSRIP -q -sDEVICE=tiffg3 -sFONTPATH="$FONTPATHS" $DIR_SPOOL/bin/genfontmap.ps | $DIR_SPOOL/bin/fmfix.pl > $DIR_SPOOL/etc/Fontmap.HylaFAX 2>/dev/null
+ # Ghostscript 8.71 segfaults on that, but produces a valid Fontmap file, so we don't test exit code, but examine the product, instead.
+ {
+ #
+ # genfontmap.ps really just gives us a copy of Fontmap.GS, and in later Ghostscript versions there
+ # are many Fontmap.GS references that are left undefined. This may work for Ghostscript, but
+@@ -1269,20 +1270,20 @@ if onClient; then
+ $RM -f $tmpfile
+ $MV -f $newfontmap $fontmap
+ }
+ if [ -n "`$GREP Courier-Bold $DIR_SPOOL/etc/Fontmap.HylaFAX`" ]; then
+ FONTMAP="$DIR_SPOOL/etc"
+- Note ""
++ # Note ""
+ Note "Created our own Fontmap file in $DIR_SPOOL/etc."
+- Note ""
++ # Note ""
+ else
+ FONTMAP="$RUNTIME_PATH_AFM"
+ $RM -f $DIR_SPOOL/etc/Fontmap.HylaFAX
+ fi
+- Note ""
++ # Note ""
+ Note "Setting Ghostscript font path in $DIR_LIBDATA/hyla.conf."
+- Note ""
++ # Note ""
+ if [ -f $DIR_LIBDATA/hyla.conf ]; then
+ $AWK '!/^FontMap|^FontPath|\/FontPath added by/ { print }' \
+ $DIR_LIBDATA/hyla.conf > $DIR_LIBDATA/hyla.conf.tmp
+ fi
+ echo "# FontMap/FontPath added by faxsetup (`date 2>/dev/null`)" \
+@@ -1299,11 +1300,13 @@ fi
+ #
+ if onClient; then
+ FDIRS=`echo $PATH_AFM | sed "s/:/ /g"`
+ MATCH=
+ for FDIR in $FDIRS; do
+- if [ -d $FDIR ]; then
++ if [ ! -d "$FDIR" -a "$FDIR" = "/usr/share/ghostscript/fonts" ]; then
++ echo -n ""
++ elif [ -d $FDIR ]; then
+ cd $FDIR
+ if [ -n "`ls | grep '\.afm'`" ] || [ -f Courier ]; then
+ MATCH=$FDIR
+ break
+ fi
+@@ -1435,30 +1438,30 @@ EOF
+ $RM bin/ps2fax
+ $RM bin/pdf2fax
+ if [ -n "$LN_S" ]; then
+ $LN $LN_S ps2fax.$PS bin/ps2fax;
+ if [ $PS = gs ]; then
+- Note ""
++ # Note ""
+ Note "Make $DIR_SPOOL/bin/pdf2fax a link to $DIR_SPOOL/bin/pdf2fax.$PS."
+- Note ""
++ # Note ""
+ $LN $LN_S pdf2fax.$PS bin/pdf2fax;
+ else
+- Note ""
++ # Note ""
+ Note "Server-side PDF conversion is not supported on this system."
+- Note ""
++ # Note ""
+ fi
+ else
+ $LN bin/ps2fax.$PS bin/ps2fax;
+ if [ $PS = gs ]; then
+- Note ""
++ # Note ""
+ Note "Make $DIR_SPOOL/bin/pdf2fax a link to $DIR_SPOOL/bin/pdf2fax.$PS."
+- Note ""
++ # Note ""
+ $LN bin/pdf2fax.$PS bin/pdf2fax;
+ else
+- Note ""
++ # Note ""
+ Note "Server-side PDF conversion is not supported on this system."
+- Note ""
++ # Note ""
+ fi
+ fi
+ fi
+
+ #
+@@ -2096,12 +2099,12 @@ if onServer; then
+ cat<<EOF
+
+ HylaFAX configuration parameters are:
+
+ [1] Init script starts faxq: $FAXQ_SERVER
+- [2] Init script starts hfaxd $HFAXD_SERVER
+- [3] Start paging protocol: $HFAXD_SNPP_SERVER
++ [2] Init script starts hfaxd: $HFAXD_SERVER
++ [3] Start paging protocol (SNPP): $HFAXD_SNPP_SERVER
+ EOF
+ }
+
+ promptForParameter()
+ {
+@@ -2658,11 +2661,11 @@ EOF
+ if isOK "$x"; then
+ for x in $DEVS; do
+ devid="`expr $x : 'config.\(.*\)'`"
+ if [ -w $DIR_SPOOL/FIFO.$devid ]; then
+ echo $DIR_SBIN/faxmodem $devid
+- $DIR_SBIN/faxmodem $devid >/dev/null 2>&1
++ $DIR_SBIN/faxmodem $devid # >/dev/null 2>&1 # Hiding these errors is counter productive!
+ fi
+ done
+ fi
+ fi
+ fi
diff --git a/PKGBUILD b/PKGBUILD
index 4e7d03ec39f..c7c31069870 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -21,6 +21,7 @@
# TODO: Better default font.
# TODO: Fix faxd-makefile-bug on make install
# TODO: Improve systemd code now that it's out of sed and in patch
+# TODO: Remove hfaxd.service and faxq.service symlinks
# Setting these skel defaults will make adding modems easier.
@@ -54,8 +55,8 @@ _opt_pagesize="Letter" # A4, Letter, Legal
# man faxq # used only if modems are present on this system
# man hfaxd # also read the part about SNPP
# Enable the ones you want. faxsetup will start them.
-# systemctl enable faxq
-# systemctl enable hfaxd
+# systemctl enable hylafax-faxq
+# systemctl enable hylafax-hfaxd
# sudo faxsetup
@@ -96,8 +97,8 @@ _opt_pagesize="Letter" # A4, Letter, Legal
# upgrade. This PKGBUILD is programmed to not require this.
# Are the services running?
-# systemctl status faxq
-# systemctl status hfaxd
+# systemctl status hylafax-faxq
+# systemctl status hylafax-hfaxd
# systemctl list-units 'faxgetty@*.service'
# systemctl list-timers 'hylafax.timer'
@@ -172,8 +173,8 @@ _opt_pagesize="Letter" # A4, Letter, Legal
set -u
pkgname='hylafaxplus'
_pkgnick='hylafax'
-pkgver='5.5.9'
-pkgrel='3'
+pkgver='5.6.0'
+pkgrel='1'
_sendfaxvsicommit='18fabc74490362cd26690331d546d727c727db25'
pkgdesc='Enterprise Fax Server'
arch=('i686' 'x86_64')
@@ -199,7 +200,7 @@ provides=("hylafax=${pkgver}")
conflicts=('hylafax')
# backup=(var/spool/hylafax/bin/{faxrcvd,notify})
install="${_pkgnick}.install"
-# 'var/spool/hylafax/etc/hosts.hfaxd') # This is better handled with a .default file.
+# 'var/spool/hylafax/etc/hosts.hfaxd') # This is better handled with a .default file.
_verwatch=("${url}" 'news/\([0-9\.]\+\)\.php' 'l')
source=(
"https://downloads.sourceforge.net/hylafax/${_pkgnick}-${pkgver}.tar.gz"
@@ -210,15 +211,19 @@ source=(
'0002-typerules.vertical.margins.patch'
'0003-graphic.logo.instructions.patch'
'0004-hylafaxplus-systemd.patch'
+ '0004a-hylafaxplus-systemd.patch'
+ '0005-hylafaxplus-faxsetup.patch'
)
-sha256sums=('22e6b98ae008a37b44136b4d08c85bdc2ef8f90629de424e06ec308063a47e30'
+sha256sums=('d905b4c70ed22d765427bd67cc16e9fed6a0e33bffa06aff6665cdc427090589'
'0aed186ab30fdb7cf36895a0ff50b03bd4a68db63cf4f19763995dabd9caffb0'
- '613140010f9373998b441eaf7408b59877d00e1f4edb379740d27ccb93250272'
+ '466ab17cdaa1eb1f1f0b5bdc444a90df5835a1896b1363584264920bbc3929f2'
'80d2e28ee7a7d8f93501e32c96e9895e242409da1326761d36dbf28e5a0e3677'
'dd4728f8204d0bba2a026768f0e0216778ed26583c3f799f6266554e21b48fe2'
- '0a24bee3159a74440a00783c5da1ee2a5e529e46a26a9a91b6be72a5167f40f3'
+ '5f19fa1f3b12fd480f4c28a9a2bdf041359d5510e1040b735d5f312071dcbd04'
'b4b93c149164ed7c96f4f04373c32198c1e19c89ca9e2ab6e92e17c0a48bd1af'
- '989d6f71a8cfe99a3ca983981f8d8e9368776e2fc7667a809755d8d7292d52ad')
+ '989d6f71a8cfe99a3ca983981f8d8e9368776e2fc7667a809755d8d7292d52ad'
+ '528f267805203b792741423f46114fee7b48664f1aab35a0edff7d519555ccc2'
+ 'e2b43c19705ce112dd3a08ecd0cae4c5558910366291524566cdd5890b2c6095')
# The HylaFAX binaries work very well. The scripts need major fixes!
# HylaFAX+ is pretty much completely broken for any Linux install,
# and some parts are broken for other Unix too. The original HylaFAX
@@ -255,6 +260,7 @@ prepare() {
# sbin is deprecated and should not be used. We'll obliterate
# all uses of /sbin. Some /sbin not applicable to our OS are left alone.
+ #cp -p 'configure'{,.Arch}
sed -e 's:^\(DIR_SBIN=/usr/local/\)sbin$:\1bin:g' \
-e 's|:/sbin:\($PATH\)|:\1|g' \
-e 's|\(findApp [^ ]\+ \)/sbin:\($PATH\)|\1\2|g' \
@@ -263,6 +269,7 @@ prepare() {
-e 's:^\(test -d /usr/sbin &&\):#\1:g' \
-e 's:^#!/bin/sh$:#!/usr/bin/dash:g' \
-i 'configure'
+ test ! -s 'configure.Arch' || echo "${}"
# Eliminate all uses of /bin/sh which on Arch Linux is bash. configure gets
# some of them. dash is partly for performance on high volume fax servers
@@ -273,40 +280,20 @@ prepare() {
sed -e 's:execl("/bin/sh":execl("/usr/bin/dash":g' -i faxd/{faxApp.c++,faxGettyApp.c++}
#cp -p 'etc/faxsetup.sh.in'{,.Arch}
- # diff -pNau5 'etc/faxsetup.sh.in'{.Arch,} > '0004-hylafaxplus-systemd.patch'
- patch -Nup0 < "${srcdir}/0004-hylafaxplus-systemd.patch"
-
- sed -e '# Fix FAXD= typo' \
- -e 's:^\(\s\+\)\(FAXD="`findproc hfaxd`"\)$:\1H\2:g' \
- -e "# Remove ' for mcedit syntax highlighter" \
- -e 's:\([dD]on\)'"'"'t:\1t:g' \
- -e "# This would have been easier to fix if the error wasn't hidden" \
- -e 's:^\(\s\+\)\($DIR_SBIN/faxmodem $devid\)\( >/dev/null 2>&1\)$:\1\2 #\3 # Hiding these errors is counter productive!:g' \
- -e '# Fix LN for anyone who has LN in their environment' \
- -e 's:^\(LN=\):unset LN\n\1:g' \
- -e '# vgetty and egetty are not readily available on Arch Linux so kill the warning.' \
- -e '# Supress warning: /bin/vgetty does not exist or is not an executable program!' \
- -e '# Supress warning: /bin/egetty does not exist or is not an executable program!' \
- -e 's|^\(\s\+\)\(test -x $PATH_\)\([VE]GETTY\)\(.\+\)$|\1echo "\3 not available for Arch Linux" # \2\3\4 # http://www.hylafax.org/site2/HylaFAQ/Q360.html Q360: The truth about egetty/vgetty|g' \
- -e '# The gsfonts are likely to never be again placed in this folder.' \
- -e '# Why does gs report the folder in the search path?' \
- -e '# Supress warning: /usr/share/ghostscript/fonts does not exist or is not a directory!' \
- -e 's|^\(\s\+\)\(if \[ -d $FDIR \]; then\)$|\1if [ ! -d "$FDIR" -a "$FDIR" = "/usr/share/ghostscript/fonts" ]; then\n\1 echo -n ""\n\1el\2|g' \
+ # diff -pNau5 'etc/faxsetup.sh.in'{.Arch,} > '0004a-hylafaxplus-systemd.patch'
+ patch -Nbup0 -i "${srcdir}/0004a-hylafaxplus-systemd.patch"
+ sed -e 's:/bin/systemctl:/usr/bin/systemctl:g' -i 'etc/faxsetup.sh.in'
+ test ! -s 'etc/faxsetup.sh.in.Arch' || echo "${}"
+
+ #cp -p 'etc/faxsetup.sh.in'{,.Arch}
+ # diff -pNau5 'faxsetup.sh.in'{.orig,} > '0005-hylafaxplus-faxsetup.patch'
+ patch -Nbup0 -i "${srcdir}/0005-hylafaxplus-faxsetup.patch"
+ sed -Ee "# Remove ' for mcedit syntax highlighter" \
+ -e "s:([dD]on)'t:"'\1t:g' \
-e '# Branding' \
- -e 's|^\(Note "Setup program for HylaFAX (tm) $VERSION\)."$|\1-Arch Linux."|g' \
- -e '# Improve display for 25 line screens. I skipped one that would take too much regex to get.' \
- -e 's|^\(\t\t\)\(Note ""\)$|\1# \2|g' \
- -e 's|^\(\t \)\(Note ""\)$|\1# \2|g' \
- -e '# Fix genfontmap output to get rid of glyph metric error.' \
- -e 's:\($DIR_SPOOL/bin/genfontmap.ps\) \(> $DIR_SPOOL/etc/Fontmap.HylaFAX\):\1 | $DIR_SPOOL/bin/fmfix.pl \2:g' \
- -e '# Fix some typos. Clarify SNPP.' \
- -e 's|\(\[2\] Init script starts hfaxd\)|\1:|g' \
- -e 's|\(\[3\] Start paging protocol\):\t|\1 (SNPP):|g' \
- -e '# More sbin fixes' \
- -e 's:^\(test -d /usr/sbin &&\):#\1:g' \
- -e '# Remove /etc from path' \
- -e 's|^\(PATH\)=.\+$|\1=/usr/bin:/usr/local/sbin|g' \
- -i 'etc/faxsetup.sh.in'
+ -e 's:^(Note "Setup program for HylaFAX (tm) \$VERSION)."$:\1-Arch Linux.":g' \
+ -i 'etc/faxsetup.sh.in'
+ test ! -s 'etc/faxsetup.sh.in.Arch' || echo "${}"
# Var $TTY clashes with the Arch Linux environment and likely all other Linux
# too. $TTY contains the terminal device from `tty`. With this already set
@@ -334,6 +321,8 @@ prepare() {
# same as faxaddmodem ttyUSB0.
# With all these bugs fixed you can install HylaFAX+ the way it was
# originally designed, and it's not very hard.
+ #cp -p 'etc/faxaddmodem.sh.in'{,.Arch}
+ #cp -p 'etc/probemodem.sh.in'{,.Arch}
sed -e 's:$TTY\>:$MDMTTY:g' \
-e 's:\<TTY=:MDMTTY=:g' \
-e 's:\<read TTY\>:read MDMTTY:g' \
@@ -341,33 +330,20 @@ prepare() {
-e 's?^\(\s\+\)\(prompt "Serial port that modem is connected to .\+\)$?\1echo ""\n\1echo "Leave /dev off if your device is in /dev"\n\1echo "Examples: ttyUSB0, ttyACM0, ttyS0"\n\1\2\n\1test "$MDMTTY" || (cd /dev; ls tty[^0-9]*)\n\1cleanMDM "$DEVPATH" "$MDMTTY"?g' \
-e 's?$DEVPATH$MDMTTY?$SHOWTTY?g' \
-i etc/{faxaddmodem,probemodem}.sh.in
+ test ! -s 'etc/faxaddmodem.sh.in.Arch'
+ test ! -s 'etc/probemodem.sh.in.Arch'
# It is not necessary to add faster baud rates to the 2 modem scripts.
# 38400 is only the speed at which the script will test the modem.
# The modem config will set the proper speed during use.
- # quick grammar error fix
- sed -e 's:^a \(modem device \):\1:g' -i 'man/ondelay.1m'
-
- # unknown isn't good enough for me. Let's brand!
- # We don't brand any of the build files which just get deleted anyways.
- # sed -e 's:-unknown-linux-:-arch-linux-:g' -s -i etc/{faxaddmodem,probemodem,faxsetup}.sh.in
- # This crude branding was eliminated by the configure option above.
-
- # A patch from the Gentoo hylafaxplus ebuild. hostname -f produces a useless result on my system
- # sed -e 's:hostname:hostname -f:g' -i util/{faxrcvd,pollrcvd}.sh.in
- # More patches from the Gentoo hylafaxplus ebuild
- # Respect LDFLAGS(at least partially)
- # sed -e "/^LDFLAGS/s/LDOPTS}/LDOPTS} ${LDFLAGS}/" -i 'defs.in'
- # sed -e 's|-fpic|-fPIC|g' -i 'configure'
-
# A serious error that needs a bit more explanation before somebody gets fired for crashing the fax server.
sed -e 's|\(emsg = fxStr::format("Unable to open scheduler FIFO: %s\)\(",\)$|\1 (try running faxsetup)\2|g' \
-i 'hfaxd/FIFO.c++'
# Provide clear instructions to remove and replace the SGI logo
# diff -pNau5 cover.templ{.default,} > '0003-graphic.logo.instructions.patch'
- patch -d 'util' -Nup0 < "${srcdir}/0003-graphic.logo.instructions.patch"
+ patch -d 'util' -Nup0 -i "${srcdir}/0003-graphic.logo.instructions.patch"
set +u
@@ -381,6 +357,8 @@ build() {
if [ ! -s 'Makefile' ]; then
# On my system LN has something in it. Short variable names should be avoided in scripts.
LN= \
+ CHOWN="${srcdir}/chown" \
+ CHGRP="${srcdir}/chgrp" \
./configure \
--nointeractive \
--with-OPTIMIZER="${CFLAGS}" \
@@ -405,9 +383,37 @@ build() {
package() {
set -u
cd "${_pkgnick}-${pkgver}"
- make -j1 INSTALLROOT="${pkgdir}" install
- # My crude VSI-FAX tag support
+ local _chown="${pkgdir}/_install_chown.sh"
+
+ # create chgrp capture
+ install -Dm755 <(cat << EOF
+#!/bin/bash
+
+echo " chgrp" \$(printf " '%s'" "\$@") >> "${_chown}"
+EOF
+ ) "${srcdir}/chgrp"
+ # create chown capture
+ install -Dm755 <(cat << EOF
+#!/bin/bash
+
+echo " chown" \$(printf " '%s'" "\$@") >> "${_chown}"
+EOF
+ ) "${srcdir}/chown"
+ echo -e "#!/bin/sh\n\n_fn_install() {" > "${_chown}"
+
+ make -j1 INSTALLROOT="${pkgdir}" install
+ echo -e "}\n_fn_install" >> "${_chown}"
+ sed -e '# Remove pkgdir from script' \
+ -e "s:${pkgdir}::g" \
+ -e '# This file doesnt at the point where this is run in .install and we just chown them again' \
+ -e '/hosts.hfaxd/ s:^:#:g' \
+ -i "${_chown}"
+ sed -e "s:${srcdir}:/usr/bin:g" -i "${pkgdir}/usr/bin/faxsetup"
+ mv "${_chown}" "${pkgdir}/var/spool/hylafax/bin/"
+ unset _chown
+
+ # My crude vsi-fax tag support
make -C "${srcdir}/sendfaxvsi-${_sendfaxvsicommit}" -j1 install DESTDIR="${pkgdir}" BINDIR='/usr/bin'
# Thanks to looking at everything in mc I can see that these files have the wrong permissions.
@@ -437,13 +443,13 @@ package() {
# and that's only if the admin knows what to do because the errors on
# sendfax don't reveal much about the problem.
# 460 Failed to submit job 6: Unable to open scheduler FIFO: No such file or directory.
- # See above for where we amend this error to give the poor admin a chance.
+ # See patch where we amend this error to give the poor admin a chance.
# Removing the FIFO here ensures that the system will continue to run
# after an upgrade until it is convenient to run faxsetup to restart the
# daemons. Besides, the FIFO from the package is not made correctly.
rm -f "${pkgdir}/var/spool/hylafax/FIFO"
- # My fixer tool to get rid of the glyph metrics warning. Look above for where sed hacks this in.
+ # My fixer tool to get rid of the glyph metrics warning. Look where patch hacks this in.
# Alternate solution: ftp://ftp.hylafax.org/contrib/fontmap/fontmap.pl
# Alternate solution: configure --with-AFM=no (seems supported only in HylaFAX, not HylaFAX+)
install -Dpm744 "${srcdir}/fmfix.pl" "${pkgdir}/var/spool/hylafax/bin"
@@ -488,13 +494,13 @@ EOF
# Add dial rules for USA 7 and 10 digit numbers. The posted examples have them in the wrong order.
# diff -pNau5 dialrules{.default,} > '0001-dialrules.7-10.digits.USA.patch'
- patch -d "${pkgdir}/var/spool/hylafax/etc" -Nup0 < "${srcdir}/0001-dialrules.7-10.digits.USA.patch"
+ patch -d "${pkgdir}/var/spool/hylafax/etc" -Nup0 -i "${srcdir}/0001-dialrules.7-10.digits.USA.patch"
install -Dpm755 "${srcdir}/localnxxtoregex.sh" -t "${pkgdir}/usr/bin"
# top and bottom margin patch because fax doesn't do page layout like a regular printer
# http://aplawrence.com/Linux/hylafax-scripts.html
# diff -pNau5 typerules{.orig,} > '0002-typerules.vertical.margins.patch'
- patch -d "${pkgdir}/usr/lib/fax" -Nup0 < "${srcdir}/0002-typerules.vertical.margins.patch"
+ patch -d "${pkgdir}/usr/lib/fax" -Nup0 -i "${srcdir}/0002-typerules.vertical.margins.patch"
# More user customizable files from the Slackbuild
pushd "${pkgdir}/var/spool/hylafax/etc" > /dev/null
@@ -529,7 +535,9 @@ ExecReload=/bin/kill -HUP \$MAINPID
[Install]
WantedBy=multi-user.target
EOF
- ) "${pkgdir}/usr/lib/systemd/system/hfaxd.service"
+ ) "${pkgdir}/usr/lib/systemd/system/hylafax-hfaxd.service"
+ # Compatibility mode for the old service names
+ ln -s '/usr/lib/systemd/system/hylafax-hfaxd.service' "${pkgdir}//usr/lib/systemd/system/hfaxd.service"
install -Dm644 <(cat << EOF
# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
# https://aur.archlinux.org/
@@ -546,7 +554,8 @@ ExecReload=/bin/kill -HUP \$MAINPID
[Install]
WantedBy=multi-user.target
EOF
- ) "${pkgdir}/usr/lib/systemd/system/faxq.service"
+ ) "${pkgdir}/usr/lib/systemd/system/hylafax-faxq.service"
+ ln -s '/usr/lib/systemd/system/hylafax-faxq.service' "${pkgdir}//usr/lib/systemd/system/faxq.service"
install -Dm644 <(cat << EOF
# This file is part of systemd.
#
diff --git a/fmfix.pl b/fmfix.pl
index 2d0762155be..9fce6c0d25a 100755
--- a/fmfix.pl
+++ b/fmfix.pl
@@ -124,6 +124,10 @@ $fontxlat{'CharterBT-Bold'}="n021004l.pfb";
$fontxlat{'CharterBT-BoldItalic'}="n021024l.pfb";
$fontxlat{'CharterBT-Italic'}="n021003l.pfb";
$fontxlat{'CharterBT-Roman'}="n021023l.pfb";
+# Nimbus Sans Lite looks good to me
+$fontxlat{'NimbusSans-BoldItalic'}="n019024l.pfb";
+$fontxlat{'NimbusSansNarrow-BoldOblique'}="n019064l.pfb"; # an exact match!
+$fontxlat{'NimbusSans-Italic'}="n019023l.pfb";
# Convert all lines of the form
# (BoringFontName)\t/AnotherBoringFontName ;
diff --git a/hylafax.install b/hylafax.install
index d37b448035a..df6b61a3940 100644
--- a/hylafax.install
+++ b/hylafax.install
@@ -46,6 +46,7 @@ _clean_or_copy() {
post_upgrade() {
set -u
+ /usr/bin/sh "${_hyhome}/bin/_install_chown.sh"
# Only some of the files and folders are chown
chown "${_hyuser}:${_hygroup}" "${_hyhome}"/{,archive,bin,client,config,dev,docq,doneq,etc}
chown "${_hyuser}:${_hygroup}" "${_hyhome}"/{info,log,pollq,recvq,sendq,status,tmp}