Package mgetty: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
%define allname %name+sendfax
%define allconfdir %_sysconfdir/%allname
%define alllibdir %_libdir/%allname

Name: mgetty
Version: 1.1.37
Release: alt1.1.1

%define verdate Jun05

Summary: A getty replacement for use with data and fax modems
License: GPL
Group: Communications

Url: http://mgetty.greenie.net/
Source: ftp://mgetty.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

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

Patch35: %name-alt-warnings.patch

# from gentoo
Patch40: mgetty-1.1.31-callback.patch
Patch41: mgetty-1.1.35-faxrunq.patch
Patch42: mgetty-1.1.35-strerror.patch

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

PreReq: /var/lock/serial

# Automatically added by buildreq on Tue Oct 06 2009
BuildRequires: gccmakedep groff-base imake libX11-devel libXext-devel xorg-cf-files
BuildRequires: texlive-base
# explicitly added texinfo for info files
BuildRequires: texinfo

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

%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
BuildArch: noarch

%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
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
#patch6 -p1
%patch7 -p1
#patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
#patch12 -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

%patch35 -p2

%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
%make doc-all

pushd frontends/X11/viewfax
xmkmf
%make HELPDIR=%alllibdir CONFDIR=%allconfdir depend
%make CDEBUGFLAGS="%optflags" 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,%_man1dir}
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 install install.man

install -pDm640 %SOURCE1 %buildroot%_sysconfdir/logrotate.d/%name
install -pm700 callback/callback %buildroot%_sbindir
install -pm755 callback/ct %buildroot%_bindir

