[521] | 1 | Summary: A program for faxing using a Class 1, 2 or 2.0 fax modem. |
---|
| 2 | Name: efax |
---|
| 3 | %define ver 0.9a |
---|
| 4 | %define rel 001114 |
---|
| 5 | %define minor b0 |
---|
| 6 | |
---|
| 7 | Version: %{ver}%{rel}%{minor} |
---|
| 8 | Release: 1%{?_dist_release} |
---|
| 9 | License: GPL |
---|
| 10 | Group: Applications/Communications |
---|
| 11 | Source: http://www.cce.com/efax/download/%{name}-%{ver}-%{rel}.tar.gz |
---|
| 12 | #Source: http://shino.pos.to/linux/%{name}-%{ver}%{rel}%{minor}.tar.gz |
---|
| 13 | Source1: http://shino.pos.to/linux/efax/efax.rc.sample |
---|
| 14 | Source2: http://shino.pos.to/linux/efax/efax.rc.sample.ja |
---|
| 15 | Source3: http://shino.pos.to/linux/efax/printcap.sample |
---|
| 16 | Source4: http://shino.pos.to/linux/fax.html |
---|
| 17 | Source5: http://shino.pos.to/linux/efax.html |
---|
| 18 | Source6: http://shino.pos.to/linux/efax/fax-%{minor} |
---|
| 19 | Source7: http://shino.pos.to/linux/efax/ppxpadduser |
---|
| 20 | Patch1: http://shino.pos.to/linux/efax/efax-0.9-numlines.patch |
---|
| 21 | Patch2: http://shino.pos.to/linux/efax/efax08a-time.patch |
---|
| 22 | Patch5: http://shino.pos.to/linux/efax/efax-0.9-nullptr.patch |
---|
| 23 | Patch6: http://shino.pos.to/linux/efax/efax-0.9a-frlen.patch |
---|
| 24 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 25 | |
---|
| 26 | Vendor: Project Vine |
---|
| 27 | Distribution: Vine Linux |
---|
| 28 | |
---|
| 29 | #Prefix: /usr |
---|
| 30 | %define lockdir /var/lock |
---|
| 31 | %define faxdir /var/spool/fax |
---|
| 32 | %define incomingdir /var/spool/fax/incoming |
---|
| 33 | %define outgoingdir /var/spool/fax/outgoing |
---|
| 34 | %define logdir /var/log/fax |
---|
| 35 | %define printcap /etc/printcap |
---|
| 36 | %define printcap2 /etc/printcap.local |
---|
| 37 | %define modemuser uucp |
---|
| 38 | %define lpuser lp |
---|
| 39 | %define efaxconf /etc/efax.rc |
---|
| 40 | %{!?_initrddir:%define _initrddir /etc/rc.d/init.d} |
---|
| 41 | |
---|
| 42 | Url: http://www.cce.com/efax |
---|
| 43 | |
---|
| 44 | %description |
---|
| 45 | Efax is a small ANSI C/POSIX program that sends and receives faxes using |
---|
| 46 | any Class 1, 2 or 2.0 fax modem. |
---|
| 47 | This package include pathces bugfixing fax start/stop commands and |
---|
| 48 | tools for fax spooling. |
---|
| 49 | You need to install efax if you want to send faxes and you have a |
---|
| 50 | Class 1, 2 or 2.0 fax modem. |
---|
| 51 | |
---|
| 52 | %description -l ja |
---|
| 53 | efax はクラス1, 2 または2.0 fax モデムを使用して fax を送受信するための小さな |
---|
| 54 | ANSI C/POSIX なプログラムです。 |
---|
| 55 | このパッケージにはfax start/stop コマンドのバグフィックスと |
---|
| 56 | スプーリングに便利なパッチと設定が含まれています。 |
---|
| 57 | クラス1, 2 または 2.0 fax モデムを使用して fax を送信する場合は efax を |
---|
| 58 | インストールする必要があります。 |
---|
| 59 | |
---|
| 60 | %prep |
---|
| 61 | %setup -q -n %{name}-%{ver}-%{rel} |
---|
| 62 | %patch1 -p1 -b .numlines |
---|
| 63 | %patch2 -p1 -b .time |
---|
| 64 | %patch5 -p1 -b .nullptr |
---|
| 65 | %patch6 -p0 -b .frlen |
---|
| 66 | %__cp %{SOURCE1} ./ |
---|
| 67 | %__cp %{SOURCE2} ./ |
---|
| 68 | %__cp %{SOURCE3} ./ |
---|
| 69 | %__cp %{SOURCE4} ./ |
---|
| 70 | %__cp %{SOURCE5} ./ |
---|
| 71 | %__mv fax fax.org |
---|
| 72 | %__cp %{SOURCE6} ./fax |
---|
| 73 | %__cp %{SOURCE7} ./ |
---|
| 74 | |
---|
| 75 | %build |
---|
| 76 | make RPM_OPT_FLAGS="-ansi $RPM_OPT_FLAGS" |
---|
| 77 | |
---|
| 78 | %install |
---|
| 79 | %__rm -rf $RPM_BUILD_ROOT |
---|
| 80 | %__install -d -m 755 $RPM_BUILD_ROOT%{_bindir} |
---|
| 81 | %__install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1 |
---|
| 82 | %__install -d -m 775 $RPM_BUILD_ROOT%{faxdir} |
---|
| 83 | %__install -d -m 777 $RPM_BUILD_ROOT%{logdir} |
---|
| 84 | %__install -d -m 775 $RPM_BUILD_ROOT%{incomingdir} |
---|
| 85 | %__install -d -m 770 $RPM_BUILD_ROOT%{outgoingdir} |
---|
| 86 | touch $RPM_BUILD_ROOT%{outgoingdir}/lock |
---|
| 87 | chmod 644 $RPM_BUILD_ROOT%{outgoingdir}/lock |
---|
| 88 | %__install -d -m 755 $RPM_BUILD_ROOT/etc |
---|
| 89 | %__cp efax.rc.sample $RPM_BUILD_ROOT/etc/efax.rc |
---|
| 90 | |
---|
| 91 | #%#makeinstall |
---|
| 92 | make BINDIR=$RPM_BUILD_ROOT%{_bindir} MANDIR=$RPM_BUILD_ROOT%{_mandir} install |
---|
| 93 | |
---|
| 94 | cd $RPM_BUILD_ROOT%{_bindir} |
---|
| 95 | ln -s fax faxlpr |
---|
| 96 | |
---|
| 97 | %clean |
---|
| 98 | %__rm -rf $RPM_BUILD_ROOT |
---|
| 99 | #rm -rf $RPM_BUILD_DIR/%{name}-%{version}-%{rel} |
---|
| 100 | |
---|
| 101 | %pre |
---|
| 102 | (id %{lpuser} > /dev/null 2>&1 ) || adduser -d /var/%{lpuser} -c %{lpuser} %{lpuser} |
---|
| 103 | : |
---|
| 104 | |
---|
| 105 | %post |
---|
| 106 | [ -d %{lockdir} ] || mkdir -p %{lockdir} |
---|
| 107 | chmod 777 %{lockdir} |
---|
| 108 | |
---|
| 109 | if [ -w /etc/inittab ] ; then |
---|
| 110 | grep -q "/bin/fax answer" /etc/inittab || \ |
---|
| 111 | echo -e "# Uncomment next line to enable efax auto answer\n#s1:345:respawn:/bin/sh /usr/bin/fax answer" \ |
---|
| 112 | >> /etc/inittab |
---|
| 113 | fi |
---|
| 114 | |
---|
| 115 | #HEADER="##PRINTTOOL3## LOCAL" |
---|
| 116 | PRINTCAP=%{printcap} |
---|
| 117 | [ -w %{printcap2} ] && PRINTCAP=%{printcap2} |
---|
| 118 | if [ -w "$PRINTCAP" ] && ! grep -q "^fax:" $PRINTCAP ; then |
---|
| 119 | tail -n 7 %{_docdir}/%{name}-%{version}/printcap.sample >> $PRINTCAP |
---|
| 120 | #cat >> $PRINTCAP << EOF |
---|
| 121 | #$HEADER |
---|
| 122 | #fax:\ |
---|
| 123 | # :sd=/var/spool/fax/outgoing:\ |
---|
| 124 | # :mx#0:\ |
---|
| 125 | # :sh:\ |
---|
| 126 | # :lp=/dev/null:\ |
---|
| 127 | # :if=/usr/bin/faxlpr: |
---|
| 128 | #EOF |
---|
| 129 | # restart lpd |
---|
| 130 | if (ps ax | grep -v grep | grep -q lpd) ; then |
---|
| 131 | [ -x %{_initrddir}/lpd ] && %{_initrddir}/lpd restart |
---|
| 132 | fi |
---|
| 133 | fi |
---|
| 134 | : |
---|
| 135 | |
---|
| 136 | %postun |
---|
| 137 | if [ $1 -eq 0 ] ; then |
---|
| 138 | # Delete fax entry from printcap |
---|
| 139 | PRINTCAP=%{printcap} |
---|
| 140 | [ -w %{printcap2} ] && PRINTCAP=%{printcap2} |
---|
| 141 | FILE=$PRINTCAP |
---|
| 142 | BEGIN=$(cat -n $FILE | grep 'fax:' | sed -e 's/^[ ]*//' -e 's/[^0-9].*//') |
---|
| 143 | END=$(cat -n $FILE | grep ':if=/usr/bin/faxlpr:' | sed -e 's/^[ ]*//' -e 's/[^0-9].*//') |
---|
| 144 | LINES=$(wc -l $FILE | sed -e 's/^[ ]*//' -e 's/[^0-9].*//') |
---|
| 145 | if [ -n "$BEGIN" -a -n "$END" -a -n "$LINES" ];then |
---|
| 146 | HEAD=$(expr $BEGIN - 2) |
---|
| 147 | TAIL=$(expr $LINES - $END) |
---|
| 148 | if [ $HEAD -ge 0 ];then |
---|
| 149 | rm -f $FILE.new |
---|
| 150 | (head -n $HEAD $FILE; tail -n $TAIL $FILE) > $FILE.new && \ |
---|
| 151 | (mv -f $FILE $FILE.bak; mv $FILE.new $FILE) |
---|
| 152 | # restart lpd |
---|
| 153 | if (ps ax | grep -v grep | grep -q lpd) ; then |
---|
| 154 | [ -x %{_initrddir}/lpd ] && %{_initrddir}/lpd restart |
---|
| 155 | fi |
---|
| 156 | fi |
---|
| 157 | fi |
---|
| 158 | fi |
---|
| 159 | : |
---|
| 160 | |
---|
| 161 | %files |
---|
| 162 | %defattr(-,root,root) |
---|
| 163 | %doc README COPYING *.sample* *.html ppxpadduser |
---|
| 164 | %config %{_bindir}/fax |
---|
| 165 | %config(missingok, noreplace) %{efaxconf} |
---|
| 166 | %{_bindir}/efax |
---|
| 167 | %{_bindir}/efix |
---|
| 168 | %{_bindir}/faxlpr |
---|
| 169 | %{_mandir}/man1/fax.1* |
---|
| 170 | %{_mandir}/man1/efax.1* |
---|
| 171 | %{_mandir}/man1/efix.1* |
---|
| 172 | %attr(-,root,%{modemuser}) %dir %{faxdir} |
---|
| 173 | %attr(-,root,%{modemuser}) %{logdir} |
---|
| 174 | %attr(-,root,%{modemuser}) %{incomingdir} |
---|
| 175 | %attr(-,%{lpuser},%{lpuser}) %{outgoingdir} |
---|
| 176 | |
---|
| 177 | |
---|
| 178 | %changelog |
---|
| 179 | * Mon Sep 22 2008 Shu KONNO <owa@bg.wakwak.com> 0.9a001114b0-1vl5 |
---|
| 180 | - applied new versioning policy, spec in utf-8 |
---|
| 181 | |
---|
| 182 | * Sun Jul 30 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.9a001114b0-0vl2 |
---|
| 183 | - rebuilt for VineSeed |
---|
| 184 | - s/Copyright/License/ |
---|
| 185 | |
---|
| 186 | * Mon Feb 28 2005 Masaki SHINOMIYA <shino@pos.to> 0.9a001114b0-0vl1 |
---|
| 187 | - use fax-b0, bugfix in handling '-m' option |
---|
| 188 | - bugfix in function faxmail by Marc Ferraton <mferrato@ogm-techno.org> |
---|
| 189 | - frlen.patch, REMID in fax both informed by Steven Doerfler <steven@lugaru.com> |
---|
| 190 | - post and postun scripts, (_initrddir) |
---|
| 191 | - accept '_054' as ','(comma) |
---|
| 192 | - noreplace efax.rc |
---|
| 193 | - build on Vine Linux 3.1 |
---|
| 194 | |
---|
| 195 | * Sun Mar 31 2002 Jun Nishii <jun@vinelinux.org> 0.9a001114a7-0vl2 |
---|
| 196 | - rebuild for Vine Linux 2.5 |
---|
| 197 | |
---|
| 198 | * Wed Jan 30 2002 Masaki SHINOMIYA <shino@pos.to> 0.9a001114a7-0vl1 for Vine 2.1 |
---|
| 199 | * Wed Jan 30 2002 Masaki SHINOMIYA <shino@pos.to> 0.9a001114a7-1 |
---|
| 200 | - avoid 'bad units' error in some european locale |
---|
| 201 | |
---|
| 202 | * Sun Jan 6 2002 Masaki SHINOMIYA <shino@pos.to> 0.9a001114a6-0vl1 for Vine 2.1 |
---|
| 203 | * Sun Jan 6 2002 Masaki SHINOMIYA <shino@pos.to> 0.9a001114a6-1 |
---|
| 204 | - accept escape sequence, '_043'as'#', '_052'as'*' |
---|
| 205 | - change the release number |
---|
| 206 | - use macros |
---|
| 207 | |
---|
| 208 | * Sat Dec 15 2001 Masaki SHINOMIYA <shino@pos.to> 0.9a001114-0a5 |
---|
| 209 | - spec for rpm -tb |
---|
| 210 | - faxlpr to work with LPRng |
---|
| 211 | - patches taken from RHL efax-0.9-9 |
---|
| 212 | |
---|
| 213 | * Sun Oct 7 2001 Masaki SHINOMIYA <shino@pos.to> 0.9a001114-0a4 |
---|
| 214 | - do not specify any distributions |
---|
| 215 | * Sun Oct 7 2001 Masaki SHINOMIYA <shino@pos.to> 0.9a001114-0vl4 |
---|
| 216 | - efax-spooling.patch introducing INCOMING and OUTGOING |
---|
| 217 | - symlink of faxlpr and efax.rc.sampl to use spooling |
---|
| 218 | - postscript including chmod some directories to 777 to enable pooling |
---|
| 219 | - CLASSINIT in efax.rc.sample |
---|
| 220 | - descriptions |
---|
| 221 | - html documents written by me |
---|
| 222 | |
---|
| 223 | * Mon Aug 20 2001 Masaki SHINOMIYA <shino@pos.to> 0.9a001114-0vl3 |
---|
| 224 | - efax-answer.patch to fix some problems in auto answering function |
---|
| 225 | - efax.rc to be a config |
---|
| 226 | |
---|
| 227 | * Sat Jun 20 2001 Masaki SHINOMIYA <shino@pos.to> 0.9a001114-0vl2 |
---|
| 228 | - fixed bugs in postscript |
---|
| 229 | - efax.rc.sample to be installed in /usr/doc directory |
---|
| 230 | |
---|
| 231 | * Sat Jun 16 2001 Masaki SHINOMIYA <shino@pos.to> 0.9a001114-0vl1 |
---|
| 232 | - rename for VinePlus package |
---|
| 233 | |
---|
| 234 | * Wed Jun 13 2001 Masaki SHINOMIYA <shino@pos.to> 0.9a-001114c |
---|
| 235 | - create /etc/efax.rc if not exists |
---|
| 236 | - /dev/modem is now default |
---|
| 237 | |
---|
| 238 | * Wed Jun 6 2001 Masaki SHINOMIYA <shino@pos.to> 0.9a-001114b |
---|
| 239 | - add log directory /var/log/fax |
---|
| 240 | |
---|
| 241 | * Tue May 29 2001 Masaki SHINOMIYA <shino@pos.to> 0.9a-001114a |
---|
| 242 | - post-install-script, efax.rc.sample |
---|
| 243 | |
---|
| 244 | * Thu May 23 2001 Masaki SHINOMIYA <shino@pos.to> 0.9a-001114 |
---|
| 245 | |
---|
| 246 | * Fri Oct 13 2000 MACHINO, Satoshi <machino@vinelinux.org> 0.9-1vl2 |
---|
| 247 | - fixed in %files for brp-redhat scripts |
---|
| 248 | |
---|
| 249 | * Tue Jun 29 1999 Cristian Gafton <gafton@redhat.com> |
---|
| 250 | - updated to 0.9 (#3808) |
---|
| 251 | |
---|
| 252 | * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> |
---|
| 253 | - auto rebuild in the new build environment (release 11) |
---|
| 254 | |
---|
| 255 | * Wed Feb 24 1999 Preston Brown <pbrown@redhat.com> |
---|
| 256 | - Injected new description and group. |
---|
| 257 | |
---|
| 258 | * Tue Feb 02 1999 Preston Brown <pbrown@redhat.com> |
---|
| 259 | - patch to fix null ptr dereference |
---|
| 260 | - added -ansi flag; fixes efix problem (produced bad tiff files) |
---|
| 261 | |
---|
| 262 | * Fri Dec 18 1998 Preston Brown <pbrown@redhat.com> |
---|
| 263 | - bumped spec number for initial rh 6.0 build |
---|
| 264 | |
---|
| 265 | * Tue Aug 11 1998 Jeff Johnson <jbj@redhat.com> |
---|
| 266 | - build root |
---|
| 267 | |
---|
| 268 | * Mon Apr 27 1998 Prospector System <bugs@redhat.com> |
---|
| 269 | - translations modified for de, fr, tr |
---|
| 270 | |
---|
| 271 | * Wed Oct 22 1997 Michael Fulbright <msf@redhat.com> |
---|
| 272 | - cleaned spec file to new standard, confirmed package is up to date |
---|
| 273 | |
---|
| 274 | * Tue Mar 25 1997 Erik Troan <ewt@redhat.com> |
---|
| 275 | - Added efax-08a-64bit.patch from David Mosberger |
---|