--- /dev/null
+our glibc already defines fchmod prototype, but with c++ extension
+mismatch causes compile error:
+
+/usr/include/sys/stat.h:299:47: error: declaration of 'int fchmod(int, __mode_t) throw ()' throws different exceptions
+../port.h:32:12: error: from previous declaration 'int fchmod(int, mode_t)'
+
+glibc-headers-2.12.1-1.x86_64
+
+Signed-off-by: Elan Ruusamäe <glen@pld-linux.org>
+
+--- hylafax-4.4.6/configure~ 2009-12-28 21:06:52.000000000 +0200
++++ hylafax-4.4.6/configure 2010-08-24 00:39:02.960977100 +0300
+@@ -2782,7 +2782,7 @@
+ CheckForFunc fchmod && {
+ echo '#define HAS_FCHMOD 1'
+ Note "... configure use of fchmod"
+- CheckFuncDecl fchmod 'extern int fchmod(int, mode_t);' \
++ CheckFuncDecl fchmod 'extern int fchmod(int, mode_t) __THROW;' \
+ unistd.h libc.h $OSFCNH sys/stat.h
+ }
+ CheckFuncDecl mknod 'extern int mknod(const char*, mode_t, dev_t);' \
---- hylafax-4.4.5/util/b64-encode.awk~ 2009-03-20 16:36:34.000000000 +0100
-+++ hylafax-4.4.5/util/b64-encode.awk 2010-08-16 08:20:05.990925413 +0200
+--- hylafax-4.4.6/util/b64-encode.awk~ 2009-12-28 21:06:52.000000000 +0200
++++ hylafax-4.4.6/util/b64-encode.awk 2010-08-24 00:29:04.497501168 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/awk -f
+#!/bin/awk -f
# $Id$
#
# HylaFAX Facsimile Software
---- hylafax-4.4.5/util/qp-encode.awk~ 2007-01-09 15:14:12.000000000 +0100
-+++ hylafax-4.4.5/util/qp-encode.awk 2010-08-16 08:20:31.653423097 +0200
+--- hylafax-4.4.6/util/qp-encode.awk~ 2009-12-28 21:06:52.000000000 +0200
++++ hylafax-4.4.6/util/qp-encode.awk 2010-08-24 00:29:25.650823200 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/awk -f
+#!/bin/awk -f
+# TODO
+# - unpackaged:
+# /usr/share/fax/faxcover_example_sgi.ps
+# /usr/share/man/README.hylafax-man-pages
+# /usr/share/man/diff.faxmsg.8c.gz
+# /usr/share/man/diff.typetest.8c.gz
Summary: HylaFAX(tm) is a sophisticated enterprise strength fax package
Summary(pl.UTF-8): HylaFAX(tm) to przemyślany, potężny pakiet do obsługi faksów
Name: hylafax
-Version: 4.4.5
-Release: 3
+Version: 4.4.6
+Release: 1
License: distributable
Group: Applications/Communications
Source0: ftp://ftp.hylafax.org/source/%{name}-%{version}.tar.gz
-# Source0-md5: 4e6099aba8edff4256ccc9e59490a92e
+# Source0-md5: f65aa02066d05c19a41c3e064cd68d41
#Source0: http://dl.sourceforge.net/hylafax/%{name}-%{version}.tar.gz
Source1: %{name}-cron_entries.tar.gz
# Source1-md5: d5e2bd6447715654ba916b6f4d0d9343
Patch1: %{name}-topmargin.patch
Patch2: %{name}-pic.patch
Patch3: %{name}-awk.patch
+Patch4: fchmod-prototype.patch
URL: http://www.hylafax.org/
BuildRequires: libjpeg-devel
BuildRequires: libstdc++-devel
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%ifarch sparc64
sed -i -e 's/-fpic/-fPIC/g' configure
%build
# set dummy GCOPTS,GCXXOPTS to avoid adding "-g"
+# the configure is too stupid to keep spaces in CC/CXX, so strip ccache if any
+CC="%{__cc}"
+CCXX="%{__cxx}"
+CC=${CC#ccache } \
+CXX=${CXX#ccache } \
GCOPTS=" " \
GCXXOPTS=" " \
./configure \
$RPM_BUILD_ROOT%{_mandir}/{man1,man5,man8}
%{__make} install -e \
- FAXUSER=`id -u` \
- FAXGROUP=`id -g` \
- SYSUSER=`id -u` \
- SYSGROUP=`id -g` \
+ FAXUSER=$(id -u) \
+ FAXGROUP=$(id -g) \
+ SYSUSER=$(id -u) \
+ SYSGROUP=$(id -g) \
BIN=$RPM_BUILD_ROOT%{_bindir} \
SBIN=$RPM_BUILD_ROOT%{_sbindir} \
LIBDATA=$RPM_BUILD_ROOT%{_datadir}/fax \
sed -i -e 's!%{_libdir}/aliases!%{_sysconfdir}/aliases!g' $RPM_BUILD_ROOT%{_sbindir}/faxsetup
# init
-install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/hylafax
+install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/hylafax
# defaults
-install defaults/* $RPM_BUILD_ROOT%{faxspool}/config/defaults
+install -p defaults/* $RPM_BUILD_ROOT%{faxspool}/config/defaults
# hyla.conf
-install %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/fax/hyla.conf
+cp -a %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/fax/hyla.conf
# cron entries
-install hylafax_daily.cron $RPM_BUILD_ROOT/etc/cron.daily/hylafax
-install hylafax_hourly.cron $RPM_BUILD_ROOT/etc/cron.hourly/hylafax
+install -p hylafax_daily.cron $RPM_BUILD_ROOT/etc/cron.daily/hylafax
+install -p hylafax_hourly.cron $RPM_BUILD_ROOT/etc/cron.hourly/hylafax
# logrotate
-install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/hylafax
+cp -a %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/hylafax
# dialrules extras
-install dialrules_extras/dialrules* $RPM_BUILD_ROOT%{faxspool}/etc
+install -p dialrules_extras/dialrules* $RPM_BUILD_ROOT%{faxspool}/etc
ln -sf ps2fax.gs $RPM_BUILD_ROOT%{faxspool}/bin/ps2fax