summaryrefslogtreecommitdiff
path: root/extra/hylafax
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-02-07 15:10:29 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2012-02-07 15:10:29 +0100
commit4c4400925b792b694511bbbf2f645fb34495d5cf (patch)
tree86a3b3c62e75fdf9c536306d195bbbcbc7ac974c /extra/hylafax
parent08adec2ac14efea1ef452e79ff86f024b9becaf3 (diff)
parent1fa6edfba8d1e31ca1c0d59e8202cd3c62ccf393 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/bwbar/PKGBUILD community/directfb/PKGBUILD community/extremetuxracer/PKGBUILD community/freedroidrpg/PKGBUILD community/gnash/PKGBUILD community/guake/PKGBUILD community/pidgin-libnotify/PKGBUILD community/png2ico/PKGBUILD community/ruby-gtk2/PKGBUILD community/torcs/PKGBUILD community/virtualbox/PKGBUILD extra/abiword/PKGBUILD extra/alsaplayer/PKGBUILD extra/automoc4/PKGBUILD extra/cagibi/PKGBUILD extra/fltk/PKGBUILD extra/gnome-desktop2/PKGBUILD extra/gnome-python/PKGBUILD extra/gnome-sharp/PKGBUILD extra/gnugo/PKGBUILD extra/gstreamer0.10-good/PKGBUILD extra/gtk2/PKGBUILD extra/gtkmm/PKGBUILD extra/imlib2/PKGBUILD extra/koffice/PKGBUILD extra/lcms/PKGBUILD extra/libao/PKGBUILD extra/libcue/PKGBUILD extra/libdaemon/PKGBUILD extra/libgnome-media-profiles/PKGBUILD extra/libotf/PKGBUILD extra/libotr/PKGBUILD extra/libots/PKGBUILD extra/libreoffice/PKGBUILD extra/libtiff/PKGBUILD extra/libwebkit/PKGBUILD extra/libwmf/PKGBUILD extra/libxfcegui4/PKGBUILD extra/mjpegtools/PKGBUILD extra/netpbm/PKGBUILD extra/php/PKGBUILD extra/plotutils/PKGBUILD extra/poppler/PKGBUILD extra/qrencode/PKGBUILD extra/qt/PKGBUILD extra/qtiplot/PKGBUILD extra/rssh/PKGBUILD extra/scim-chewing/PKGBUILD extra/scim-m17n/PKGBUILD extra/scim-pinyin/PKGBUILD extra/scim-tables/PKGBUILD extra/scim-uim/PKGBUILD extra/tsocks/PKGBUILD extra/vigra/PKGBUILD extra/w3m/PKGBUILD extra/wv/PKGBUILD extra/xclip/PKGBUILD extra/xfce4-datetime-plugin/PKGBUILD extra/xfce4-notes-plugin/PKGBUILD extra/xfce4-quicklauncher-plugin/PKGBUILD extra/xfce4-sensors-plugin/PKGBUILD extra/xorg-font-util/PKGBUILD extra/xorg-setxkbmap/PKGBUILD extra/xorg-xev/PKGBUILD extra/xsane/PKGBUILD extra/yakuake/PKGBUILD extra/zvbi/PKGBUILD multilib/lib32-cairo/PKGBUILD multilib/lib32-gdk-pixbuf2/PKGBUILD multilib/lib32-libcanberra/PKGBUILD multilib/lib32-libcups/PKGBUILD multilib/lib32-libglade/PKGBUILD multilib/lib32-libpng/PKGBUILD multilib/lib32-libtiff/PKGBUILD multilib/lib32-pango/PKGBUILD multilib/lib32-qt/PKGBUILD multilib/lib32-sdl_image/PKGBUILD multilib/wine/PKGBUILD testing/vlc/PKGBUILD testing/xulrunner/PKGBUILD
Diffstat (limited to 'extra/hylafax')
-rw-r--r--extra/hylafax/PKGBUILD56
-rw-r--r--extra/hylafax/hylafax-libtiff4.patch229
-rw-r--r--extra/hylafax/hylafax.install18
3 files changed, 261 insertions, 42 deletions
diff --git a/extra/hylafax/PKGBUILD b/extra/hylafax/PKGBUILD
index f3dc2e868..ee95019de 100644
--- a/extra/hylafax/PKGBUILD
+++ b/extra/hylafax/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 135136 2011-08-10 12:54:02Z tpowa $
+# $Id: PKGBUILD 148782 2012-02-05 11:50:17Z ibiru $
# Maintainer: Paul Mattal <paul@archlinux.org>
pkgname=hylafax
pkgver=6.0.5
-pkgrel=2
+pkgrel=3
pkgdesc="Fax Server"
arch=('i686' 'x86_64' 'mips64el')
install='hylafax.install'
@@ -17,49 +17,37 @@ source=(ftp://ftp.hylafax.org/source/${pkgname}-${pkgver}.tar.gz
hylafax
hylafax.cron.daily
config.local
- configure-6.0.5.patch)
+ configure-6.0.5.patch
+ hylafax-libtiff4.patch)
+md5sums=('eb9ac942354ad708e20e4583cec6615f'
+ '6602288a405324d8c8e3c5eac2bf19fd'
+ '52beffe7dc296b4f9ce9fd0387f7804e'
+ '0d2ce24d918226a852539aebf57d3f4a'
+ '51d9f639bb76e5e39cdc8e2ac07e208d'
+ '3d239c186f24720e945508d349b069b1')
-# build as root for successful build!
build() {
- uucp_created=0
- if ! grep 'uucp' /etc/passwd > /dev/null; then
- uucp_created=1
- groupadd -g 14 uucp &>/dev/null
- useradd -u 10 -g uucp -d '/' -s /bin/false uucp &>/dev/null
- useradd -u 69 -g daemon -d '/' -s /bin/false fax &>/dev/null
- fi
- mkdir -p $pkgdir/usr/{bin,lib/fax,sbin,share/ghostscript/fonts}
- mkdir -p $pkgdir/var/{spool/hylafax,lock}
- cd $srcdir/${pkgname}-${pkgver}
-
+ cd "$srcdir/${pkgname}-${pkgver}"
cp ../config.local .
# fix compiling
patch -Np0 -i ../configure-6.0.5.patch
+ patch -Np1 -i ../hylafax-libtiff4.patch
./configure --nointeractive --with-OPTIMIZER="${CFLAGS}"
make
}
package () {
- cd $srcdir/${pkgname}-${pkgver}
- make ROOT=$pkgdir install
- install -D -m 755 $srcdir/hylafax $pkgdir/etc/rc.d/hylafax
- install -D -m 744 $srcdir/hylafax.cron.daily $pkgdir/etc/cron.daily/hylafax
- # remove group if created
- if [ $uucp_created -eq 1 ]; then
- userdel uucp &>/dev/null
- groupdel uucp &>/dev/null
- userdel fax &>/dev/null
- fi
+ cd "$srcdir/${pkgname}-${pkgver}"
+ mkdir -p "$pkgdir"/usr/{bin,lib/fax,sbin,share/ghostscript/fonts}
+ mkdir -p "$pkgdir"/var/{spool/hylafax,lock}
+ make ROOT="$pkgdir" install
+ install -D -m 755 "$srcdir"/hylafax "$pkgdir"/etc/rc.d/hylafax
+ install -D -m 744 "$srcdir"/hylafax.cron.daily "$pkgdir"/etc/cron.daily/hylafax
# add missing awk file for notify-4.1 script
- install -D -m 755 $srcdir/${pkgname}-${pkgver}/util/notify.awk \
- $pkgdir/var/spool/hylafax/bin/notify.awk
+ install -D -m 755 "$srcdir"/${pkgname}-${pkgver}/util/notify.awk \
+ "$pkgdir"/var/spool/hylafax/bin/notify.awk
# fix permission on /var/lock
- chmod 1777 $pkgdir/var/lock
+ chmod 1777 "$pkgdir"/var/lock
- install -D -m644 COPYRIGHT $startdir/pkg/usr/share/licenses/$pkgname/COPYRIGHT
+ install -D -m644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
}
-md5sums=('eb9ac942354ad708e20e4583cec6615f'
- '6602288a405324d8c8e3c5eac2bf19fd'
- '52beffe7dc296b4f9ce9fd0387f7804e'
- '0d2ce24d918226a852539aebf57d3f4a'
- '51d9f639bb76e5e39cdc8e2ac07e208d')
diff --git a/extra/hylafax/hylafax-libtiff4.patch b/extra/hylafax/hylafax-libtiff4.patch
new file mode 100644
index 000000000..4a49511f8
--- /dev/null
+++ b/extra/hylafax/hylafax-libtiff4.patch
@@ -0,0 +1,229 @@
+--- hylafax-6.0.5/configure 2010-09-15 10:42:36.000000000 -0400
++++ hylafax-5.5.1/configure 2012-01-02 17:44:20.000000000 -0500
+@@ -2531,6 +2566,7 @@
+ Note "... checking TIFF library version"
+ tiff_runlen_t=""
+ cat>t.c<<EOF
++#include <stdlib.h>
+ #include <stdio.h>
+ #include "tiffio.h"
+ main()
+@@ -2550,8 +2586,18 @@
+ Note " Found libtiff version ${lib_ver}"
+ if [ ${header_ver} -ge 19960307 ]; then
+ case ${lib_ver} in
+- 3.4) tiff_runlen_t="uint16" ;;
+- 3.[56789]) tiff_runlen_t="uint32" ;;
++ 3.4) tiff_runlen_t="uint16"
++ echo '#define TIFFSTRIPBYTECOUNTS uint32'
++ echo '#define TIFFVERSION TIFF_VERSION'
++ echo '#define TIFFHEADER TIFFHeader';;
++ 3.[56789]) tiff_runlen_t="uint32"
++ echo '#define TIFFSTRIPBYTECOUNTS uint32'
++ echo '#define TIFFVERSION TIFF_VERSION'
++ echo '#define TIFFHEADER TIFFHeader';;
++ 4.0) tiff_runlen_t="uint32"
++ echo '#define TIFFSTRIPBYTECOUNTS uint64'
++ echo '#define TIFFVERSION TIFF_VERSION_CLASSIC'
++ echo '#define TIFFHEADER TIFFHeaderClassic';;
+ esac
+ fi
+ else
+@@ -2588,7 +2634,7 @@
+ Incompatible TIFF Library.
+
+ HylaFAX ${VERSION} requires TIFF software distribution versions 3.4 through
+-3.9. If you do not have up to date TIFF software on your system
++4.0. If you do not have up to date TIFF software on your system
+ then you can retrieve it from the location where you obtained this software.
+ The Home Page for version 3.5 and later is http://www.remotesensing.org/libtiff/
+ EOF
+--- hylafax-6.0.5/hfaxd/FileTransfer.c++ 2010-09-15 10:42:36.000000000 -0400
++++ hylafax-5.5.1/hfaxd/FileTransfer.c++ 2012-01-02 17:44:19.000000000 -0500
+@@ -164,26 +142,26 @@
+ * a single IFD/image from a TIFF file.
+ */
+ typedef struct {
+- TIFFDirEntry SubFileType;
+- TIFFDirEntry ImageWidth;
+- TIFFDirEntry ImageLength;
+- TIFFDirEntry BitsPerSample;
+- TIFFDirEntry Compression;
+- TIFFDirEntry Photometric;
+- TIFFDirEntry FillOrder;
+- TIFFDirEntry StripOffsets;
+- TIFFDirEntry Orientation;
+- TIFFDirEntry SamplesPerPixel;
+- TIFFDirEntry RowsPerStrip;
+- TIFFDirEntry StripByteCounts;
+- TIFFDirEntry XResolution;
+- TIFFDirEntry YResolution;
+- TIFFDirEntry Options; // T4 or T6
+- TIFFDirEntry ResolutionUnit;
+- TIFFDirEntry PageNumber;
+- TIFFDirEntry BadFaxLines;
+- TIFFDirEntry CleanFaxData;
+- TIFFDirEntry ConsecutiveBadFaxLines;
++ HFClassicTIFFDirEntry SubFileType;
++ HFClassicTIFFDirEntry ImageWidth;
++ HFClassicTIFFDirEntry ImageLength;
++ HFClassicTIFFDirEntry BitsPerSample;
++ HFClassicTIFFDirEntry Compression;
++ HFClassicTIFFDirEntry Photometric;
++ HFClassicTIFFDirEntry FillOrder;
++ HFClassicTIFFDirEntry StripOffsets;
++ HFClassicTIFFDirEntry Orientation;
++ HFClassicTIFFDirEntry SamplesPerPixel;
++ HFClassicTIFFDirEntry RowsPerStrip;
++ HFClassicTIFFDirEntry StripByteCounts;
++ HFClassicTIFFDirEntry XResolution;
++ HFClassicTIFFDirEntry YResolution;
++ HFClassicTIFFDirEntry Options; // T4 or T6
++ HFClassicTIFFDirEntry ResolutionUnit;
++ HFClassicTIFFDirEntry PageNumber;
++ HFClassicTIFFDirEntry BadFaxLines;
++ HFClassicTIFFDirEntry CleanFaxData;
++ HFClassicTIFFDirEntry ConsecutiveBadFaxLines;
+ uint32 link; // offset to next directory
+ uint32 xres[2]; // X resolution indirect value
+ uint32 yres[2]; // Y resolution indirect value
+@@ -226,10 +204,10 @@
+ * amount of image data and then adding in
+ * the expected data for the TIFF headers.
+ */
+- uint32* sb;
++ TIFFSTRIPBYTECOUNTS* sb;
+ TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &sb);
+ file_size = sizeof (DirTemplate) +
+- sizeof (TIFFHeader) + sizeof (uint16);
++ sizeof (TIFFHEADER) + sizeof (uint16);
+ for (tstrip_t s = 0, ns = TIFFNumberOfStrips(tif); s < ns; s++)
+ file_size += sb[s];
+ reply(code, "%s for %s (%lu bytes).",
+@@ -261,10 +239,10 @@
+ if (fd >= 0) {
+ union {
+ char buf[512];
+- TIFFHeader h;
++ TIFFHEADER h;
+ } b;
+ ssize_t cc = Sys::read(fd, (char*) &b, sizeof (b));
+- if (cc > (ssize_t)sizeof (b.h) && b.h.tiff_version == TIFF_VERSION &&
++ if (cc > (ssize_t)sizeof (b.h) && b.h.tiff_version == TIFFVERSION &&
+ (b.h.tiff_magic == TIFF_BIGENDIAN ||
+ b.h.tiff_magic == TIFF_LITTLEENDIAN)) {
+ (void) lseek(fd, 0L, SEEK_SET); // rewind
+@@ -318,12 +296,12 @@
+ }
+
+ static void
+-getLong(TIFF* tif, TIFFDirEntry& de)
++getLong(TIFF* tif, HFClassicTIFFDirEntry& de)
+ {
+ TIFFGetField(tif, de.tdir_tag, &de.tdir_offset);
+ }
+ static void
+-getShort(TIFF* tif, TIFFDirEntry& de)
++getShort(TIFF* tif, HFClassicTIFFDirEntry& de)
+ {
+ uint16 v;
+ TIFFGetField(tif, de.tdir_tag, &v);
+@@ -343,7 +321,7 @@
+ {
+ static DirTemplate templ = {
+ #define TIFFdiroff(v) \
+- (uint32) (sizeof (TIFFHeader) + sizeof (uint16) + \
++ (uint32) (sizeof (TIFFHEADER) + sizeof (uint16) + \
+ (intptr_t) &(((DirTemplate*) 0)->v))
+ { TIFFTAG_SUBFILETYPE, TIFF_LONG, 1 },
+ { TIFFTAG_IMAGEWIDTH, TIFF_LONG, 1 },
+@@ -368,7 +346,7 @@
+ 0, // next directory
+ { 0, 1 }, { 0, 1 }, // x+y resolutions
+ };
+-#define NTAGS ((TIFFdiroff(link)-TIFFdiroff(SubFileType)) / sizeof (TIFFDirEntry))
++#define NTAGS ((TIFFdiroff(link)-TIFFdiroff(SubFileType)) / sizeof (HFClassicTIFFDirEntry))
+ /*
+ * Construct the TIFF header for this IFD using
+ * the preconstructed template above. We extract
+@@ -377,14 +355,14 @@
+ * of things about the contents of the TIFF file.
+ */
+ struct {
+- TIFFHeader h;
++ TIFFHEADER h;
+ uint16 dircount;
+ u_char dirstuff[sizeof (templ)];
+ } buf;
+ union { int32 i; char c[4]; } u; u.i = 1;
+ buf.h.tiff_magic = (u.c[0] == 0 ? TIFF_BIGENDIAN : TIFF_LITTLEENDIAN);
+- buf.h.tiff_version = TIFF_VERSION;
+- buf.h.tiff_diroff = sizeof (TIFFHeader);
++ buf.h.tiff_version = TIFFVERSION;
++ buf.h.tiff_diroff = sizeof (TIFFHEADER);
+ buf.dircount = (uint16) NTAGS;
+ getLong(tif, templ.SubFileType);
+ getLong(tif, templ.ImageWidth);
+@@ -412,7 +390,7 @@
+ getShort(tif, templ.CleanFaxData);
+ getLong(tif, templ.ConsecutiveBadFaxLines);
+ if (buf.h.tiff_magic == TIFF_BIGENDIAN) {
+- TIFFDirEntry* dp = &templ.SubFileType;
++ HFClassicTIFFDirEntry* dp = &templ.SubFileType;
+ for (u_int i = 0; i < NTAGS; i++) {
+ if (dp->tdir_type == TIFF_SHORT)
+ dp->tdir_offset <<= 16;
+@@ -441,7 +419,7 @@
+ bool
+ HylaFAXServer::sendITIFFData(TIFF* tif, int fdout)
+ {
+- uint32* sb;
++ TIFFSTRIPBYTECOUNTS* sb;
+ (void) TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &sb);
+ tdata_t buf = _TIFFmalloc(sb[0]);
+ tsize_t bsize = sb[0];
+--- hylafax-6.0.5/hfaxd/FileTransfer.c++ 2012-01-28 15:27:47.000000000 -0500
++++ hylafax-5.5.1/hfaxd/FileTransfer.c++ 2012-01-28 15:30:12.000000000 -0500
+@@ -69,7 +69,7 @@
+
+
+ static bool
+-isTIFF(const TIFFHeader& h)
++isTIFF(const TIFFHEADER& h)
+ {
+ if (h.tiff_magic != TIFF_BIGENDIAN && h.tiff_magic != TIFF_LITTLEENDIAN)
+ return (false);
+@@ -82,11 +82,23 @@
+ // byte swap version stamp if opposite byte order
+ if ((u.c[0] == 0) ^ (h.tiff_magic == TIFF_BIGENDIAN))
+ TIFFSwabShort(&version);
+- return (version == TIFF_VERSION);
++ return (version == TIFFVERSION);
+ }
+
+
+ /*
++ * This is copied right from tiff.h in version 3.8.2. This was necessary
++ * to localize here because it was removed from tiff.h in version 4.0.
++ * In tiff.h 3.8.2 it was known as "TIFFDirEntry".
++ */
++typedef struct {
++ uint16 tdir_tag;
++ uint16 tdir_type; /* data type */
++ uint32 tdir_count; /* number of items; length in spec */
++ uint32 tdir_offset; /* byte offset to field data */
++} HFClassicTIFFDirEntry;
++
++/*
+ * Record a file transfer in the log file.
+ */
+ void
+@@ -957,7 +957,7 @@
+ if (FileCache::lookup(docname, sb) && S_ISREG(sb.st_mode)) {
+ union {
+ char buf[512];
+- TIFFHeader h;
++ TIFFHEADER h;
+ } b;
+ ssize_t cc = Sys::read(fd, (char*) &b, sizeof (b));
+ if (cc > 2 && b.buf[0] == '%' && b.buf[1] == '!')
diff --git a/extra/hylafax/hylafax.install b/extra/hylafax/hylafax.install
index bd97d42bd..5dacf4045 100644
--- a/extra/hylafax/hylafax.install
+++ b/extra/hylafax/hylafax.install
@@ -1,8 +1,6 @@
print_install() {
printf "\n"
- echo "If installing new:"
- printf "\n"
echo "Add the following to /etc/inittab and run telinit q"
echo " f1:2345:respawn:/usr/lib/fax/faxgetty ttyS0"
echo "faxgetty should now be running"
@@ -24,16 +22,20 @@ print_remove() {
}
post_install() {
- groupadd -g 14 uucp &>/dev/null
- useradd -u 10 -g uucp -d '/' -s /bin/false uucp &>/dev/null
- useradd -u 69 -g daemon -d '/' -s /bin/false fax &>/dev/null
+ post_upgrade
print_install
}
post_upgrade() {
- post_install
- usermod -d '/' uucp
- usermod -d '/' fax
+ groupadd -g 14 uucp &>/dev/null
+ useradd -u 10 -g uucp -d '/' -s /bin/false uucp &>/dev/null
+ useradd -u 69 -g daemon -d '/' -s /bin/false fax &>/dev/null
+ chown uucp /var/spool/hylafax/{,archive,bin,client,config,dev,docq,doneq,etc}
+ chown uucp /var/spool/hylafax/{FIFO,info,log,pollq,recvq,sendq,status,tmp}
+ chown uucp /var/spool/hylafax/etc/{hosts.hfaxd,lutRS18.pcf,xferfaxlog}
+ chown -R uucp /var/spool/hylafax/etc/templates
+ usermod -d '/' uucp &>/dev/null
+ usermod -d '/' fax &>/dev/null
}
pre_remove() {