Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37037125
en ru br
ALT Linux repos
S:1.2.1-alt1
5.0: 1.1.35-alt1.1
4.1: 1.1.35-alt1
4.0: 1.1.31-alt1.1
3.0: 1.1.31-alt1

Group :: Communications
RPM: mgetty

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define allname %name+sendfax
%define allconfdir %_sysconfdir/%allname
%define alllibdir %_libdir/%allname

Name: mgetty
#Version: 1.1.35
Version: 1.1.31
Release: alt1.1

#define verdate Feb22

%define verdate Jul24

Summary: A getty replacement for use with data and fax modems
License: GPL
Group: Communications
URL: http://alpha.greenie.net/mgetty/
Source: ftp://alpha.greenie.net/pub/%name/source/1.1/%name%{version}-%verdate.tar.gz
Source1: %name.logrotate
Source2: voice.conf-dist.bz2

Patch1: %name-1.1.5-config.patch
Patch2: %name-1.1.5-makekvg.patch
Patch3: %name-1.1.28-paths.patch
Patch4: %name-1.1.14-echo.patch
Patch5: %name-1.1.24-imakefile.patch
Patch6: %name-1.1.24-texinfo.patch
Patch7: %name-1.1.24-contrib.patch
Patch8: %name-1.1.24-faxprint.patch
Patch9: %name-1.1.21-void.patch
Patch10: %name-1.1.30-paths.patch
Patch11: %name-1.1.26-elsa.patch
Patch12: %name-1.1.21-giftopnm.patch
#Patch13: %name-1.1.22-excl.patch
#Patch14: %name-1.1.26-to-16052001.bz2
Patch15: %name-1.1.25-usrvavaev.patch
Patch16: %name-1.1.26-logfile.patch
Patch17: %name-1.1.25-cid.patch.bz2
Patch18: %name-1.1.26-avc_cid.patch
patch19: %name-1.1.30.FAX_OUT_USER.patch
Patch20: %name-1.1.29-helper.patch
Patch21: %name-1.1.30-mktemp.patch
Patch22: %name-1.1.30-unioninit.new.patch
Patch30: %name-1.1.31-share-Makefile.patch
Patch31: %name-1.1.31-helper2.patch
Patch32: %name-1.1.31-no-acroread.patch
Patch33: %name-1.1.31-W-format.patch
Patch34: %name-1.1.31-policy.patch

# from gentoo

Patch40: mgetty-1.1.31-callback.patch
#Patch41: mgetty-1.1.35-faxrunq.patch
Patch41: mgetty-1.1.31-logfile.c.diff
#Patch42: mgetty-1.1.35-strerror.patch

Packager: Fr. Br. George <george at altlinux.ru>

PreReq: /var/lock/serial

# Automatically added by buildreq on Thu Mar 29 2007

BuildRequires: gccmakedep groff-base imake libXext-devel tetex-dvips tetex-latex xorg-cf-files

%package sendfax
Summary: Provides support for sending faxes over a modem
Group: Communications
Requires: %name = %version-%release

%package voice
Summary: A program for using your modem and %name as an answering machine
Group: Communications
Requires: %name = %version-%release

%package viewfax
Summary: An X Window System fax viewer
Group: Communications
Requires: %name = %version-%release

%package doc
Summary: Documentation, samples and contributed stuff that comes with %name
Group: Communications
Requires: %name = %version-%release
Obsoletes: %name-contrib

%description
The %name 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, %name 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 %name package.  If you'd like to send faxes using %name and your
modem, you'll need to install the %name-sendfax program.  If you need a
viewer for faxes, you'll also need to install the %name-viewfax package.

%description sendfax
Sendfax is a standalone backend program for sending fax files.  The
%name 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 %name-sendfax and the %name packages.

%description voice
The %name-voice package contains the vgetty system, which enables
%name 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 %name-voice along with %name if you'd like to try having your
modem act as an answering machine.

%description viewfax
Viewfax displays the fax files received using %name in an X11 window.
Viewfax is capable of zooming in and out on the displayed fax.

If you're installing the %name-viewfax package, you'll also need to
install %name.

%description doc
Documentation, samples and contributed stuff that comes with %name.

%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
#patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
#%patch13 -p1
#%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1

%patch40 -p1
%patch41 -p1
#patch42 -p1

cp policy.h-dist policy.h

find -type f -name Makefile\* |
xargs fgrep -l '$(INSTALL)' |
xargs -r perl -pi -e 's|(\$\(INSTALL\).*) -o [A-Za-z$(){}]*|$1|g;s|(\$\(INSTALL\).*) -g [A-Za-z$(){}]*|$1|g'
find -type f -name Makefile\* |
xargs fgrep -l 'install' |
xargs -r perl -pi -e 's|(install.*) -o [A-Za-z$(){}]*|$1|g;s|(install.*) -g [A-Za-z$(){}]*|$1|g'
find -type f |
xargs fgrep -l /usr/local |
xargs -r perl -pi -e 's,/usr/local,%prefix,g'
find -type f |
xargs fgrep -l /perl5 |
xargs -r perl -pi -e 's,/perl5,/perl,g'

%build
%make
%make -C voice

pushd frontends/X11/viewfax-2.5
xmkmf
%make HELPDIR=%alllibdir CONFDIR=%allconfdir depend
%make CDEBUGFLAGS="$RPM_OPT_FLAGS" HELPDIR=%alllibdir CONFDIR=%allconfdir
popd

