Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > media > main-src > by-pkgid > 8101837e7f6f3456425a2e313f87acca > files > 11

mgetty-1.1.22-2mdk.src.rpm

%define name mgetty
%define version 1.1.22
%define release 2mdk

Summary: A getty replacement for use with data and fax modems.
Name: %name
Version: %version
Release: %release
Source: ftp://ftp.leo.org/pub/comp/os/unix/networking/mgetty/%name-%version.tar.bz2
Patch0: mgetty-1.1.14-config.patch.bz2
Patch1: mgetty-1.1.5-makekvg.patch.bz2
Patch2: mgetty-1.1.14-policy.patch.bz2
Patch3: mgetty-1.1.5-strip.patch.bz2
Patch4: mgetty-1.1.14-echo.patch.bz2
Patch5: mgetty-1.1.14-logrotate.patch.bz2
Patch6: mgetty-1.1.9-imakefile.patch.bz2
Patch8: mgetty-1.1.21-noroot.patch.bz2
Patch9: mgetty-1.1.21-linkman.patch.bz2
Requires: libgr-progs
Copyright: GPL
Group: Communications
BuildRequires: XFree86-devel
Buildroot: /var/tmp/%name-%version-root
Prereq: /sbin/install-info

%package sendfax
Summary: Provides support for sending faxes over a modem.
Requires: mgetty = %{PACKAGE_VERSION}
Group: Communications

%package voice
Summary: A program for using your modem and mgetty as an answering machine.
Requires: mgetty = %{PACKAGE_VERSION}
Group: Communications

%package viewfax
Summary: An X Window System fax viewer.
Group: Communications

%package contrib
Summary: User contributed stuff that comes with %{name}.
Group: Communications
AutoReqProv: no

%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.

%description contrib

The contents of the contrib directory that comes with %{name}.

%prep
%setup -q
cp policy.h-dist policy.h
%patch0 -p1 -b .config
%patch1 -p1 -b .makekvg
%patch2 -p1
%patch3 -p1 -b .strip
%patch4 -p1 -b .echo
%patch5 -p1
%patch6 -p1
# new texinfo much stricter about xrefs
%patch8 -p1
%patch9 -p1

%build
make "RPM_OPT_FLAGS=$RPM_OPT_FLAGS"
cd voice
make "RPM_OPT_FLAGS=$RPM_OPT_FLAGS"

cd ../frontends/X11/viewfax-2.4
xmkmf
make depend
make CDEBUGFLAGS="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/var/spool -p $RPM_BUILD_ROOT/sbin
make prefix=$RPM_BUILD_ROOT/usr spool=$RPM_BUILD_ROOT/var/spool \
	CONFDIR=$RPM_BUILD_ROOT/etc/mgetty+sendfax install
install -m700 callback/callback $RPM_BUILD_ROOT/usr/sbin
install -m4711 callback/ct $RPM_BUILD_ROOT/usr/bin
strip $RPM_BUILD_ROOT/usr/bin/newslock

mv $RPM_BUILD_ROOT/usr/sbin/mgetty $RPM_BUILD_ROOT/sbin

# this conflicts with efax
mv $RPM_BUILD_ROOT/usr/man/man1/fax.1 $RPM_BUILD_ROOT/usr/man/man1/mgetty_fax.1

# voice mail extensions
(cd voice
mkdir -p $RPM_BUILD_ROOT/var/spool/voice 
mkdir -p $RPM_BUILD_ROOT/var/spool/voice/messages
mkdir -p $RPM_BUILD_ROOT/var/spool/voice/incoming

make prefix=$RPM_BUILD_ROOT/usr spool=$RPM_BUILD_ROOT/var/spool \
	CONFDIR=$RPM_BUILD_ROOT/etc/mgetty+sendfax install

mv $RPM_BUILD_ROOT/usr/sbin/vgetty $RPM_BUILD_ROOT/sbin
install -m 600 -c voice.conf-dist $RPM_BUILD_ROOT/etc/mgetty+sendfax/voice.conf
)
# don't ship documentation that is executable...
find samples -type f -exec chmod 644 {} \;

(cd frontends/X11/viewfax-2.4
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=$RPM_BUILD_ROOT install.man
)

mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m 0644 logrotate.mgetty $RPM_BUILD_ROOT/etc/logrotate.d/mgetty
install -m 0644 logrotate.sendfax $RPM_BUILD_ROOT/etc/logrotate.d/sendfax

#move the man pages
mkdir $RPM_BUILD_ROOT/usr/share
mv $RPM_BUILD_ROOT/usr/man $RPM_BUILD_ROOT/usr/share
#move the info page
#mkdir $RPM_BUILD_ROOT/usr/share
mv $RPM_BUILD_ROOT/usr/info $RPM_BUILD_ROOT/usr/share
%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/install-info /usr/info/mgetty.info.bz2 /usr/info/dir --entry="* mgetty: (mgetty).		Package to handle faxes, voicemail and more."

%preun
if [ $1 = 0 ]; then
    /sbin/install-info --delete /usr/info/mgetty.info.bz2 /usr/info/dir --entry="* mgetty: (mgetty). 	Package to handle faxes, voicemail and more."
fi

%postun
if [ $1 = 0 ]; then
  rm -fr /var/log/mgetty.log*
fi

%postun sendfax
if [ $1 = 0 ]; then
  rm -fr /var/log/sendfax.log*
fi