# This conflicts with efax
mv %buildroot%_man1dir/fax.1 %buildroot%_man1dir/%{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

%files
/sbin/%name
%_sbindir/%name
%_man8dir/%name.8*
%_man8dir/callback.8*
%_man8dir/faxrunqd.8*
#_man8dir/vgetty.8*
%_man4dir/*
%_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
%_logdir/%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
%_man1dir/g32pbm.*
%_man1dir/pbm2g3.*
%_man1dir/sff2g3.*
%_man1dir/g3cat.*
%_man1dir/%{name}_fax.*
%_man1dir/faxspool.*
%_man1dir/faxrunq.*
%_man1dir/faxq.*
%_man1dir/faxrm.*
%_man1dir/coverpg.*
%_man5dir/faxqueue.*
%_man8dir/sendfax.*
%_man8dir/faxq-helper.*
%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
%_man1dir/zplay.*
%_man1dir/pvf.*
%_man1dir/pvfamp.*
%_man1dir/pvfcut.*
%_man1dir/pvfecho.*
%_man1dir/pvffile.*
%_man1dir/pvffilter.*
%_man1dir/pvffft.*
%_man1dir/pvfmix.*
%_man1dir/pvfnoise.*
%_man1dir/pvfreverse.*
%_man1dir/pvfsine.*
%_man1dir/pvfspeed.*
%_man1dir/pvftormd.*
%_man1dir/rmdtopvf.*
%_man1dir/rmdfile.*
%_man1dir/pvftovoc.*
%_man1dir/voctopvf.*
%_man1dir/pvftolin.*
%_man1dir/lintopvf.*
%_man1dir/pvftobasic.*
%_man1dir/basictopvf.*
%_man1dir/pvftoau.*
%_man1dir/autopvf.*
%_man1dir/pvftowav.*
%_man1dir/wavtopvf.*
%_man8dir/vgetty.*
%config(noreplace) %allconfdir/voice.conf

%files viewfax
%_bindir/viewfax
%_man1dir/viewfax.*
%dir %alllibdir
%alllibdir/viewfax.tif
%doc frontends/X11/viewfax/{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:
# - Update or remove patches:
#   o mgetty-1.1.24-texinfo.patch
#   o mgetty-1.1.24-faxprint.patch
# - Consider Gentoo patches

%changelog
* Thu Dec 03 2015 Igor Vlasenko <viy@altlinux.ru> 1.1.37-alt1.1.1
- NMU: added BR: texinfo

* Sat May 05 2012 Michael Shigorin <mike@altlinux.org> 1.1.37-alt1.1
- doc subpackage made noarch
- vgetty(8) manpage duplicate no longer shipped with mgetty,
  as it really belongs to mgetty-voice subpackage

* Sat May 05 2012 Michael Shigorin <mike@altlinux.org> 1.1.37-alt1
- 1.1.37-Jun05
- build docs

* Sat Oct 08 2011 Michael Shigorin <mike@altlinux.org> 1.1.36-alt1
- NMU: 1.1.36
- patch12, patch41 merged upstream
- micro spec cleanup

* Tue Oct 06 2009 Grigory Batalov <bga@altlinux.ru> 1.1.35-alt2
- Rebuild with texlive.
- Remove obsolete install_info calls.
- mgetty-sendfax conflicts with efax due to %_spooldir/fax ownership.

* Sat Dec 13 2008 Valery Inozemtsev <shrek@altlinux.ru> 1.1.35-alt1.1
- NMU: updated build dependencies

* Mon Nov 26 2007 Slava Semushin <php-coder@altlinux.ru> 1.1.35-alt1
- Updated to 1.1.35
- Spec cleanup
- Disabled mgetty-1.1.24-faxprint.patch (need more investigation)

* Thu Mar 29 2007 Michael Shigorin <mike@altlinux.org> 1.1.31-alt1.1
- NMU: an attempt to fix x86_64 build
  + updated patch5
- added gentoo patches
- spec fixes

* Sat Jan 29 2005 Fr. Br. George <george@altlinux.ru> 1.1.31-alt1
- Version upping
- Fedora core patches applied (1.1.31-2)

* Mon Jun 07 2004 Fr. Br. George <george@altlinux.ru> 1.1.30-alt3
- Removing g3topbm again (conflicts with netpbm)

* Fri Jun 04 2004 Fr. Br. George <george@altlinux.ru> 1.1.30-alt2
- Minor voice.conf bug fixed

* Tue Feb 03 2004 Fr. Br. George <george@altlinux.ru> 1.1.30-alt1
- Using new version mgetty 1.1.30

* Fri Nov 15 2002 Konstantin Volckov <goldhead@altlinux.ru> 1.1.28-alt3
- Rebuilt in new environment

* Mon Jul 08 2002 Konstantin Volckov <goldhead@altlinux.ru> 1.1.28-alt2
- Some path fixes
- Fixed log file creating and using

* Mon Mar 04 2002 Konstantin Volckov <goldhead@altlinux.ru> 1.1.28-alt1
- 1.1.28

* Fri Dec 21 2001 Konstantin Volckov <goldhead@altlinux.ru> 1.1.27-alt2
- Fixed conflict with netpbm (in filelist)

* Tue Nov 28 2001 Konstantin Volckov <goldhead@altlinux.ru> 1.1.27-alt1
- 1.1.27
- Fixed filelist

* Tue Oct 16 2001 Konstantin Volckov <goldhead@altlinux.ru> 1.1.26-alt2
- Added patches to use AON's in USR Courier's with some russian firmware
  from Sir Raorn
- Changes to new /var/lock/serial scheme
- Some spec cleanup

* Thu May 24 2001 Konstantin Volckov <goldhead@altlinux.ru> 1.1.26-alt1
- Using new version mgetty 1.1.26
- Fixed log messages sending to syslog

* Wed Feb 28 2001 Konstantin Volckov <goldhead@linux.ru.net> 1.1.25-ipl2mdk
- Added latest voice patch
- Fixed detecting USR Courier modems with russian firmware
- Added -DFIDO flag

* Sun Feb 04 2001 Dmitry V. Levin <ldv@fandra.org> 1.1.25-ipl1mdk
- 1.1.25
- Added faxprint patch.

* Sat Jan 20 2001 Dmitry V. Levin <ldv@fandra.org> 1.1.24-ipl1mdk
- RE adaptions.
- Texinfo patch.
- Real FHSification.
- Improved logrotate support.
- Merged RH patched.

* Wed Jan 10 2001 Vincent Danen <vdanen@mandrakesoft.com> 1.1.24-1mdk
- 1.1.24 (security fixes for tmpfile insecurities)

* Wed Jan 10 2001 Yves Duret <yduret@mandrakesoft.com> 1.1.22-3mdk
- macros
- s/Copyright/License/

* 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