diff options
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | 0006-hylafaxplus-jobfmt-assigned-modem-to-used-modem.patch | 12 | ||||
-rw-r--r-- | PKGBUILD | 251 | ||||
-rw-r--r-- | hylafax.install | 2 | ||||
-rwxr-xr-x | localnxxtoregex.sh | 108 |
5 files changed, 311 insertions, 95 deletions
@@ -1,14 +1,18 @@ # Generated by mksrcinfo v8 -# Fri Jan 14 00:00:24 UTC 2022 +# Thu Feb 8 22:07:06 UTC 2024 pkgbase = hylafaxplus pkgdesc = Enterprise Fax Server - pkgver = 7.0.4 - pkgrel = 1 + pkgver = 7.0.7 + pkgrel = 3 url = http://hylafax.sourceforge.net/ install = hylafax.install arch = i686 arch = x86_64 license = custom + depends = glibc + depends = libtiff>=4.6.0 + depends = bash + depends = perl depends = dash depends = libtiff depends = pam @@ -17,6 +21,12 @@ pkgbase = hylafaxplus depends = jbigkit depends = lcms2 depends = gawk + depends = libjpeg-turbo + depends = libldap + depends = libxcrypt + depends = openssl + depends = zlib + depends = libtiff5-hylafaxplus optdepends = smtp-server: email support optdepends = avantfax: manage HylaFAX+ through web browser optdepends = t38modem: sip/voip fax modem pool interface @@ -26,9 +36,10 @@ pkgbase = hylafaxplus optdepends = yajhfc: hylafax client in Java optdepends = mainpine-rfuser: reset utility for MainPine modems optdepends = tgif: Cover Page Customization - provides = hylafax=7.0.4 + provides = hylafax=7.0.7 conflicts = hylafax - source = https://downloads.sourceforge.net/hylafax/hylafax-7.0.4.tar.gz + options = !buildflags + source = https://downloads.sourceforge.net/hylafax/hylafax-7.0.7.tar.gz source = sendfaxvsi-1.0.0.tgz::https://github.com/severach/sendfaxvsi/archive/18fabc74490362cd26690331d546d727c727db25.tar.gz source = fmfix.pl source = localnxxtoregex.sh @@ -40,29 +51,29 @@ pkgbase = hylafaxplus source = 0005-hylafaxplus-faxsetup.patch source = 0006-hylafaxplus-jobfmt-assigned-modem-to-used-modem.patch source = 1000-hylafaxplus-modem-support.patch - md5sums = af3e1c241965891fedaa5ce2e7b266e7 + md5sums = 17ec4957f66ef422afe928eeb4a879d9 md5sums = 3af38f1eaa4f9fb92cac2f0cf9544321 md5sums = 916f2c100eb2b41ef6b35f96bdb9444a - md5sums = c1d54ea1f50abfb3834488b428754714 + md5sums = ae0a86260ab7ed94187a5d8e560a82ac md5sums = 0edd9dbf9b745437a5a4c174d6418e96 md5sums = a2d08cfd91be2aa608dd3bc9ef6c69bc md5sums = c8c3aab59725c20eddc7d31d21c7b31e md5sums = fd0395521f6c2b8681e5fbcfd943043d md5sums = a14922b05223f703c41dff8035477706 md5sums = 0de848f554e2a93c09352eadb2b2e260 - md5sums = f6692d5cb0033abe7865c47ec581ea87 + md5sums = 151567ca960d860c88ff0e5154cb5b78 md5sums = dd1e2859dd1cc13db863ba74bc539ca0 - sha256sums = 2512e93d23bd04c12304c67fefb1646735c4bcb5d75b866adf91a89ed1098bf8 + sha256sums = 8b9bcd4fe25f08b658e6cfcb3514183c22cbbfdf7166fa092510011a8228f88d sha256sums = 0aed186ab30fdb7cf36895a0ff50b03bd4a68db63cf4f19763995dabd9caffb0 sha256sums = 466ab17cdaa1eb1f1f0b5bdc444a90df5835a1896b1363584264920bbc3929f2 - sha256sums = 80d2e28ee7a7d8f93501e32c96e9895e242409da1326761d36dbf28e5a0e3677 + sha256sums = 8b2dbf38d13d0c25e6164e691187b4f45ae971c009e80911cd96aac0f61cf871 sha256sums = dd4728f8204d0bba2a026768f0e0216778ed26583c3f799f6266554e21b48fe2 sha256sums = 5f19fa1f3b12fd480f4c28a9a2bdf041359d5510e1040b735d5f312071dcbd04 sha256sums = b4b93c149164ed7c96f4f04373c32198c1e19c89ca9e2ab6e92e17c0a48bd1af sha256sums = 989d6f71a8cfe99a3ca983981f8d8e9368776e2fc7667a809755d8d7292d52ad sha256sums = 528f267805203b792741423f46114fee7b48664f1aab35a0edff7d519555ccc2 sha256sums = e2b43c19705ce112dd3a08ecd0cae4c5558910366291524566cdd5890b2c6095 - sha256sums = 96d106278ac68b95f0d1916f76066904c2108a2bb0c97651c22d025d989f4acb + sha256sums = 4efef67287b2b5ebaa2485ac5be5a62d2a86b2830b416f7a6905cfe17d6e76bb sha256sums = 98e79e16e9cda5bb853501daaac7734cd5a367eb7543990f6a3c16fef49d0968 pkgname = hylafaxplus diff --git a/0006-hylafaxplus-jobfmt-assigned-modem-to-used-modem.patch b/0006-hylafaxplus-jobfmt-assigned-modem-to-used-modem.patch index 0bca9bc3dc33..4d6882215bfe 100644 --- a/0006-hylafaxplus-jobfmt-assigned-modem-to-used-modem.patch +++ b/0006-hylafaxplus-jobfmt-assigned-modem-to-used-modem.patch @@ -1,6 +1,6 @@ ---- hfaxd/Jobs.c++.Arch 2018-06-27 18:15:01.000000000 -0400 -+++ hfaxd/Jobs.c++ 2019-03-29 20:57:09.408205318 -0400 -@@ -2240,11 +2240,17 @@ HylaFAXServer::Jprintf(FILE* fd, const c +--- hfaxd/Jobs.c++.Arch 2020-07-31 18:37:47.000000000 -0400 ++++ hfaxd/Jobs.c++ 2022-01-25 15:31:31.103951194 -0500 +@@ -2252,11 +2252,17 @@ HylaFAXServer::Jprintf(FILE* fd, const c break; case 'l': fprintf(fd, fspec, job.pagelength); @@ -8,11 +8,11 @@ case 'm': - fprintf(fd, fspec, (const char*) job.modem); + { -+ const char *p=job.modemused; ++ const char *q,*p=job.modemused; + if (*p == '\0') p=job.modem; + if (0==strcmp(p,"any")) p=""; -+ if ( p[0]=='t' && p[1]=='t' && p[2]=='y') p+=3; -+ fprintf(fd, fspec, (const char*) p); ++ q=strstr(p,"tty"); /* I'd rather search backwards */ ++ fprintf(fd, fspec, q?(q+3):p); + } break; case 'n': @@ -177,17 +177,31 @@ _opt_pagesize="Letter" # A4, Letter, Legal # http://lists.opensuse.org/opensuse/2009-09/msg00269.html # Re: [opensuse] Update Hylafax 4.4 to 6.03 with src.rpm on OpenSuSE 10.3 +# 0 use external libtiff package (libtiff5 or libtiff-hylafaxplus) +# 1 include libtiff in hylafaxplus +_opt_Integrated_LIBTIFF=0 + +# 0 link hylafaxplus executables to external libtiff (libtiff5 or libtiff-hylafaxplus) +# 1 link to system libtiff. New versions are often incompatible. +_opt_HF_System_LIBTIFF=1 + set -u pkgname='hylafaxplus' _pkgnick='hylafax' -pkgver='7.0.4' -pkgrel='1' +pkgver='7.0.7' +pkgrel='3' _sendfaxvsicommit='18fabc74490362cd26690331d546d727c727db25' pkgdesc='Enterprise Fax Server' arch=('i686' 'x86_64') url='http://hylafax.sourceforge.net/' license=('custom') -depends=('dash' 'libtiff' 'pam' 'ghostscript' 'sharutils' 'jbigkit' 'lcms2' 'gawk') # 'gsfonts-type1') # 'cron' +depends=('glibc' 'gcc-libs' 'bash' 'perl' 'dash' 'libtiff' 'pam' 'ghostscript' 'sharutils' 'jbigkit' 'lcms2' 'gawk' 'libjpeg-turbo' 'libldap' 'libxcrypt' 'openssl' 'zlib') # 'gsfonts-type1') # 'cron' +depends[1]='libtiff>=4.6.0' # 'libtiff<4.6.0' https://sourceforge.net/p/hylafax/mailman/message/38259441/ +if [ "${_opt_Integrated_LIBTIFF}" -eq 0 ]; then + depends+=('libtiff5-hylafaxplus') +else + provides=('libtiff5') # no =version +fi # BASE64 is the default so HylaFAX+ doesn't need uuencode but I put it in anyways to placate configure and the bin finder in faxsetup! optdepends=( 'smtp-server: email support' # this must be configured if installed or Hylafax will spam the process table with orphaned sendmail processes @@ -211,9 +225,11 @@ optdepends=( provides=("hylafax=${pkgver}") conflicts=('hylafax') # backup=(var/spool/hylafax/bin/{faxrcvd,notify}) +options=('!buildflags') # get rid of Class 1 errors No response to PPS MPS, RSPREC DCN, No receiver protocol, Failure to train remote modem install="${_pkgnick}.install" # 'var/spool/hylafax/etc/hosts.hfaxd') # This is better handled with a .default file. _verwatch=("${url}" 'news/\([0-9\.]\+\)\.php' 'l') +_srcdir="${_pkgnick}-${pkgver}" source=( "https://downloads.sourceforge.net/hylafax/${_pkgnick}-${pkgver}.tar.gz" "sendfaxvsi-1.0.0.tgz::https://github.com/severach/sendfaxvsi/archive/${_sendfaxvsicommit}.tar.gz" @@ -228,29 +244,29 @@ source=( '0006-hylafaxplus-jobfmt-assigned-modem-to-used-modem.patch' '1000-hylafaxplus-modem-support.patch' ) -md5sums=('af3e1c241965891fedaa5ce2e7b266e7' +md5sums=('17ec4957f66ef422afe928eeb4a879d9' '3af38f1eaa4f9fb92cac2f0cf9544321' '916f2c100eb2b41ef6b35f96bdb9444a' - 'c1d54ea1f50abfb3834488b428754714' + 'ae0a86260ab7ed94187a5d8e560a82ac' '0edd9dbf9b745437a5a4c174d6418e96' 'a2d08cfd91be2aa608dd3bc9ef6c69bc' 'c8c3aab59725c20eddc7d31d21c7b31e' 'fd0395521f6c2b8681e5fbcfd943043d' 'a14922b05223f703c41dff8035477706' '0de848f554e2a93c09352eadb2b2e260' - 'f6692d5cb0033abe7865c47ec581ea87' + '151567ca960d860c88ff0e5154cb5b78' 'dd1e2859dd1cc13db863ba74bc539ca0') -sha256sums=('2512e93d23bd04c12304c67fefb1646735c4bcb5d75b866adf91a89ed1098bf8' +sha256sums=('8b9bcd4fe25f08b658e6cfcb3514183c22cbbfdf7166fa092510011a8228f88d' '0aed186ab30fdb7cf36895a0ff50b03bd4a68db63cf4f19763995dabd9caffb0' '466ab17cdaa1eb1f1f0b5bdc444a90df5835a1896b1363584264920bbc3929f2' - '80d2e28ee7a7d8f93501e32c96e9895e242409da1326761d36dbf28e5a0e3677' + '8b2dbf38d13d0c25e6164e691187b4f45ae971c009e80911cd96aac0f61cf871' 'dd4728f8204d0bba2a026768f0e0216778ed26583c3f799f6266554e21b48fe2' '5f19fa1f3b12fd480f4c28a9a2bdf041359d5510e1040b735d5f312071dcbd04' 'b4b93c149164ed7c96f4f04373c32198c1e19c89ca9e2ab6e92e17c0a48bd1af' '989d6f71a8cfe99a3ca983981f8d8e9368776e2fc7667a809755d8d7292d52ad' '528f267805203b792741423f46114fee7b48664f1aab35a0edff7d519555ccc2' 'e2b43c19705ce112dd3a08ecd0cae4c5558910366291524566cdd5890b2c6095' - '96d106278ac68b95f0d1916f76066904c2108a2bb0c97651c22d025d989f4acb' + '4efef67287b2b5ebaa2485ac5be5a62d2a86b2830b416f7a6905cfe17d6e76bb' '98e79e16e9cda5bb853501daaac7734cd5a367eb7543990f6a3c16fef49d0968') # The HylaFAX binaries work very well. The scripts need major fixes! @@ -271,6 +287,121 @@ sha256sums=('2512e93d23bd04c12304c67fefb1646735c4bcb5d75b866adf91a89ed1098bf8' # Note: I only send faxes. Fax receiving might need a bunch more patches. +if [ "${_opt_Integrated_LIBTIFF}" -ne 0 ]; then +_libtiff_top() { +set -u +local _pkgname=tiff +#pkgname=libtiff +#pkgname+='5' +local pkgver=4.4.0 +#pkgrel=2 +#pkgdesc='Library for manipulation of TIFF images' +#arch=('x86_64' 'aarch64') +#url='http://www.simplesystems.org/libtiff' +license+=('custom') +depends+=('gcc-libs' 'glibc' 'libjpeg-turbo' 'libjpeg.so' 'zlib' 'xz' 'zstd') +#depends+=('libtiff>=4.6.0') +conflicts+=('libtiff<4.6.0' 'libtiff5') +_libtiff_srcdir="${_pkgname}-${pkgver}" +source+=( + "https://download.osgeo.org/libtiff/tiff-${pkgver}.tar.gz" + # fix CVE-2022-2056 / CVE-2022-2057 / CVE-2022-2058: https://bugs.archlinux.org/task/75360 + "${pkgname}-4.4.0-fpe_tiffcrop.patch::https://gitlab.com/libtiff/libtiff/-/commit/dd1bcc7abb26094e93636e85520f0d8f81ab0fab.patch" + # fix CVE-2022-34526: https://bugs.archlinux.org/task/75608 + "${pkgname}-4.4.0-CVE-2022-34526.patch::https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990.patch" +) +} +_libtiff_top + +_libtiff_prepare() { + set -u + cd "${_libtiff_srcdir}" + # apply patch from the source array (should be a pacman feature) + local _src + for _src in "${source[@]}"; do + _src="${_src%%::*}" + _src="${_src##*/}" + if [[ "${_src}" = libtiff*.patch ]]; then + echo "Applying patch ${_src}..." + patch -Np1 -i "../${_src}" + fi + done + set +u +} + +_libtiff_incdir='libtiff-hylafaxplus' +_libtiff_libdir='libtiff-hylafaxplus' + +_libtiff_build() { + set -u + local _configure_options=( + --prefix=/usr + #--sysconfdir=/etc + #--enable-ld-version-script + #--mandir=/usr/share/man + #--with-docdir=/usr/share/doc/${pkgname} + --includedir="/usr/include/${_libtiff_incdir}" + #--libdir="/usr/lib/${_libtiff_libdir}" + #--bindir='/usr/bin/hylafax' # how will all the scripts work if we move the binaries + ) + cd "${_libtiff_srcdir}" + if [ ! -s 'Makefile' ]; then + #CFLAGS+=' -fpic' + ./configure "${_configure_options[@]}" + fi + make -s + set +u +} + +_libtiff_check() { + set -u + cd "${_libtiff_srcdir}" + make check + set +u +} + +_libtiff_package() { + set -u + cd "${_libtiff_srcdir}" + make DESTDIR="${pkgdir}" install + install -Dm644 'COPYRIGHT' -t "${pkgdir}/usr/share/licenses/${pkgname}" + + cd "${pkgdir}" + local _f + for _f in tiffcp; do + mv "usr/bin/${_f}"{,.hylafax} + mv "usr/share/man/man1/${_f}"{.1,.hylafax.1} + done + for _f in tiffdump tiffinfo tiffset tiffsplit; do + rm "usr/bin/${_f}" + rm "usr/share/man/man1/${_f}.1" + done + shopt -s failglob + rm -r usr/share/{doc,man/man3} usr/lib/libtiff*.a + if :; then + rm -r 'usr/lib/pkgconfig' + install -d "usr/lib/${_libtiff_libdir}" + pushd "usr/lib/${_libtiff_libdir}" > /dev/null + mv ../libtiff*.so . + local _f + for _f in ../*.so*; do + ln -s "${_f}" + done + popd > /dev/null + fi + shopt -u failglob + #sed -e 's:^TIFFBIN=.*$:TIFFBIN=/usr/bin:g' -i "${pkgdir}/usr/bin/faxsetup" # not needed if we change TIFFBIN detection to tiffcp + set +u +} +else +_libtiff_incdir='libtiff5' +_libtiff_libdir='libtiff5' +_libtiff_prepare() { :; } +_libtiff_build() { :; } +_libtiff_check() { :; } +_libtiff_package() { :; } +fi + _pkginit() { if [ "${SOURCEONLY:-0}" -ne 0 ]; then # see makepkg -S if this var changes if [ "${_opt_FAXNumber}" != '+1.517.555.0101' ] || [ "${_opt_LocalIdentifier}" != 'ArchLinuxFAX' ]; then @@ -284,20 +415,31 @@ _pkginit unset -f _pkginit prepare() { + _libtiff_prepare; cd "${srcdir}" set -u - cd "${_pkgnick}-${pkgver}" + cd "${_srcdir}" # 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' \ - -e 's|\(findAppDef [^ ]\+ \)/sbin:\($PATH\)|\1\2|g' \ - -e 's|^\(PATH=$PATH:/bin:/usr/bin\)\(:/etc\)$|\1 # \2 # it was an insanely stupid choice for some UNIX systems to put /etc in the path!|g' \ - -e 's:^\(test -d /usr/sbin &&\):#\1:g' \ - -e 's:^#!/bin/sh$:#!/usr/bin/dash:g' \ - -i 'configure' + local _seds=( + -e 's:^\(DIR_SBIN=/usr/local/\)sbin$:\1bin:g' + -e 's|:/sbin:\($PATH\)|:\1|g' + -e 's|\(findApp [^ ]\+ \)/sbin:\($PATH\)|\1\2|g' + -e 's|\(findAppDef [^ ]\+ \)/sbin:\($PATH\)|\1\2|g' + -e 's|^\(PATH=$PATH:/bin:/usr/bin\)\(:/etc\)$|\1 # \2 # it was an insanely stupid choice for some UNIX systems to put /etc in the path!|g' + -e 's:^\(test -d /usr/sbin &&\):#\1:g' + -e 's:^#!/bin/sh$:#!/usr/bin/dash:g' + -e '# pretend, that libtiff 4.x is similar to 4.0' + -e '/tiff_runlen_t/ s:4\..\+):4.[0123456789]):' + ) + if [ "${_opt_Integrated_LIBTIFF}" -ne 0 ]; then + _seds+=( + -e '# change TIFFBIN detection to a binary still in libtiff 4.6.0 avoiding the need for -with-TIFFBIN' + -e 's:tiff2ps:tiffcp:g' + ) + fi + sed "${_seds[@]}" -i 'configure' test ! -s 'configure.Arch' || echo "${}" # Ghostscript dropped Type1 from the font path. @@ -313,13 +455,13 @@ prepare() { #cp -p 'etc/faxsetup.sh.in'{,.Arch} # diff -pNau5 'etc/faxsetup.sh.in'{.Arch,} > '0004a-hylafaxplus-systemd.patch' - patch -Nbup0 -i "${srcdir}/0004a-hylafaxplus-systemd.patch" + patch -Nup0 -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'{.Arch,} > '0005-hylafaxplus-faxsetup.patch' - patch -Nbup0 -i "${srcdir}/0005-hylafaxplus-faxsetup.patch" + patch -Nup0 -i "${srcdir}/0005-hylafaxplus-faxsetup.patch" sed -Ee "# Remove ' for mcedit syntax highlighter" \ -e "s:([dD]on)'t:"'\1t:g' \ -e '# Branding' \ @@ -329,7 +471,7 @@ prepare() { #cp -p 'hfaxd/Jobs.c++'{,.Arch} # diff -pNau5 'hfaxd/Jobs.c++'{.Arch,} > '0006-hylafaxplus-jobfmt-assigned-modem-to-used-modem.patch' - patch -Nbup0 -i "${srcdir}/0006-hylafaxplus-jobfmt-assigned-modem-to-used-modem.patch" + patch -Nup0 -i "${srcdir}/0006-hylafaxplus-jobfmt-assigned-modem-to-used-modem.patch" test ! -s 'hfaxd/Jobs.c++.Arch' || echo "${}" #cp -pr 'config'{,.Arch} @@ -393,8 +535,8 @@ prepare() { printf '#\nInclude:\t\t"etc/config-modems"\n' >> "${_cfg}" done - # pretend, that libtiff 4.x is similar to 4.0 - sed -E -e '/tiff_runlen_t/ s:4\..+\):4.[0123456789]):' -i 'configure' + # Switch tiffcp to old version that supports tiffcp -i + sed -e 's:\btiffcp\b:tiffcp.hylafax:g' -i $(grep --include 'configure' --include '*.sh*' -lr -e '\btiffcp\b' .) set +u @@ -403,27 +545,45 @@ prepare() { } build() { + _libtiff_build; cd "${srcdir}" set -u - cd "${_pkgnick}-${pkgver}" + cd "${_srcdir}" if [ ! -s 'Makefile' ]; then + local _conf=( + --nointeractive + --with-OPTIMIZER="${CFLAGS:-}" + --target="${CARCH}-arch-linux" + --with-DIR_BIN='/usr/bin' + --with-DIR_LIB='/usr/lib' + --with-DIR_LIBDATA='/usr/lib/fax' + --with-DIR_LIBEXEC='/usr/bin' + --with-DIR_MAN='/usr/share/man' + --with-DIR_SBIN='/usr/bin' + --with-SYSVINIT='no' + --with-PAGESIZE="${_opt_pagesize}" + --with-SCRIPT_SH='/usr/bin/dash' + #--with-PATH_AFM='/usr/share/fonts/Type1' #gs ignores this + ) + local _LDPATH='' + if [ "${_opt_Integrated_LIBTIFF}" -ne 0 ]; then + _conf+=( + --with-TIFFINC="-I${srcdir}/${_libtiff_srcdir}/libtiff" + --with-LIBTIFF="-L${srcdir}/${_libtiff_srcdir}/libtiff/.libs -ltiff" + #--with-TIFFBIN="${srcdir}/${_libtiff_srcdir}/tools" # not needed if we change TIFFBIN detection to tiffcp and require libtiff>=4.6.0 + ) + _LDPATH="${srcdir}/${_libtiff_srcdir}/libtiff/.libs" + elif [ "${_opt_HF_System_LIBTIFF}" -eq 0 ]; then + _conf+=( + --with-TIFFINC="-I/usr/include/${_libtiff_incdir}" + --with-LIBTIFF="-L/usr/lib/${_libtiff_libdir} -ltiff" + ) + fi # On my system LN has something in it. Short variable names should be avoided in scripts. + LD_LIBRARY_PATH="${_LDPATH}" LN= \ CHOWN="${srcdir}/chown" \ CHGRP="${srcdir}/chgrp" \ - ./configure \ - --nointeractive \ - --with-OPTIMIZER="${CFLAGS}" \ - --target="${CARCH}-arch-linux" \ - --with-DIR_BIN='/usr/bin' \ - --with-DIR_LIB='/usr/lib' \ - --with-DIR_LIBDATA='/usr/lib/fax' \ - --with-DIR_LIBEXEC='/usr/bin' \ - --with-DIR_MAN='/usr/share/man' \ - --with-DIR_SBIN='/usr/bin' \ - --with-SYSVINIT='no' \ - --with-PAGESIZE="${_opt_pagesize}" \ - --with-SCRIPT_SH='/usr/bin/dash' -# --with-PATH_AFM='/usr/share/fonts/Type1' gs ignores this + ./configure "${_conf[@]}" fi make -s -j1 # hylafax is not multi threaded make compatible @@ -431,9 +591,13 @@ build() { set +u } +check() { + _libtiff_check; cd "${srcdir}" +} + package() { set -u - cd "${_pkgnick}-${pkgver}" + cd "${_srcdir}" local _chown="${pkgdir}/_install_chown.sh" @@ -633,7 +797,7 @@ if [ -s "\${QFILE}" ]; then [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]*) echo "RejectNotice: \"Invalid number (\${#number} digits)\"";; [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-*) echo "RejectNotice: \"Invalid number (\${#number} digits)\"";; ???111*|000*|111*|???000*) echo 'RejectNotice: "Invalid number"';; - #5175551214-*) echo 'ModemGroup: "Rockwell"';; # not compatible with Lucent + #5175551214-*) echo 'Modem: "Rockwell"';; # not compatible with Lucent #2705551214-*) # bad lines at this location won't let the fax complete # # man sendq # echo 'DesiredBR: 0' # 0 for 2400 bps, 1 for 4800 bps, 2 for 7200 bps, 3 for 9600 bps, 4 for 12000 bps, 5 for 14400 bps, 6 for 16800 bps, 7 for 19200 bps, 8 for 21600 bps, 9 for 24000 bps, 10 for 26400 bps, 11 for 28800 bps, 12 for 31200 bps, and 13 for 33600 bps (default). @@ -725,12 +889,12 @@ EOF # https://aur.archlinux.org/ [Unit] -Description=HylaFAX+ faxgetty on %i +Description=HylaFAX+ faxgetty on %I Documentation=man:faxgetty(8) After=faxq.service hfaxd.service [Service] -ExecStart=/usr/bin/faxgetty %i +ExecStart=/usr/bin/faxgetty %I Nice=-10 Type=simple Restart=always @@ -869,7 +1033,7 @@ if [ "\${EUID}" -ne 0 ]; then exit 1 fi -cd /usr/share/ghostscript/[0-9]*/Resource/Font +cd '/usr/share/ghostscript/Resource/Font' _fn_build() { local f fa fm @@ -901,5 +1065,6 @@ EOF install -Dpm644 'COPYRIGHT' "${pkgdir}/usr/share/licenses/${_pkgnick}/COPYRIGHT" set +u + cd "${srcdir}"; _libtiff_package } set +u diff --git a/hylafax.install b/hylafax.install index 134fcc0dc679..bce1df69bc2a 100644 --- a/hylafax.install +++ b/hylafax.install @@ -115,13 +115,13 @@ pre_remove() { systemctl disable 'hylafax.timer' #rm -f "${_hyhome}/bin"/{pdf2fax,ps2fax} "${_hyhome}/dev/null" _print_remove + /usr/share/libalpm/scripts/hylafax-ps2afm.sh destroy set +u } post_remove() { set -u systemctl daemon-reload - /usr/share/libalpm/scripts/hylafax-ps2afm.sh destroy mandb -q set +u } diff --git a/localnxxtoregex.sh b/localnxxtoregex.sh index 8c9a85babd6c..9b90c12ab5b9 100755 --- a/localnxxtoregex.sh +++ b/localnxxtoregex.sh @@ -6,56 +6,96 @@ set -u set -e +g_area='517' + if [ -z "${1:-}" ]; then - echo "Usage: $(basename "$0") nnx.txt > nnxmytown.txt" + echo "Usage: $(basename "$0") npamytown-date.txt > npamytown.txt" echo "Create nnx.txt from local nnx listing at" echo "http://localcallingguide.com/" echo "Search, Area Code/Prefix, ..., ..., Local prefixes" exit 1 fi -message='! local NNX list generated by localnxxtoregex.sh from Arch Linux HylaFax+ package' - -_fn_display() { +_fn_proc() { if [ ! -z "${nx}" ]; then - if [ ! -z "${message}" ]; then - echo "${message}" - message='' - fi + #if [ ! -z "${message}" ]; then + # echo "${message}" + # message='' + #fi local tx if [ "${#x}" -gt 1 ]; then x="[${x}]" - tx="(${nx}${x})" + tx="${nx}${x}" + nxt+=("") else - tx="(${nx}${x})\t" # keep tabs lined up + tx="${nx}${x}" + nxt+=($'\t') # keep tabs lined up fi - local _tx="(${nx}${x})" - echo -e '^${Country}${Area}'"${tx}\t= \1\t\t! USA NNX/NXX local ${npas[2]} calls" + #local _tx="(${nx}${x})" + nxn+=("${tx}") + nxl+=("${npas[2]}") + nxa+=("${npas[0]}") nx='' x='' fi } -readarray -t npalist < <(grep '^[0-9]' "$1" | LC_ALL=C sort) -#declare -p npalist - -nx='' -x='' -# 555 & 556 will be coalesced into 55[56] -#NPA;NXX;Rate Centre;Region;Plan Type;Call Type;Monthly Limit;Note;Effective -#517;555;Operator;MI;;;;; -#517;556;Operator;MI;;;;; -#517;560;Operator;MI;;;;; -#517;570;Operator;MI;;;;; -for npaline in "${npalist[@]}"; do - IFS=';' read -r -a npas <<<"${npaline}" - nnx="${npas[1]}" - if [ "${nnx#${nx}}" = "${nnx}" ]; then - _fn_display - nx="${nnx: 0:2}" - x="${nnx: 2:1}" - else - x+="${nnx: 2:1}" - fi +_fn_print() { + # output dialrules regex, no longer useful now that 10 digit dialing is required + local dt="$(date +'%F %T')" + printf '\n' + printf '! local dialrules NNX list\n' + printf '! generated %s by localnxxtoregex.sh %s from Arch Linux HylaFax+ package\n' "${dt}" "$1" + printf '! As of October 24, 2021 no more 7 digit dialing\n' + local k a + for k in "${!nxn[@]}"; do + a="${nxa[k]}" + if [ "${a}" = "${g_area}" ]; then + a='${Area}' + fi + printf '! ^${Country}%s(%s)%s\t= \\1\t\t! USA NNX/NXX local %s calls\n' "${a}" "${nxn[k]}" "${nxt[k]}" "${nxl[k]}" + done + # output jobcontrol-local case shell match statement + printf '\n # local jobcontrol-local NNX list generated %s by localnxxtoregex.sh %s from Arch Linux HylaFax+ package\n' "${dt}" "$1" + printf ' ' + local bar='' + for k in "${!nxn[@]}"; do + printf '%s%s%s*' "${bar}" "${nxa[k]}" "${nxn[k]}" + bar='|' + done + printf ')\n' +} + +while [ "$#" -gt 0 ]; do + readarray -t npalist < <(grep '^[0-9]' "$1" | LC_ALL=C sort) + #declare -p npalist + + nxl=() # list of city names + nxn=() # list of nnx 55[567] + nxa=() # list of area codes 517 + nxt=() # list of tab or not tab + nx='' + x='' + # 555 & 556 will be coalesced into 55[56] + #NPA;NXX;Rate Centre;Region;Plan Type;Call Type;Monthly Limit;Note;Effective + #517;555;Operator;MI;;;;; + #517;556;Operator;MI;;;;; + #517;560;Operator;MI;;;;; + #517;570;Operator;MI;;;;; + for npaline in "${npalist[@]}"; do + IFS=';' read -r -a npas <<<"${npaline}" + nnx="${npas[1]}" + if [ "${nnx#${nx}}" != "${nnx}" ]; then + x+="${nnx: 2:1}" + else + _fn_proc + nx="${nnx: 0:2}" + x="${nnx: 2:1}" + fi + done + _fn_proc + unset npalist nx x npaline npas nnx + #set > x + _fn_print "$1" + shift done -_fn_display |