mgetty-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. %define _sysconfdir /etc
  2. %define using_netpbm 1
  3. %define have_mkdtemp 1
  4. #%%define have_mkdtemp 0
  5. Summary: A getty replacement for use with data and fax modems.
  6. Name: mgetty
  7. Version: 1.1.25
  8. Release: 5vl4
  9. Source: ftp://ftp.leo.org/pub/comp/os/unix/networking/mgetty/mgetty%{version}-Feb01.tar.gz
  10. Source1: logrotate.mgetty
  11. Source2: logrotate.sendfax
  12. Source3: logrotate.vgetty
  13. Source4: logrotate.vm
  14. Patch0: http://www-internal.alphanet.ch/~schaefer/vgetty/global_patches/CURRENT/mgetty-1.1.25-to-11032001.bz2
  15. Patch1: mgetty-1.1.22-config.patch
  16. Patch2: mgetty-1.1.26-policy.patch
  17. Patch3: mgetty-1.1.25-faxprint.patch
  18. Patch4: mgetty-1.1.21-giftopnm.patch
  19. Patch5: mgetty-1.1.25-voiceconfig.patch
  20. Patch6: mgetty-1.1.25-elsa.patch
  21. License: GPL
  22. Group: Applications/Communications
  23. Prereq: /sbin/install-info
  24. BuildPrereq: groff, tetex, texinfo
  25. Buildroot: %{_tmppath}/%{name}-root
  26. Requires: mktemp
  27. URL: http://www.leo.org/~doering/mgetty/index.html
  28. %package sendfax
  29. Summary: Provides support for sending faxes over a modem.
  30. Requires: mgetty = %{version}
  31. Group: Applications/Communications
  32. %if %{using_netpbm}
  33. Requires: netpbm-progs
  34. %else
  35. Requires: libgr-progs
  36. %endif
  37. %package voice
  38. Summary: A program for using your modem and mgetty as an answering machine.
  39. Requires: mgetty = %{version}
  40. Group: Applications/Communications
  41. %package viewfax
  42. Summary: An X Window System fax viewer.
  43. Group: Applications/Communications
  44. %description
  45. The mgetty package contains a "smart" getty which allows logins over a
  46. serial line (i.e., through a modem). If you're using a Class 2 or 2.0
  47. modem, mgetty can receive faxes. If you also need to send faxes,
  48. you'll need to install the sendfax program.
  49. If you'll be dialing in to your system using a modem, you should
  50. install the mgetty package. If you'd like to send faxes using mgetty
  51. and your modem, you'll need to install the mgetty-sendfax program. If
  52. you need a viewer for faxes, you'll also need to install the
  53. mgetty-viewfax package.
  54. %description sendfax
  55. Sendfax is a standalone backend program for sending fax files. The
  56. mgetty program (a getty replacement for handling logins over a serial
  57. line) plus sendfax will allow you to send faxes through a Class 2
  58. modem.
  59. If you'd like to send faxes over a Class 2 modem, you'll need to
  60. install the mgetty-sendfax and the mgetty packages.
  61. %description voice
  62. The mgetty-voice package contains the vgetty system, which enables
  63. mgetty and your modem to support voice capabilities. In simple terms,
  64. vgetty lets your modem act as an answering machine. How well the
  65. system will work depends upon your modem, which may or may not be able
  66. to handle this kind of implementation.
  67. Install mgetty-voice along with mgetty if you'd like to try having
  68. your modem act as an answering machine.
  69. %description viewfax
  70. Viewfax displays the fax files received using mgetty in an X11 window.
  71. Viewfax is capable of zooming in and out on the displayed fax.
  72. If you're installing the mgetty-viewfax package, you'll also need to
  73. install mgetty.
  74. %prep
  75. %setup -q
  76. %patch0 -p1 -b .vgetty
  77. %patch1 -p1 -b .config
  78. %patch2 -p1 -b .policy
  79. %patch3 -p1 -b .faxprint
  80. %if %{using_netpbm}
  81. %patch4 -p1 -b .giftopnm
  82. %endif
  83. %patch5 -p1 -b .voiceconfig
  84. # Should be outdated by the vgetty patch.
  85. #%patch6 -p1 -b .elsa
  86. cp policy.h-dist policy.h
  87. %build
  88. %define makeflags CFLAGS="$RPM_OPT_FLAGS -Wall -DAUTO_PPP" CONFDIR=%{_sysconfdir}/mgetty+sendfax ECHO="'echo -e'" prefix=%{_prefix}
  89. make %{makeflags}
  90. make -C voice %{makeflags}
  91. make -C tools %{makeflags}
  92. %if %{have_mkdtemp}
  93. MKDTEMP_FLAGS=
  94. %else
  95. MKDTEMP_FLAGS=-DNEED_MKDTEMP
  96. %endif
  97. pushd frontends/X11/viewfax-2.5
  98. xmkmf
  99. make depend
  100. make CDEBUGFLAGS="$RPM_OPT_FLAGS $MKDTEMP_FLAGS" CONFDIR=%{_sysconfdir}/mgetty+sendfax
  101. popd
  102. %install
  103. rm -rf $RPM_BUILD_ROOT
  104. mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_infodir},%{_libdir}/mgetty+sendfax}
  105. mkdir -p $RPM_BUILD_ROOT{%{_mandir},%{_sbindir},/sbin,/var/spool}
  106. %define instflags CFLAGS="$RPM_OPT_FLAGS" 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}
  107. make install %instflags
  108. install -m700 callback/callback $RPM_BUILD_ROOT%{_sbindir}
  109. install -m4711 callback/ct $RPM_BUILD_ROOT%{_bindir}
  110. gzip -9n $RPM_BUILD_ROOT%{_infodir}/*
  111. mv $RPM_BUILD_ROOT%{_sbindir}/mgetty $RPM_BUILD_ROOT/sbin
  112. # this conflicts with efax
  113. mv $RPM_BUILD_ROOT%{_mandir}/man1/fax.1 $RPM_BUILD_ROOT%{_mandir}/man1/mgetty_fax.1
  114. # tools
  115. make -C tools install %instflags
  116. # voice mail extensions
  117. mkdir -p $RPM_BUILD_ROOT%{_var}/spool/voice/{messages,incoming}
  118. make -C voice install %instflags
  119. mv $RPM_BUILD_ROOT%{_sbindir}/vgetty $RPM_BUILD_ROOT/sbin
  120. install -m 600 -c voice/voice.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/mgetty+sendfax/voice.conf
  121. # don't ship documentation that is executable...
  122. find samples -type f -exec chmod 644 {} \;
  123. make -C frontends/X11/viewfax-2.5 install %instflags
  124. make -C frontends/X11/viewfax-2.5 install.man %instflags MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1
  125. # install logrotate control files
  126. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
  127. install -m 0644 $RPM_SOURCE_DIR/logrotate.mgetty $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/mgetty
  128. install -m 0644 $RPM_SOURCE_DIR/logrotate.sendfax $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/sendfax
  129. install -m 0644 $RPM_SOURCE_DIR/logrotate.vgetty $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/vgetty
  130. install -m 0644 $RPM_SOURCE_DIR/logrotate.vm $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/vm
  131. %clean
  132. rm -rf $RPM_BUILD_ROOT
  133. %post
  134. /sbin/install-info %{_infodir}/mgetty.info.gz %{_infodir}/dir --entry="* mgetty: (mgetty). Package to handle faxes, voicemail and more."
  135. %preun
  136. if [ $1 = 0 ]; then
  137. /sbin/install-info --delete %{_infodir}/mgetty.info.gz %{_infodir}/dir --entry="* mgetty: (mgetty). Package to handle faxes, voicemail and more."
  138. fi
  139. %files
  140. %defattr(-,root,root)
  141. %doc BUGS ChangeLog README.1st Recommend THANKS doc/modems.db samples
  142. %doc doc/mgetty.ps doc/*.txt
  143. /sbin/mgetty
  144. %{_sbindir}/callback
  145. %{_mandir}/man4/mgettydefs.4*
  146. %{_mandir}/man8/mgetty.8*
  147. %{_mandir}/man8/callback.8*
  148. %{_infodir}/mgetty.info*
  149. %dir %{_sysconfdir}/mgetty+sendfax
  150. %config %{_sysconfdir}/mgetty+sendfax/login.config
  151. %config %{_sysconfdir}/mgetty+sendfax/mgetty.config
  152. %config %{_sysconfdir}/mgetty+sendfax/dialin.config
  153. %config %{_sysconfdir}/logrotate.d/mgetty
  154. %files sendfax
  155. %defattr(-,root,root)
  156. %dir %{_var}/spool/fax
  157. %dir %{_var}/spool/fax/incoming
  158. %dir %{_var}/spool/fax/outgoing
  159. %dir %{_var}/spool/fax/outgoing/locks
  160. %attr(0755,root,root) %{_bindir}/ct
  161. %{_bindir}/faxq
  162. %{_bindir}/faxrm
  163. %{_bindir}/faxrunq
  164. %{_bindir}/faxspool
  165. %{_bindir}/g3cat
  166. %{_bindir}/g32pbm
  167. %{_bindir}/kvg
  168. %{_bindir}/newslock
  169. %{_bindir}/pbm2g3
  170. %{_sbindir}/faxrunqd
  171. %{_sbindir}/sendfax
  172. %dir %{_libdir}/mgetty+sendfax
  173. %{_libdir}/mgetty+sendfax/cour25.pbm
  174. %{_libdir}/mgetty+sendfax/cour25n.pbm
  175. %{_mandir}/man1/g32pbm.1*
  176. %{_mandir}/man1/pbm2g3.1*
  177. %{_mandir}/man1/g3cat.1*
  178. %{_mandir}/man1/mgetty_fax.1*
  179. %{_mandir}/man1/faxspool.1*
  180. %{_mandir}/man1/faxrunq.1*
  181. %{_mandir}/man1/faxq.1*
  182. %{_mandir}/man1/faxrm.1*
  183. %{_mandir}/man1/coverpg.1*
  184. %{_mandir}/man5/faxqueue.5*
  185. %{_mandir}/man8/faxrunqd.8*
  186. %{_mandir}/man8/sendfax.8*
  187. %dir %{_sysconfdir}/mgetty+sendfax
  188. %config %{_sysconfdir}/mgetty+sendfax/sendfax.config
  189. %config %{_sysconfdir}/mgetty+sendfax/faxrunq.config
  190. %config %{_sysconfdir}/mgetty+sendfax/faxspool.rules.sample
  191. %config %{_sysconfdir}/mgetty+sendfax/faxheader
  192. %config %{_sysconfdir}/logrotate.d/sendfax
  193. %files voice
  194. %defattr(-,root,root)
  195. %doc voice/doc/* voice/Announce voice/ChangeLog voice/Readme
  196. %dir %{_var}/spool/voice
  197. %dir %{_var}/spool/voice/incoming
  198. %dir %{_var}/spool/voice/messages
  199. /sbin/vgetty
  200. %{_bindir}/vm
  201. %{_bindir}/pvfamp
  202. %{_bindir}/pvfcut
  203. %{_bindir}/pvfecho
  204. %{_bindir}/pvffft
  205. %{_bindir}/pvffile
  206. %{_bindir}/pvffilter
  207. %{_bindir}/pvfmix
  208. %{_bindir}/pvfnoise
  209. %{_bindir}/pvfreverse
  210. %{_bindir}/pvfsine
  211. %{_bindir}/pvfspeed
  212. %{_bindir}/rmdfile
  213. %{_bindir}/pvftormd
  214. %{_bindir}/rmdtopvf
  215. %{_bindir}/pvftovoc
  216. %{_bindir}/voctopvf
  217. %{_bindir}/pvftolin
  218. %{_bindir}/lintopvf
  219. %{_bindir}/pvftobasic
  220. %{_bindir}/basictopvf
  221. %{_bindir}/pvftoau
  222. %{_bindir}/autopvf
  223. %{_bindir}/pvftowav
  224. %{_bindir}/wavtopvf
  225. %{_mandir}/man1/zplay.1*
  226. %{_mandir}/man1/pvf.1*
  227. %{_mandir}/man1/pvfamp.1*
  228. %{_mandir}/man1/pvfcut.1*
  229. %{_mandir}/man1/pvfecho.1*
  230. %{_mandir}/man1/pvffile.1*
  231. %{_mandir}/man1/pvffft.1*
  232. %{_mandir}/man1/pvfmix.1*
  233. %{_mandir}/man1/pvfreverse.1*
  234. %{_mandir}/man1/pvfsine.1*
  235. %{_mandir}/man1/pvfspeed.1*
  236. %{_mandir}/man1/pvftormd.1*
  237. %{_mandir}/man1/rmdtopvf.1*
  238. %{_mandir}/man1/rmdfile.1*
  239. %{_mandir}/man1/pvftovoc.1*
  240. %{_mandir}/man1/voctopvf.1*
  241. %{_mandir}/man1/pvftolin.1*
  242. %{_mandir}/man1/lintopvf.1*
  243. %{_mandir}/man1/pvftobasic.1*
  244. %{_mandir}/man1/basictopvf.1*
  245. %{_mandir}/man1/pvftoau.1*
  246. %{_mandir}/man1/autopvf.1*
  247. %{_mandir}/man1/pvftowav.1*
  248. %{_mandir}/man1/wavtopvf.1*
  249. %dir %{_sysconfdir}/mgetty+sendfax
  250. %config %{_sysconfdir}/mgetty+sendfax/voice.conf
  251. %config %{_sysconfdir}/logrotate.d/vgetty
  252. %config %{_sysconfdir}/logrotate.d/vm
  253. %files viewfax
  254. %defattr(-,root,root)
  255. %doc frontends/X11/viewfax-2.5/C* frontends/X11/viewfax-2.5/README
  256. %{_bindir}/viewfax
  257. %dir %{_libdir}/mgetty+sendfax
  258. %{_libdir}/mgetty+sendfax/viewfax.tif
  259. %{_mandir}/man1/viewfax.1x*
  260. %changelog
  261. * Wed Dec 19 2001 Toru Sagami <sagami@vinelinux.org> 1.1.25-5vl4
  262. - change %%define mkdtemp 1 in oreder to build on glibc22 system
  263. * Thu Nov 15 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.1.25-5vl3
  264. - BuildPreReq: pTex, pLaTeX2e -> tetex again :)
  265. - (Machino-san previously put 5vl2, but the src.rpm was gone...)
  266. * Thu May 24 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
  267. - 1.1.25-5vl1
  268. - based on 1.1.25-5 from RH 7.1 security update
  269. - BuildPreReq pTeX and pLaTeX2e instead of tetex and tetex-latex
  270. - change %%define mkdtemp 0 (current Vine is based on glibc-2.1.3 yet)
  271. * Wed Apr 18 2001 Nalin Dahyabhai <nalin@redhat.com>
  272. - define _sysconfdir, not sysconfdir
  273. * Mon Apr 16 2001 Nalin Dahyabhai <nalin@redhat.com>
  274. - add logrotate.vm and logrotate.vgetty (note from Heiner Kordewiner)
  275. - add voice/{Announce,Changelog,Readme} to documentation set
  276. * Tue Apr 10 2001 Nalin Dahyabhai <nalin@redhat.com>
  277. - define CNDFILE in policy.h
  278. * Tue Mar 20 2001 Nalin Dahyabhai <nalin@redhat.com>
  279. - change the default group in the vgetty configuration file from phone to uucp,
  280. which matches the settings for faxes
  281. * Tue Mar 13 2001 Nalin Dahyabhai <nalin@redhat.com>
  282. - update to 1.1.25
  283. - ditch the elsa patch in favor of the current vgetty patch
  284. - don't need to strip binaries, buildroot policies do that
  285. - add docs to the voice subpackage
  286. * Tue Jan 16 2001 Nalin Dahyabhai <nalin@redhat.com>
  287. - use mkdtemp() when printing faxes
  288. * Mon Jan 15 2001 Preston Brown <pbrown@redhat.com>
  289. - fix misdetection of USR voice modem detection <cjj@u.washington.edu>
  290. * Mon Jan 08 2001 Preston Brown <pbrown@redhat.com>
  291. - 1.1.24 includes tmpfile security enhancements, some of our patches
  292. * Tue Sep 19 2000 Nalin Dahyabhai <nalin@redhat.com>
  293. - back out quoting patch
  294. - change Copyright: distributable to License: GPL
  295. - add URL
  296. - remove logging changes from excl patch, based on input from Gert
  297. - rework ia64 patch, break out gets/fgets change based on input from Gert
  298. * Thu Sep 7 2000 Nalin Dahyabhai <nalin@redhat.com>
  299. - make sure all scripts quote variables where possible (#17179)
  300. - make sure all scripts use mktemp for generating temporary files
  301. * Sat Aug 26 2000 Bill Nottingham <notting@redhat.com>
  302. - update to 1.1.22; fixes security issues
  303. * Mon Aug 7 2000 Nalin Dahyabhai <nalin@redhat.com>
  304. - fix excl patch to keep everything from segfaulting all the time (#11523,11590)
  305. * Mon Jul 24 2000 Nalin Dahyabhai <nalin@redhat.com>
  306. - forcibly strip binaries (#12431)
  307. - change dependency on libgr-progs (which is gone) to netgr-progs (#10819)
  308. - change dependency on giftoppm to giftopnm (#8088)
  309. - attempt to plug some potential security problems (#11874)
  310. * Thu Jul 12 2000 Than Ngo <than@redhat.de>
  311. - add new V250modem patch from ELSA (thanks to JÓgen Kosel)
  312. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  313. - automatic rebuild
  314. * Fri Jun 23 2000 Than Ngo <than@redhat.de>
  315. - add support ELSA Microlink 56k
  316. * Sun Jun 4 2000 Nalin Dahyabhai <nalin@redhat.com>
  317. - Overhaul for FHS fixes.
  318. - Stop removing logs in postun.
  319. - Stop stripping everything.
  320. - ia64 fixes.
  321. * Wed May 17 2000 Ngo Than <than@redhat.de>
  322. - updated the new vgetty (#bug 10440)
  323. * Sat May 6 2000 Bill Nottingham <notting@redhat.com>
  324. - fix compilation with new gcc, or ia64, or something...
  325. * Tue Mar 7 2000 Jeff Johnson <jbj@redhat.com>
  326. - rebuild for sparc baud rates > 38400.
  327. * Thu Feb 03 2000 Cristian Gafton <gafton@redhat.com>
  328. - man pages are compressed
  329. * Tue Sep 7 1999 Jeff Johnson <jbj@redhat.com>
  330. - add fax print command (David Fox).
  331. * Tue Sep 07 1999 Cristian Gafton <gafton@redhat.com>
  332. - version 1.1.21
  333. * Tue Aug 31 1999 Jeff Johnson <jbj@redhat.com>
  334. - move callback to base package (#4799).
  335. * Wed Jun 2 1999 Jeff Johnson <jbj@redhat.com>
  336. - update to 1.1.20 (#3216).
  337. * Tue Apr 6 1999 Bill Nottingham <notting@redhat.com>
  338. - strip setuid bit from ct
  339. * Tue Mar 23 1999 Preston Brown <pbrown@redhat.com>
  340. - better log handling
  341. * Wed Jan 06 1999 Cristian Gafton <gafton@redhat.com>
  342. - rebuild for glibc 2.1
  343. * Sat Aug 22 1998 Jos Vos <jos@xos.nl>
  344. - Use a patch for creating policy.h using policy.h-dist.
  345. - Add viewfax subpackage (X11 fax viewing program).
  346. - Add logrotate config files for mgetty and sendfax log files.
  347. - Properly define ECHO in Makefile for use with bash.
  348. - Add optional use of dialin.config (for modems supporting this).
  349. - Change default notification address to "root" (was "faxadmin").
  350. - Change log file names according to better defaults.
  351. - Change default notify program to /etc/mgetty+sendfax/new_fax (was
  352. /usr/local/bin/new_fax).
  353. * Fri Aug 21 1998 Jeff Johnson <jbj@redhat.com>
  354. - add faxrunqd man page (problem #850)
  355. - add missing pbm2g3 (and man page); remove unnecessary "rm -f pbmtog3"
  356. - delete redundant ( cd tools; make ... )
  357. * Fri Apr 24 1998 Prospector System <bugs@redhat.com>
  358. - translations modified for de, fr, tr
  359. * Fri Apr 10 1998 Cristian Gafton <gafton@redhat.com>
  360. - updated to 1.1.14
  361. - AutoPPP patch
  362. * Thu Dec 18 1997 Mike Wangsmo <wanger@redhat.com>
  363. - added more of the documentation files to the rpm
  364. * Wed Oct 29 1997 Otto Hammersmith <otto@redhat.com>
  365. - added install-info support
  366. * Tue Oct 21 1997 Otto Hammersmith <otto@redhat.com>
  367. - updated version
  368. * Wed Oct 15 1997 Erik Troan <ewt@redhat.com>
  369. - now requires libgr-progs instead of netpbm
  370. * Mon Aug 25 1997 Erik Troan <ewt@redhat.com>
  371. - built against glibc