%define _sysconfdir /etc %define using_netpbm 1 %define have_mkdtemp 1 Summary: A getty replacement for use with data and fax modems. Name: mgetty Version: 1.1.30 Release: 7 Source: ftp://alpha.greenie.net/pub/mgetty/source/1.1/mgetty%{version}-Dec16.tar.gz Source1: ftp://alpha.greenie.net/pub/mgetty/source/1.1/mgetty%{version}-Dec16.tar.gz.asc Source2: logrotate.mgetty Source3: logrotate.sendfax Source4: logrotate.vgetty Source5: logrotate.vm Patch0: mgetty-1.1.29-config.patch Patch1: mgetty-1.1.26-policy.patch Patch2: mgetty-1.1.25-faxprint.patch Patch3: mgetty-1.1.21-giftopnm.patch Patch4: mgetty-1.1.25-voiceconfig.patch Patch5: mgetty-1.1.26-issue.patch Patch6: mgetty-1.1.26-issue-doc.patch Patch7: mgetty-1.1.29-helper.patch Patch8: mgetty-1.1.30-mktemp.patch Patch9: mgetty-1.1.30-unioninit.patch Patch10: mgetty-1.1.30-path.patch License: GPL Group: Applications/Communications Prereq: /sbin/install-info BuildPrereq: groff, tetex, tetex-latex, texinfo XFree86-devel Buildroot: %{_tmppath}/%{name}-root Requires: mktemp URL: http://www.leo.org/~doering/mgetty/index.html %package sendfax Summary: Provides support for sending faxes over a modem. Requires: mgetty = %{version} Group: Applications/Communications Requires: mktemp %if %{using_netpbm} Requires: netpbm-progs %else Requires: libgr-progs %endif %package voice Summary: A program for using your modem and mgetty as an answering machine. Requires: mgetty = %{version} Group: Applications/Communications %package viewfax Summary: An X Window System fax viewer. Group: Applications/Communications %description The mgetty package contains a "smart" getty which allows logins over a serial line (i.e., through a modem). If you're using a Class 2 or 2.0 modem, mgetty can receive faxes. If you also need to send faxes, you'll need to install the sendfax program. If you'll be dialing in to your system using a modem, you should install the mgetty package. If you'd like to send faxes using mgetty and your modem, you'll need to install the mgetty-sendfax program. If you need a viewer for faxes, you'll also need to install the mgetty-viewfax package. %description sendfax Sendfax is a standalone backend program for sending fax files. The mgetty program (a getty replacement for handling logins over a serial line) plus sendfax will allow you to send faxes through a Class 2 modem. If you'd like to send faxes over a Class 2 modem, you'll need to install the mgetty-sendfax and the mgetty packages. %description voice The mgetty-voice package contains the vgetty system, which enables mgetty and your modem to support voice capabilities. In simple terms, vgetty lets your modem act as an answering machine. How well the system will work depends upon your modem, which may or may not be able to handle this kind of implementation. Install mgetty-voice along with mgetty if you'd like to try having your modem act as an answering machine. %description viewfax Viewfax displays the fax files received using mgetty in an X11 window. Viewfax is capable of zooming in and out on the displayed fax. If you're installing the mgetty-viewfax package, you'll also need to install mgetty. %prep %setup -q %patch0 -p1 -b .config %patch1 -p1 -b .policy %patch2 -p1 -b .faxprint %if %{using_netpbm} %patch3 -p1 -b .giftopnm %endif %patch4 -p1 -b .voiceconfig %patch5 -p1 -b .issue %patch6 -p1 -b .issue-doc %patch7 -p1 -b .helper %patch8 -p1 -b .mktemp %patch9 -p1 -b .unioninit %patch10 -p1 -b .path cp policy.h-dist policy.h %build PATH=$PATH:/usr/X11R6/bin export PATH %define makeflags CFLAGS="$RPM_OPT_FLAGS -Wall -DAUTO_PPP" prefix=%{_prefix} spool=%{_var}/spool BINDIR=%{_bindir} SBINDIR=%{_sbindir} LIBDIR=%{_libdir}/mgetty+sendfax HELPDIR=%{_libdir}/mgetty+sendfax CONFDIR=%{_sysconfdir}/mgetty+sendfax MANDIR=%{_mandir} MAN1DIR=%{_mandir}/man1 MAN4DIR=%{_mandir}/man4 MAN5DIR=%{_mandir}/man5 MAN8DIR=%{_mandir}/man8 INFODIR=%{_infodir} ECHO='"echo -e"' INSTALL=%{__install} make %{makeflags} make -C voice %{makeflags} make -C tools %{makeflags} %if %{have_mkdtemp} MKDTEMP_FLAGS= %else MKDTEMP_FLAGS=-DNEED_MKDTEMP %endif pushd frontends/X11/viewfax-2.5 xmkmf make depend make CDEBUGFLAGS="$RPM_OPT_FLAGS $MKDTEMP_FLAGS" \ CONFDIR=%{_sysconfdir}/mgetty+sendfax popd %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_infodir},%{_libdir}/mgetty+sendfax} mkdir -p $RPM_BUILD_ROOT{%{_mandir},%{_sbindir},/sbin,/var/spool} %define instflags CFLAGS="$RPM_OPT_FLAGS -Wall -DAUTO_PPP" prefix=$RPM_BUILD_ROOT%{_prefix} spool=$RPM_BUILD_ROOT%{_var}/spool BINDIR=$RPM_BUILD_ROOT%{_bindir} SBINDIR=$RPM_BUILD_ROOT%{_sbindir} LIBDIR=$RPM_BUILD_ROOT%{_libdir}/mgetty+sendfax HELPDIR=$RPM_BUILD_ROOT%{_libdir}/mgetty+sendfax CONFDIR=$RPM_BUILD_ROOT%{_sysconfdir}/mgetty+sendfax MANDIR=$RPM_BUILD_ROOT%{_mandir} MAN1DIR=$RPM_BUILD_ROOT%{_mandir}/man1 MAN4DIR=$RPM_BUILD_ROOT%{_mandir}/man4 MAN5DIR=$RPM_BUILD_ROOT%{_mandir}/man5 MAN8DIR=$RPM_BUILD_ROOT%{_mandir}/man8 INFODIR=$RPM_BUILD_ROOT%{_infodir} ECHO='echo -e' INSTALL=%{__install} make install %instflags install -m700 callback/callback $RPM_BUILD_ROOT%{_sbindir} install -m4711 callback/ct $RPM_BUILD_ROOT%{_bindir} gzip -9n $RPM_BUILD_ROOT%{_infodir}/* mv $RPM_BUILD_ROOT%{_sbindir}/mgetty $RPM_BUILD_ROOT/sbin # this conflicts with efax mv $RPM_BUILD_ROOT%{_mandir}/man1/fax.1 $RPM_BUILD_ROOT%{_mandir}/man1/mgetty_fax.1 # tools make -C tools install %instflags # voice mail extensions mkdir -p $RPM_BUILD_ROOT%{_var}/spool/voice/{messages,incoming} make -C voice install %instflags mv $RPM_BUILD_ROOT%{_sbindir}/vgetty $RPM_BUILD_ROOT/sbin install -m 600 -c voice/voice.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/mgetty+sendfax/voice.conf # don't ship documentation that is executable... find samples -type f -exec chmod 644 {} \; make -C frontends/X11/viewfax-2.5 install %instflags make -C frontends/X11/viewfax-2.5 install.man %instflags MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 # install logrotate control files mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -m 0644 $RPM_SOURCE_DIR/logrotate.mgetty $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/mgetty install -m 0644 $RPM_SOURCE_DIR/logrotate.sendfax $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/sendfax install -m 0644 $RPM_SOURCE_DIR/logrotate.vgetty $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/vgetty install -m 0644 $RPM_SOURCE_DIR/logrotate.vm $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/vm # remove file droppings from $RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_bindir}/cutbl %clean rm -rf $RPM_BUILD_ROOT %post /sbin/install-info %{_infodir}/mgetty.info.gz %{_infodir}/dir --entry="* mgetty: (mgetty). Package to handle faxes, voicemail and more." %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/mgetty.info.gz %{_infodir}/dir --entry="* mgetty: (mgetty). Package to handle faxes, voicemail and more." fi %pre sendfax /usr/sbin/useradd -c "mgetty fax spool user" -u 78 \ -s /sbin/nologin -r -d /var/spool/fax fax 2> /dev/null || : %files %defattr(-,root,root) %doc BUGS ChangeLog README.1st Recommend THANKS doc/modems.db samples %doc doc/mgetty.ps doc/*.txt /sbin/mgetty %{_sbindir}/callback %{_mandir}/man4/mgettydefs.4* %{_mandir}/man8/mgetty.8* %{_mandir}/man8/callback.8* %{_infodir}/mgetty.info* %dir %{_sysconfdir}/mgetty+sendfax %config(noreplace) %{_sysconfdir}/mgetty+sendfax/login.config %config(noreplace) %{_sysconfdir}/mgetty+sendfax/mgetty.config %config(noreplace) %{_sysconfdir}/mgetty+sendfax/dialin.config %config(noreplace) %{_sysconfdir}/logrotate.d/mgetty %files sendfax %defattr(-,root,root) %dir %{_var}/spool/fax %attr(0755,fax,root) %dir %{_var}/spool/fax/incoming %attr(0755,fax,root) %dir %{_var}/spool/fax/outgoing %attr(0755,root,root) %{_bindir}/ct %{_bindir}/faxq %{_bindir}/faxrm %{_bindir}/faxrunq %{_bindir}/faxspool %{_bindir}/g3cat %{_bindir}/g32pbm %{_bindir}/kvg %{_bindir}/newslock %{_bindir}/pbm2g3 %{_sbindir}/faxrunqd %{_sbindir}/sendfax %dir %{_libdir}/mgetty+sendfax %{_libdir}/mgetty+sendfax/cour25.pbm %{_libdir}/mgetty+sendfax/cour25n.pbm %attr(04711,fax,root) %{_libdir}/mgetty+sendfax/faxq-helper %{_mandir}/man1/g32pbm.1* %{_mandir}/man1/pbm2g3.1* %{_mandir}/man1/g3cat.1* %{_mandir}/man1/mgetty_fax.1* %{_mandir}/man1/faxspool.1* %{_mandir}/man1/faxrunq.1* %{_mandir}/man1/faxq.1* %{_mandir}/man1/faxrm.1* %{_mandir}/man1/coverpg.1* %{_mandir}/man5/faxqueue.5* %{_mandir}/man8/faxrunqd.8* %{_mandir}/man8/sendfax.8* %dir %{_sysconfdir}/mgetty+sendfax %config(noreplace) %{_sysconfdir}/mgetty+sendfax/sendfax.config %config(noreplace) %{_sysconfdir}/mgetty+sendfax/faxrunq.config %config %{_sysconfdir}/mgetty+sendfax/faxspool.rules.sample %config(noreplace) %{_sysconfdir}/mgetty+sendfax/faxheader %config(noreplace) %{_sysconfdir}/logrotate.d/sendfax %files voice %defattr(-,root,root) %doc voice/doc/* voice/Announce voice/ChangeLog voice/Readme %dir %{_var}/spool/voice %dir %{_var}/spool/voice/incoming %dir %{_var}/spool/voice/messages /sbin/vgetty %{_bindir}/vm %{_bindir}/pvfamp %{_bindir}/pvfcut %{_bindir}/pvfecho %{_bindir}/pvffft %{_bindir}/pvffile %{_bindir}/pvffilter %{_bindir}/pvfmix %{_bindir}/pvfnoise %{_bindir}/pvfreverse %{_bindir}/pvfsine %{_bindir}/pvfspeed %{_bindir}/rmdfile %{_bindir}/pvftormd %{_bindir}/rmdtopvf %{_bindir}/pvftovoc %{_bindir}/voctopvf %{_bindir}/pvftolin %{_bindir}/lintopvf %{_bindir}/pvftobasic %{_bindir}/basictopvf %{_bindir}/pvftoau %{_bindir}/autopvf %{_bindir}/pvftowav %{_bindir}/wavtopvf %{_mandir}/man1/zplay.1* %{_mandir}/man1/pvf.1* %{_mandir}/man1/pvfamp.1* %{_mandir}/man1/pvfcut.1* %{_mandir}/man1/pvfecho.1* %{_mandir}/man1/pvffile.1* %{_mandir}/man1/pvffft.1* %{_mandir}/man1/pvfmix.1* %{_mandir}/man1/pvfreverse.1* %{_mandir}/man1/pvfsine.1* %{_mandir}/man1/pvfspeed.1* %{_mandir}/man1/pvftormd.1* %{_mandir}/man1/rmdtopvf.1* %{_mandir}/man1/rmdfile.1* %{_mandir}/man1/pvftovoc.1* %{_mandir}/man1/voctopvf.1* %{_mandir}/man1/pvftolin.1* %{_mandir}/man1/lintopvf.1* %{_mandir}/man1/pvftobasic.1* %{_mandir}/man1/basictopvf.1* %{_mandir}/man1/pvftoau.1* %{_mandir}/man1/autopvf.1* %{_mandir}/man1/pvftowav.1* %{_mandir}/man1/wavtopvf.1* %{_mandir}/man8/vgetty.8* %dir %{_sysconfdir}/mgetty+sendfax %config %{_sysconfdir}/mgetty+sendfax/voice.conf %config %{_sysconfdir}/logrotate.d/vgetty %config %{_sysconfdir}/logrotate.d/vm %files viewfax %defattr(-,root,root) %doc frontends/X11/viewfax-2.5/C* frontends/X11/viewfax-2.5/README %{_bindir}/viewfax %dir %{_libdir}/mgetty+sendfax %{_libdir}/mgetty+sendfax/viewfax.tif %{_mandir}/man1/viewfax.1x* %changelog * Tue May 18 2004 Nalin Dahyabhai 1.1.30-7 - mark configuration files config(noreplace) (#123439) * Tue Mar 02 2004 Elliot Lee - rebuilt * Fri Feb 13 2004 Elliot Lee - rebuilt * Tue Nov 18 2003 Nalin Dahyabhai 1.1.30-5 - fix paths given for faxq-helper in faxq and faxrm (#92090) * Wed Jun 04 2003 Elliot Lee - rebuilt * Thu May 1 2003 Elliot Lee 1.1.30-3 - ppc64 calls for the union init patch * Wed Jan 22 2003 Tim Powers - rebuilt * Thu Dec 19 2002 Nalin Dahyabhai 1.1.30-1 - update to 1.1.30 - use mktemp to make the temporary file when spooling fax data from stdin * Tue Dec 10 2002 Elliot Lee 1.1.29-1 - Fix logrotate.vgetty wildcard * Mon Nov 25 2002 Nalin Dahyabhai 1.1.29-1 - update to 1.1.29 - create the fax user in -sendfax %%pre - remove /var/spool/fax/outgoing/locks * Tue Nov 12 2002 Nalin Dahyabhai 1.1.28-10 - define PTR_IS_LONG on x86_64 * Tue Nov 12 2002 Tim Powers - remove files from $RPM_BUILD_ROOT that we aren't including * Tue Sep 3 2002 Nalin Dahyabhai 1.1.28-9 - include vgetty's man page * Fri Aug 23 2002 Elliot Lee 1.1.28-8 - /var/spool/fax/outgoing/locks needs to be sticky * Tue Aug 13 2002 Nalin Dahyabhai 1.1.28-7 - rotate mgetty.log.unknown and mgetty.log.callback (#68049) - don't logrotate already-rotated logs (#68422) * Fri Jun 21 2002 Tim Powers - automated rebuild * Sun May 26 2002 Tim Powers - automated rebuild * Fri May 17 2002 Nalin Dahyabhai 1.1.28-4 - rebuild in new environment * Thu Feb 28 2002 Nalin Dahyabhai 1.1.28-3 - rotate the mgetty and vgetty logs by default, specifying them with wildcards in the logrotate configs (#62159) * Fri Feb 22 2002 Nalin Dahyabhai 1.1.28-2 - rebuild * Fri Jan 11 2002 Nalin Dahyabhai 1.1.28-1 - update to 1.1.28 * Wed Jan 09 2002 Tim Powers - automated rebuild * Tue Oct 22 2001 Nalin Dahyabhai 1.1.27-1 - update to 1.1.27 - drop s390x patch (no longer needed) * Tue Jul 24 2001 Nalin Dahyabhai 1.1.26-6 - tweak the issue patch * Tue Jul 10 2001 Bill Nottingham - make /etc/issue parsing match other gettys * Tue Jun 12 2001 Florian La Roche - add 64 bit patch for s390x from * Wed Apr 18 2001 Nalin Dahyabhai - define _sysconfdir, not sysconfdir * Mon Apr 16 2001 Nalin Dahyabhai - update to 1.1.26 - add logrotate.vm and logrotate.vgetty (note from Heiner Kordewiner) - add voice/{Announce,Changelog,Readme} to documentation set * Tue Apr 10 2001 Nalin Dahyabhai - define CNDFILE in policy.h * Tue Mar 20 2001 Nalin Dahyabhai - change the default group in the vgetty configuration file from phone to uucp, which matches the settings for faxes * Tue Mar 13 2001 Nalin Dahyabhai - update to 1.1.25 - ditch the elsa patch in favor of the current vgetty patch - don't need to strip binaries, buildroot policies do that - add docs to the voice subpackage * Tue Jan 16 2001 Nalin Dahyabhai - use mkdtemp() when printing faxes * Mon Jan 15 2001 Preston Brown - fix misdetection of USR voice modem detection * Mon Jan 08 2001 Preston Brown - 1.1.24 includes tmpfile security enhancements, some of our patches * Tue Sep 19 2000 Nalin Dahyabhai - back out quoting patch - change Copyright: distributable to License: GPL - add URL - remove logging changes from excl patch, based on input from Gert - rework ia64 patch, break out gets/fgets change based on input from Gert * Thu Sep 7 2000 Nalin Dahyabhai - make sure all scripts quote variables where possible (#17179) - make sure all scripts use mktemp for generating temporary files * Sat Aug 26 2000 Bill Nottingham - update to 1.1.22; fixes security issues * Mon Aug 7 2000 Nalin Dahyabhai - fix excl patch to keep everything from segfaulting all the time (#11523,11590) * Mon Jul 24 2000 Nalin Dahyabhai - forcibly strip binaries (#12431) - change dependency on libgr-progs (which is gone) to netgr-progs (#10819) - change dependency on giftoppm to giftopnm (#8088) - attempt to plug some potential security problems (#11874) * Thu Jul 12 2000 Than Ngo - add new V250modem patch from ELSA (thanks to Jürgen Kosel) * Wed Jul 12 2000 Prospector - automatic rebuild * Fri Jun 23 2000 Than Ngo - add support ELSA Microlink 56k * Sun Jun 4 2000 Nalin Dahyabhai - Overhaul for FHS fixes. - Stop removing logs in postun. - Stop stripping everything. - ia64 fixes. * Wed May 17 2000 Ngo Than - updated the new vgetty (#bug 10440) * Sat May 6 2000 Bill Nottingham - fix compilation with new gcc, or ia64, or something... * Tue Mar 7 2000 Jeff Johnson - rebuild for sparc baud rates > 38400. * Thu Feb 03 2000 Cristian Gafton - man pages are compressed * Tue Sep 7 1999 Jeff Johnson - add fax print command (David Fox). * Tue Sep 07 1999 Cristian Gafton - version 1.1.21 * Tue Aug 31 1999 Jeff Johnson - move callback to base package (#4799). * Wed Jun 2 1999 Jeff Johnson - update to 1.1.20 (#3216). * Tue Apr 6 1999 Bill Nottingham - strip setuid bit from ct * Tue Mar 23 1999 Preston Brown - better log handling * Wed Jan 06 1999 Cristian Gafton - rebuild for glibc 2.1 * Sat Aug 22 1998 Jos Vos - Use a patch for creating policy.h using policy.h-dist. - Add viewfax subpackage (X11 fax viewing program). - Add logrotate config files for mgetty and sendfax log files. - Properly define ECHO in Makefile for use with bash. - Add optional use of dialin.config (for modems supporting this). - Change default notification address to "root" (was "faxadmin"). - Change log file names according to better defaults. - Change default notify program to /etc/mgetty+sendfax/new_fax (was /usr/local/bin/new_fax). * Fri Aug 21 1998 Jeff Johnson - add faxrunqd man page (problem #850) - add missing pbm2g3 (and man page); remove unnecessary "rm -f pbmtog3" - delete redundant ( cd tools; make ... ) * Fri Apr 24 1998 Prospector System - translations modified for de, fr, tr * Fri Apr 10 1998 Cristian Gafton - updated to 1.1.14 - AutoPPP patch * Thu Dec 18 1997 Mike Wangsmo - added more of the documentation files to the rpm * Wed Oct 29 1997 Otto Hammersmith - added install-info support * Tue Oct 21 1997 Otto Hammersmith - updated version * Wed Oct 15 1997 Erik Troan - now requires libgr-progs instead of netpbm * Mon Aug 25 1997 Erik Troan - built against glibc