%install
%define instflags spool=%buildroot%_spooldir CONFDIR=%buildroot%allconfdir LIBDIR=%buildroot%alllibdir HELPDIR=%buildroot%alllibdir MANPATH=%buildroot%_mandir
mkdir -p %buildroot{/sbin,%alllibdir,%_mandir/man1}
mkdir -p %buildroot%_spooldir/voice/{messages,incoming}
%makeinstall %instflags
mv %buildroot%_sbindir/%name %buildroot/sbin
ln -s ../../sbin/%name %buildroot%_sbindir

# Voice mail extensions

%makeinstall %instflags SBINDIR=%buildroot/sbin -C voice

%makeinstall %instflags MANPATH=%buildroot%_x11mandir BINDIR=%buildroot%_x11bindir -C frontends/X11/viewfax-2.5 install install.man

install -p -m640 -D %SOURCE1 %buildroot%_sysconfdir/logrotate.d/%name
install -p -m700 callback/callback %buildroot%_sbindir
install -p -m755 callback/ct %buildroot%_bindir

# This conflicts with efax

mv %buildroot%_mandir/man1/fax.1 %buildroot%_mandir/man1/%{name}_fax.1

bzcat %SOURCE2 >%buildroot%allconfdir/voice.conf
chmod 0600 %buildroot%allconfdir/voice.conf

mkdir -p %buildroot/var/log/%name

# Don't ship documentation that is executable.

find samples -type f |xargs chmod a-x

%post
%install_info %name.info

%postun
%uninstall_info %name.info

%files
/sbin/%name
%_sbindir/%name
%_mandir/man8/%name.8*
%_mandir/man8/callback.8*
%_mandir/man8/faxrunqd.8*
%_mandir/man8/vgetty.8*
%_mandir/man4/*
%_infodir/*.info*
%dir %allconfdir
%config(noreplace) %allconfdir/login.config
%config(noreplace) %allconfdir/%name.config
%config(noreplace) %allconfdir/dialin.config
%config(noreplace) %_sysconfdir/logrotate.d/%name
/var/log/%name

%files sendfax
%_spooldir/fax
%_bindir/kvg
%_bindir/newslock
%_bindir/g3cat
%_bindir/sff2g3
%_bindir/g32pbm
#%_bindir/g3topbm # /*G*/ conflicts with netpm
%_bindir/pbm2g3
%_bindir/faxspool
%_bindir/faxrunq
%_bindir/faxq
%_bindir/cutbl
%_bindir/faxrm
%_bindir/ct
%_sbindir/sendfax
%_sbindir/faxrunqd
%_sbindir/callback
%dir %alllibdir
%alllibdir/faxq-helper
%alllibdir/*.pbm
%_mandir/man1/g32pbm.*
%_mandir/man1/pbm2g3.*
%_mandir/man1/sff2g3.*
%_mandir/man1/g3cat.*
%_mandir/man1/%{name}_fax.*
%_mandir/man1/faxspool.*
%_mandir/man1/faxrunq.*
%_mandir/man1/faxq.*
%_mandir/man1/faxrm.*
%_mandir/man1/coverpg.*
%_mandir/man5/faxqueue.*
%_mandir/man8/sendfax.*
%config(noreplace) %allconfdir/sendfax.config
%config(noreplace) %allconfdir/faxrunq.config
%config(noreplace) %allconfdir/faxheader
%config(noreplace) %allconfdir/faxspool.rules.sample

%files voice
%_spooldir/voice
/sbin/vgetty
%_bindir/vm
%_bindir/pvfamp
%_bindir/pvfcut
%_bindir/pvfecho
%_bindir/pvffile
%_bindir/pvffilter
%_bindir/pvfnoise
%_bindir/pvffft
%_bindir/pvfmix
%_bindir/pvfreverse
%_bindir/pvfsine
%_bindir/pvfspeed
%_bindir/pvftormd
%_bindir/rmdtopvf
%_bindir/rmdfile
%_bindir/pvftovoc
%_bindir/voctopvf
%_bindir/pvftolin
%_bindir/lintopvf
%_bindir/pvftobasic
%_bindir/basictopvf
%_bindir/pvftoau
%_bindir/autopvf
%_bindir/pvftowav
%_bindir/wavtopvf
%_mandir/man1/zplay.*
%_mandir/man1/pvf.*
%_mandir/man1/pvfamp.*
%_mandir/man1/pvfcut.*
%_mandir/man1/pvfecho.*
%_mandir/man1/pvffile.*
%_mandir/man1/pvffilter.*
%_mandir/man1/pvffft.*
%_mandir/man1/pvfmix.*
%_mandir/man1/pvfnoise.*
%_mandir/man1/pvfreverse.*
%_mandir/man1/pvfsine.*
%_mandir/man1/pvfspeed.*
%_mandir/man1/pvftormd.*
%_mandir/man1/rmdtopvf.*
%_mandir/man1/rmdfile.*
%_mandir/man1/pvftovoc.*
%_mandir/man1/voctopvf.*
%_mandir/man1/pvftolin.*
%_mandir/man1/lintopvf.*
%_mandir/man1/pvftobasic.*
%_mandir/man1/basictopvf.*
%_mandir/man1/pvftoau.*
%_mandir/man1/autopvf.*
%_mandir/man1/pvftowav.*
%_mandir/man1/wavtopvf.*
%_mandir/man8/vgetty.*
%config(noreplace) %allconfdir/voice.conf

%files viewfax
%_x11bindir/viewfax
%_x11mandir/man1/viewfax.*
%dir %alllibdir
%alllibdir/viewfax.tif
%doc frontends/X11/viewfax-2.5/{ChangeLog,README}

%files doc
%doc BUGS ChangeLog FTP THANKS TODO Recommend README.CID
%doc doc/{modems.db,*.ps,*.txt,fhng-codes}
%doc samples contrib

# TODO:

# - 1.1.35 (some patches need review/rediffing)

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin