Summary: An X Window System utility which notifies you of new mail.
Name: xmailbox
Version: 2.5
Release: 9%{?_dist_release}
License: MIT
Group: Applications/Internet
Source: ftp://ftp.x.org/contrib/applications/xmailbox-2.5.tar.gz
Patch1: xmailbox-2.2-xpm.patch
Patch2: xmailbox-2.4-glibc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description
The xmailbox program is an X Window System program which notifies you
when mail arrives.  Xmailbox is similar to the xbiff program, but it
offers more features and notification options.

Install the xmailbox package if you'd like a graphical program for X
which will notify you when new mail arrives.

%prep
%setup -q
%patch1 -p1
%patch2 -p1

%build
xmkmf
make 

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/X11/wmconfig

strip xmailbox
make DESTDIR=$RPM_BUILD_ROOT MANPATH=%{_mandir} install install.man

cat > $RPM_BUILD_ROOT/etc/X11/wmconfig/xmailbox <<EOF
xmailbox name "xmailbox"
xmailbox description "xmailbox"
xmailbox group Utilities/Mail
xmailbox exec "xmailbox &"
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README
%{_bindir}/xmailbox
%{_mandir}/man1/xmailbox.1x*
%config %{_sysconfdir}/X11/app-defaults/XMailbox
%config /etc/X11/wmconfig/xmailbox

%changelog
* Sun Nov 09 2008 Shu KONNO <owa@bg.wakwak.com> 2.5-9vl5
- rebuild with libXaw.so.7 (libXaw-1.0.5)

* Wed Oct 15 2008 Shu KONNO <owa@bg.wakwak.com> 2.5-8vl5
- applied new versioning policy

* Fri Aug 24 2007 Shu KONNO <owa@bg.wakwak.com> 2.5-7vl3
- s/Copyright/License/

* Thu Nov  9 2000 Masato Bito <masato@nets.ce.hiroshima-cu.ac.jp>
- 2.5-7vl2
- modified %files section to handle compressed man pages

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 7)

* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com>
- build for 6.0

* Wed Aug 12 1998 Jeff Johnson <jbj@redhat.com>
- build root

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

* Wed May 06 1998 Cristian Gafton <gafton@redhat.com>
- updated wmconfig Group line

* Wed Oct 29 1997 Marc Ewing <marc@redhat.com>
- wmconfig

* Mon Jul 21 1997 Erik Troan <ewt@redhat.com>
- built against glibc
