name: tkscanfax
version: 1.01
release: 1%{?_dist_release}
summary: Tk/Tcl based GUI fax and scanner program
summary(ja): GUIのFAXとScannerのプログラム
License: GPL
url: http://shino.pos.to/linux/tkscanfax.html
group: Applications/Communications

packager: Masaki SHINOMIYA <shino@pos.to>
Vendor: Project Vine
Distribution: Vine Linux
source: http://shino.pos.to/linux/%{name}-%{version}.tar.gz

prefix: %_prefix
Buildarch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: tk, tcl, ImageMagick, ghostscript, file
Requires: netpbm-progs
#^  most of distributions including Vine-2.5
#Requires: libgr-progs    # for Vine-2.0/2.1.x
#Requires: a2ps, psutils  # or,  mpage
#Requires: efax >= 0.9a001114a6   # or, mgetty+sendfax
#Requires: tetex, tetex-latex, tetex-ptex, tetex-dvips, tetex-fonts  # optional
#Requires: pLaTeX2e, pTeX, dvipsk # optional for Vine-2.0/2.1.x
#Requires: sane-backends          # optional

%description
TkFax, a Tk/Tcl based frontend of mgetty+sendfax or efax, 
combinated with TkScan, a frontend of scanner hanndling. 
It helps making the cover page, converting text files, postscript files and
image files into fax file and sending. TkFax works with and without scanner. 
The efax program supports Class-1 faxmodems.
%description -l ja
Tcl/Tkで動くGUIのFAXプログラムTkFaxとスキャナプログラムTkScanです。
 カバーページの作成やテキスト、ポストスクリプト、画像ファイルから
 FAXページを作成、送信できます。またSANEなどと組合せスキャナも使えます。
スキャナが無くてもFAXプログラムは動作します。
 FAXプログラムにはefaxかmgetty+sendfaxが使えます。efaxを使えば
 CLASS1コマンドのモデムもサポートできます。もちろん日本語も使えます。

%prep
%setup -q -n %{name}

%build
for i in tkscan tkfax; do
sed "s,/usr/local,%{prefix}," $i > $i.tmp && ( mv $i.tmp $i; chmod +x $i )
done

