Summary: A Kanji (Japanese character set) terminal emulator for X.
Name: kterm
Version: 6.2.0
Release: 36
# Original source is gziped
Source: ftp://ftp.sunet.se/pub/X11/R6contrib/applications/kterm-6.2.0.tar.bz2
Source1: kterm-app-defaults-jp
Source2: kterm-gnome.desktop
Patch0: kterm-6.2.0-kbd.patch.bz2
Patch1: kterm-6.2.0-glibc.patch.bz2
Patch2: kterm-6.2.0-utmp98.patch.bz2
Patch3: kterm-debian.patch.bz2
Patch4: kterm-%{version}.envvars.patch.bz2
Patch5: kterm-6.2.0-xmodifiers.patch
Patch6: kterm-6.2.0-ia64.patch
License: distributable
Group: User Interface/X
Buildroot: /var/tmp/kterm-root
Requires: /usr/sbin/utempter
BuildPrereq: ncurses-devel

%description
The kterm package provides a terminal emulator for the Kanji Japanese
character set.

%prep
%setup
%patch0 -p1 -b .kbd
%patch1 -p1 -b .glibc
%patch2 -p1 -b .utempter
%patch3 -p1 -b .debian
%patch4 -p1 -b .envvars
# this patch is very very ad hoc.
# when XMODIFIERS is inappropriate value like @im=none for XIM,
# if a problem kterm crashes will be fixed, this patch doesn't apply.
%patch5 -p1 -b .xmodifiers
# ia64 fix
%patch6 -p1 -b .ia64

%build
xmkmf
make

%install
rm -rf $RPM_BUILD_ROOT
make install install.man DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/X11R6/lib/X11/ja/app-defaults/
sed "s|^\*translations|*VT100*translations|g" \
 $RPM_BUILD_ROOT/usr/X11R6/lib/X11/app-defaults/KTerm > KTerm.new
mv -f KTerm.new $RPM_BUILD_ROOT/usr/X11R6/lib/X11/app-defaults/KTerm
install -m644 %{SOURCE1} \
        $RPM_BUILD_ROOT/usr/X11R6/lib/X11/ja/app-defaults/KTerm

mkdir -p $RPM_BUILD_ROOT/usr/share/applications/
%{__install} -m 644 %{SOURCE2} $RPM_BUILD_ROOT/usr/share/applications/kterm.desktop

chmod 755 $RPM_BUILD_ROOT/usr/X11R6/bin/kterm

%files
%defattr(-,root,root)
/usr/X11R6/bin/kterm
/usr/X11R6/lib/X11/app-defaults/KTerm
/usr/X11R6/lib/X11/ja/app-defaults/KTerm
/usr/X11R6/man/man1/kterm.*
%config(missingok) /usr/share/applications/kterm.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%changelog
* Thu Feb  6 2003 Yukihiro Nakai <ynakai@redhat.com> 6.2.0-36
- desktop category is X-Red-Hat-Extra (#83602)

* Tue Feb  4 2003 Yukihiro Nakai <ynakai@redhat.com> 6.2.0-35
- Update .desktop file

* Fri Jan 31 2003 Yukihiro Nakai <ynakai@redhat.com>
- Add ia64 fix(#83179)

* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt

* Mon Dec 23 2002 Tim Powers <timp@redhat.com> 6.2.0-31
- bump and rebuild

* Wed Nov 20 2002 Tim Powers <timp@redhat.com>
- rebuild on all arches

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu Apr 18 2002 Akira TAGOH  <tagoh@redhat.com> 6.2.0-28
- kterm-6.2.0-xmodifiers.patch: applied to fix MUST-FIX Bug#62304.
  note that this patch is for avoiding this problem.

* Thu Jan 17 2002 Yukihiro Nakai <ynakai@redhat.com>
- Add large font

* Wed Jan 16 2002 Yukihiro Nakai <ynakai@redhat.com>
- Add kanjiFont resource

* Mon Jan 14 2002 Yukihiro Nakai <ynakai@redhat.com>
- Translate resource file for Japanized menu

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Dec 10 2001 Yukihiro Nakai <ynakai@redhat.com>
- Add gnome desktop file

* Tue Aug  7 2001 Yukihiro Nakai <ynakai@redhat.com>
- Add ncurses-devel to BuildPrereq (#49884)

* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
- Bump release + rebuild.

* Tue Feb 14 2001 Yukihiro Nakai <ynakai@redhat.com>
- Apply debian patch

* Thu Feb  8 2001 Yukihiro Nakai <ynakai@redhat.com>
- bunzip2 Source1

* Tue Feb  6 2001 Bill Nottingham <notting@redhat.com>
- fix conversions in English app-defaults file (#12118)

* Sun Jan 28 2001 Yukihiro Nakai <ynakai@redhat.com>
- bzip2

* Mon Dec 18 2000 Yukihiro Nakai <ynakai@redhat.com>
- Rebuild for 7.1 tree

* Wed Oct 18 2000 Mitsuo Hamada <mhamada@redhat.com>
- uncomment USE_SYSV_ENVVARS

* Sat Sep 02 2000 Yukihiro Nakai <ynakai@redhat.com>
- Rebuild on 7.0J
- Fix about translation setting.
- Fix about allow events.
- Add Japanese translation in .desktop

* Sat Jun 17 2000 Matt Wilson <msw@redhat.com>
- added defattr

* Sat Jun 10 2000 Bill Nottingham <notting@redhat.com>
- rebuild in new build env.
- add a couple of fixes from debian

* Thu May 11 2000 Bill Nottingham <notting@redhat.com>
- rebuild against current ncurses

* Mon Feb 07 2000 Preston Brown <pbrown@redhat.com>
- wmconfig -> desktop

* Thu Feb  3 2000 Bill Nottingham <notting@redhat.com>
- handle compressed man pages

* Fri Mar 26 1999 Erik Troan <ewt@redhat.com>
- added unix98 pty support

* Wed Mar 24 1999 Erik Troan <ewt@redhat.com>
- added utemper support
- turn off setuid bit

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

* Thu Jan  7 1999 Bill Nottingham <notting@redhat.com>
- built for glibc2.1
- this package doesn't change much, does it?

* Fri May 01 1998 Prospector System <bugs@redhat.com>

- translations modified for de, fr, tr

* Thu Apr 30 1998 Cristian Gafton <gafton@redhat.com>
- fixed build problems for manhattan

* Tue Oct 21 1997 Otto Hammersmith <otto@redhat.com>
- updated source
- added wmconfig entries
- fixed source url

* Tue Oct 07 1997 Erik Troan <ewt@redhat.com>
- needed patch for glibc on the alpha as TIOCSLTC is defined for OSF
  compatibility

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