%files
%defattr(-,root,root)
%doc FAQ BUGS ChangeLog FTP README.1st THANKS TODO Recommend
%doc doc/modems.db samples 
%doc doc/mgetty.ps doc/mgetty.dvi doc/mgetty.texi doc/*.txt doc/fhng-codes
/sbin/mgetty
%{_mandir}/man8/mgetty.8*
%{_mandir}/man8/callback.8*
%{_mandir}/man8/faxrunqd.8*
%{_mandir}/man4/mgettydefs.4*
%{_infodir}/mgetty.info*
%dir /etc/mgetty+sendfax
%config(noreplace) /etc/mgetty+sendfax/login.config
%config(noreplace) /etc/mgetty+sendfax/mgetty.config
%config(noreplace) /etc/mgetty+sendfax/dialin.config
%config(noreplace) /etc/logrotate.d/mgetty

%files sendfax
%defattr(-,root,root)

%dir /var/spool/fax
%dir /var/spool/fax/incoming
%dir /var/spool/fax/outgoing
%dir /var/spool/fax/outgoing/locks

/usr/bin/kvg
/usr/bin/newslock
/usr/bin/g3cat
/usr/bin/g32pbm
/usr/bin/pbm2g3
/usr/bin/faxspool
/usr/bin/faxrunq
/usr/bin/faxq
/usr/bin/cutbl
/usr/bin/faxrm
%attr(0755,root,root) /usr/bin/ct
/usr/sbin/sendfax
/usr/sbin/faxrunqd
/usr/sbin/callback
%dir	/usr/lib/mgetty+sendfax
/usr/lib/mgetty+sendfax/cour25.pbm
/usr/lib/mgetty+sendfax/cour25n.pbm
%{_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/sendfax.8*
%config(noreplace) /etc/mgetty+sendfax/sendfax.config
%config(noreplace) /etc/mgetty+sendfax/faxrunq.config
%config(noreplace) /etc/mgetty+sendfax/faxheader
%config(noreplace) /etc/logrotate.d/sendfax

%files voice
%defattr(-,root,root)
%dir /var/spool/voice
%dir /var/spool/voice/incoming
%dir /var/spool/voice/messages

/sbin/vgetty
/usr/bin/vm
/usr/bin/pvfamp
/usr/bin/pvfcut
/usr/bin/pvfecho
/usr/bin/pvffile
/usr/bin/pvffilter
/usr/bin/pvfnoise
/usr/bin/pvffft
/usr/bin/pvfmix
/usr/bin/pvfreverse
/usr/bin/pvfsine
/usr/bin/pvfspeed
/usr/bin/pvftormd
/usr/bin/rmdtopvf
/usr/bin/rmdfile
/usr/bin/pvftovoc
/usr/bin/voctopvf
/usr/bin/pvftolin
/usr/bin/lintopvf
/usr/bin/pvftobasic
/usr/bin/basictopvf
/usr/bin/pvftoau
/usr/bin/autopvf
/usr/bin/pvftowav
/usr/bin/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*
%config(noreplace) /etc/mgetty+sendfax/voice.conf

%files viewfax
%defattr(-,root,root)
%doc frontends/X11/viewfax-2.4/C* frontends/X11/viewfax-2.4/README
/usr/bin/viewfax
%dir /usr/lib/mgetty+sendfax
/usr/lib/mgetty+sendfax/viewfax.tif
%{_mandir}/man1/viewfax.1x.bz2

%files contrib
%defattr(-,root,root)
%doc contrib/*


%changelog
* Tue Sep 26 2000 Etienne Faure  <etienne@mandraksoft.com> 1.1.22-2mdk
- Added (noreplace) tag to conffiles

* Thu Aug 31 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.1.22-1mdk
- 1.1.22 fix security.

* Tue Aug 29 2000 Etienne Faure <etienne@mandrakesoft.com> 1.1.21-8mdk
- use the _mandir & _infodir macros

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.1.21-7mdk
- automatically added BuildRequires

* Thu Jul 19 2000 Etienne Faure <etienne@mandrakesoft.com> 1.1.21-6mdk
- rebuild on kenobi
- Changed permission of source files: 664 -> 644

* Fri Mar 31 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.1.21-5mdk
- group fix.

* Fri Nov 26 1999 Florent Villard <warly@mandrakesoft.com>
- Mandrake adaptation
- clean the install script

* Sun Aug 15 1999 Nick Urbanik <nicku@vtc.edu.hk>
- Signed it.

* Sat Aug 14 1999 Nick Urbanik <nicku@vtc.edu.hk>
- updated to 1.1.21
- Created the contrib package (marginally worthwhile)
- Added more documentation to mgetty
- Added more programs to sendfax and voice.

* Tue Apr  6 1999 Bill Nottingham <notting@redhat.com>
- strip setuid bit from ct

* Tue Mar 23 1999 Preston Brown <pbrown@redhat.com>
- better log handling

* Wed Jan 06 1999 Cristian Gafton <gafton@redhat.com>
- rebuild for glibc 2.1

* Sat Aug 22 1998 Jos Vos <jos@xos.nl>
- 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 <jbj@redhat.com>
- 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 <bugs@redhat.com>
- translations modified for de, fr, tr

* Fri Apr 10 1998 Cristian Gafton <gafton@redhat.com>
- updated to 1.1.14
- AutoPPP patch
 
* Thu Dec 18 1997 Mike Wangsmo <wanger@redhat.com>
- added more of the documentation files to the rpm

* Wed Oct 29 1997 Otto Hammersmith <otto@redhat.com>
- added install-info support

* Tue Oct 21 1997 Otto Hammersmith <otto@redhat.com>
- updated version

* Wed Oct 15 1997 Erik Troan <ewt@redhat.com>
- now requires libgr-progs instead of netpbm

* Mon Aug 25 1997 Erik Troan <ewt@redhat.com>
- built against glibc