%define name ical
%define eversion 2.2
%define version %{eversion}_jp
%define release 10

Summary: Calender application made with Tcl/Tk
Name: %{name} 
Version: %{version}
Release: %{release}
Source: http://www.research.digial.com/SRC/personal/Sanjay_Ghemawat/ical/icalbins/ical-%{eversion}.tar.gz
Source1: ical.wmconfig
Patch0: ical-2.2-newtcl.patch
Patch1: http://www.asahi-net.or.jp/~km5n-tkhs/ical-2.1j.diff
Patch2: http://www.asahi-net.or.jp/~km5n-tkhs/ical-over.diff
Patch3: ical-2.2-gcc2.95.patch
Patch4: ical-2.2-glibc23.patch
Url: http://www.research.digital.com/SRC/personal/Sanjay_Ghemawat/ical/home.html
Copyright: distributable
Group: Applications/Productivity
Vendor: Project Vine
Distribution: Vine Linux
Packager: Jun Nishii <jun@vinelinux.org>
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Summary(ja): Tcl/Tk で動く カレンダー アプリケーション


%description
ical is a popular X-based calendar/scheduler application which 
can help you keep track of single events and recurring events
(daily, weekly, monthly, or yearly), and sets off alarms to warn
you of appointments.

%description -l ja
ical は Xベースのカレンダー/スケジューラです. 各種イベントの管理を
行え, また大事な知らせてくれるアラーム機能もついています.


%prep
rm -rf %{buildroot}

%setup -q -n ical-%{eversion}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p0 -b .gcc2.95
%patch4 -p1


%build
autoconf
%configure
make OPTF='-O -DKANJI -DKINPUT2' X_LIBS='-L/usr/X11R6/lib -lX11'


%install
rm -rf %{buildroot}
install -d %{buildroot}/etc/X11/wmconfig
install -d %{buildroot}%{_mandir}
%makeinstall MANDIR=%{buildroot}%{_mandir} 
install -m 644 %{_sourcedir}/ical.wmconfig %{buildroot}/etc/X11/wmconfig/ical


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%doc ANNOUNCE CHANGES* COPYRIGHT* FTPDIR.README README* TODO INSTALL
%doc doc/ical.html doc/ical.doc 
%doc doc/interface.html doc/interface.doc
%{_bindir}/ical-%{eversion}
%{_bindir}/ical
%{_mandir}/man1/ical.1*
%{_libdir}/ical
%config /etc/X11/wmconfig/ical


%changelog
* Tue Nov 26 2002 Tomoya TAKA <taka@vinelinux.org> 2.2_jp-10
- update Patch4 (add fix of calender/uid.C)

* Fri Mar 15 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.2_jp-9
- rebuilt with new toolchain
- added Patch4

* Fri Mar 15 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.2_jp-8
- rebuilt with glibc > 2.2

* Thu Jan 11 2001 Tomoya TAKA <tomoya@olive.plala.or.jp> 2.2_jp-7
- use %%configure and %%makeinstall
- fix to handle man page correctry with newer %%{_mandir} definition

* Sat Nov 11 2000 MACHINO, Satoshi <machino@vinelinux.org> 2.2_jp-6
- build on gcc-2.95.3
- partially used rpmmacros

* Fri Sep 08 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 2.2_jp-5
- modified %files section to handle compressed man page(s)

* Sat Jan  8 2000 Jun Nishii <jun@vinelinux.org>
- use EUC in spec

* Wed Oct 13 1999 Jun Nishii <jun@flatout.org>
- build for Vine-1.9

* Sun Mar 14 1999 Jun Nishii <jun@flatout.org>
- added ical-2.1j.diff, ical-over.diff
- added Japanese description and summary

* Thu Sep 24 1998 Cristian Gafton <gafton@redhat.com>
- patch to build against the latest tcltk

* Thu Aug 13 1998 Jeff Johnson <jbj@redhat.com>
- build root

* Thu May 07 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Thu Oct 30 1997 Otto Hammersmith <otto@redhat.com>
- fixed wmconfig entry

* Thu Oct 23 1997 Otto Hammersmith <otto@redhat.com>
- replaced references to the version number with %{PACKAGE_VERSION}

* Wed Oct 22 1997 Otto Hammersmith <otto@redhat.com>
- updated to version 2.2, which is supposed to work with Tcl/Tk 8.0
- added wmconfig entry

* Mon Oct 20 1997 Otto Hammersmith <otto@redhat.com>
- Update version

* Tue Sep 30 1997 Erik Troan <ewt@redhat.com>
- build against tcl/tk 8.0

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