mv doc/images/* images
rmdir doc/images
mv doc/* ./

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/%{name}
cp -pR *.tcl  tkfax tkscan scan-drivers tex $RPM_BUILD_ROOT%{prefix}/lib/%{name}
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/%{name}/images
cp -R images/*.gif $RPM_BUILD_ROOT%{prefix}/lib/%{name}/images
mkdir -p $RPM_BUILD_ROOT%{prefix}/bin
for i in tkscan tkfax; do
ln -sf %{prefix}/lib/%{name}/$i $RPM_BUILD_ROOT%{prefix}/bin/$i
done


# prepare applnk
%define applnkdir /etc/X11/applnk/Applications
%define icondir %{prefix}/share/pixmaps

mkdir -p $RPM_BUILD_ROOT%{icondir}
cp -p images/tkfax-s.xpm  $RPM_BUILD_ROOT%{icondir}

mkdir -p $RPM_BUILD_ROOT/%{applnkdir}
cat > $RPM_BUILD_ROOT/%{applnkdir}/%{name}.desktop <<EOF
[Desktop Entry]
Name=TkFax
Comment=Sending and recieiving Fax
Name[ja_JP.eucJP]=TkFax
Comment[ja_JP.eucJP]=FAX送受信(TkFax)
Exec=tkfax 
Icon=%{icondir}/tkfax-s.xpm
Terminal=false
MultipleArgs=false
Type=Application
EOF

%clean
rm -rf $RPM_BUILD_ROOT
#rm -rf $RPM_BUILD_DIR/%{name}

%files
%defattr(-, root, root)
%{prefix}/bin/*
%{prefix}/lib/%{name}/*-[^c]*.tcl
#%{prefix}/lib/%{name}/fax-conf-win.tcl
%{prefix}/lib/%{name}/msg*.tcl
%config(noreplace) %{prefix}/lib/%{name}/tk*
%config %{prefix}/lib/%{name}/*-conf.tcl
#%config %{prefix}/lib/%{name}/*-conf_ja.tcl
%config %{prefix}/lib/%{name}/tex/*
%dir %{prefix}/lib/%{name}/tex
%config %{prefix}/lib/%{name}/scan-drivers/*
%dir %{prefix}/lib/%{name}/scan-drivers
%{prefix}/lib/%{name}/images
%dir %{prefix}/lib/%{name}
%config(noreplace, missingok) %{icondir}/*
%config(noreplace, missingok) %{applnkdir}/*.desktop
%doc README* INSTALL* TRANSLATION  *.html images  *.sample* fax *.sh

%changelog
* Sun Oct 12 2008 Shu KONNO <owa@bg.wakwak.com> 1.01-1vl5
- applied new versioning policy, spec in utf-8
- s/Copyright/License/

* Mon Apr 1 2002 Masaki Shinomiya <shino@pos.to>
- 1.01-0vl1 for Vine-2.0/2.1.x, 1.01-0vl2 for Vine-2.5
* Sun Mar 24 2002 Masaki Shinomiya <shino@pos.to>
- version 1.01-1(/usr/doc) , -2(/usr/share/doc) 
- bugfix in making faxes using scanners

* Sat Feb 2 2002 Masaki Shinomiya <shino@pos.to>
- version 1.0-1(/usr/doc) , -2(/usr/share/doc), -0vl1 for Vine-2.x
- log browser, bugfixes, requires

* Sun Jan 20 2002 Masaki Shinomiya <shino@pos.to>
- version 0.99final-1(/usr/doc) , -2(/usr/share/doc) 
- log browser

* Mon Jan 14 2002 Masaki Shinomiya <shino@pos.to>
- version 0.99f-1
-  Keep fax pages of previous session.  Special charactors escaped. TkScan bugfix

* Sun Dec 16 2001 Masaki Shinomiya <shino@pos.to>
- version 0.99e-1
- TkScan bugfix, fax spooling bugfix, fax spooling with LPRng
- include fax script in doc

* Sun Oct 21 2001 Masaki Shinomiya <shino@pos.to>
- version 0.99d-1
- fax spooling bugfix, english typo

* Sun Oct 7 2001 Masaki Shinomiya <shino@pos.to>
- version 0.99c-1
- Support 'Fax Outgoing' box with efax spooling function. 
- Windows expandable 
- 'From', 'To' order in the cover page
- error traps in fax^pbook.tcl
- eliminate tex/cover-??.tex
- include html documents on efax settings

* Sat Sep 8 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.99b-1
  - fixed  some system does not work properly  when calling dvips
  - Japanese input method in Tk-8.3
  - try to keep proper size in image conversion
  - allow to run without LaTeX
  - support 'a2ps' in place of 'mpage' 
  - automatic configuration in selecting some commands for the system
  - configuration parameters
  - improved error trap

* Sat Aug 25 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.99a-1
  - looking up env(LANG)
  - fax-received box, fax print, fax view, english typo
  - images in documents

* Sun Jul 29 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.99-1, 1ja
  - add english documents

* Fri Jul 20 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91j1-0.5
  - Link with LyX in face cover page making, by Ryoji Kawagishi

* Wed Jul 4 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91j-0.5
  - GUI for face cover page making, by Ryoji Kawagishi

* Fri Jun 15 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91-0.96e
  - launch fax-received window after receive completed
  - fixed misleading message after deleting fax page

* Thu Jun 14 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91-0.95e
  - supports manual dialing
  - new scanner driver for SHARP JX-250

* Sun Jun 10 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91-0.94e
  - fixed the problem in launching tkscan alone

* Sat Jun 9 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91-0.93e
  - halftoning in scanner drivers, misc bugs fix
  - error logs to be colected in /var/log/fax
  - build architechture is now noarch

* Mon Jun 4 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91-0.92e
  - Fixed image conversion

* Thu May 31 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91-0.91e
  - Fixed printing nomal-mode fax

* Wed May 30 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91-0.90e
  - Fixed printing, phone book, scroll mouse support

* Tue May 29 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91-0.8efax2
  - Fixed scanning, printing, pbm to tiffg3

* Mon May 28 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91-0.8efax1
  - Japanese TeX tenplate by Ryoji Kawagishi <kawagisi@yk.rim.or.jp>
  - bugfix in attaching text files

* Tue May 23 2001 Masaki Shinomiya <shino@pos.to>
  - version 0.91-0.8efax
  - Implemented internationalization.
  - Primitive epson-scanimage driver
