File kterm.spec of Package kterm
#
# spec file for package kterm (Version 6.2.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: kterm
BuildRequires: ncurses-devel
%if %suse_version > 910
BuildRequires: utempter xorg-x11 xorg-x11-devel
%else
BuildRequires: XFree86 XFree86-devel utempter
%endif
%if "%(xft-config --prefix)" == "/usr"
%define appdefdir /usr/share/X11
%define mymandir /usr/share/man
%define mybindir /usr/bin
%else
%define appdefdir /usr/X11R6/lib/X11
%define mymandir /usr/X11R6/man
%define mybindir /usr/X11R6/bin
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Version: 6.2.0
Release: 1017
License: BSD 3-Clause; X11/MIT
Group: System/X11/Terminals
PreReq: /bin/ln
AutoReqProv: on
Summary: Kanji Terminal
Summary(ja): 多国語用 X 端末エミュレータ
# original source is tar.gz
Source: ftp://ftp.kddlabs.co.jp//X11/contrib/applications/kterm-6.2.0.tar.bz2
Source1: kterm.termcap
Source2: kterm.terminfo
Source3: KTerm-ja.ad
Patch: kterm-6.2.0-16colors.diff
Patch1: kterm-6.2.0-secure.diff
Patch2: kterm-6.2.0-glibc.pje.patch
Patch3: kterm-6.2.0-glibc2.1.suse.diff
Patch4: kterm-6.2.0-powerpc.diff
Patch5: kterm-6.2.0-glibc2.2-setlocale.patch
# better don't apply this patch, it makes matters worse:
Patch6: kterm-6.2.0-autolinefeed.patch
Patch7: KTerm.ad.patch
Patch8: kterm-6.2.0-utempter.patch
# see http://phe.phyas.aichi-edu.ac.jp/~cyamauch/pl2.html
# http://phe.phyas.aichi-edu.ac.jp/~cyamauch/pl2_kterm_srb.html
Patch9: http://phe.phyas.aichi-edu.ac.jp/~cyamauch/arch/kterm-6.2.0-rightbar.patch
Patch10: kterm.h.patch
Patch11: kterm-6.2.0-nonvoid.patch
Patch12: kterm-6.2.0-gcc4.patch
Patch13: null-pointer.patch
%description
Kterm is a multilingual terminal emulator based on xterm. The major
ways kterm differs from xterm are that it can handle multilingual text
encoded in ISO2022, can display colored text, and has the status line
function. To input multilingual text, both the X Input Method (XIM)
protocol and kinput2 protocol can be used.
Authors:
--------
Hiroto Kagotani <kagotani@in.it.okayama-u.ac.jp>
%description -l ja
%prep
%setup -q
cp -pf %{SOURCE1} ./
cp -pf %{SOURCE2} ./
cp -pf %{SOURCE3} ./
%patch -p1
%patch1 -p1
%patch2
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch7 -p1
%patch8 -p1 -b .utempter
%patch9 -p1 -b .rightbar
#%patch10 -p1 -b .kterm.h
%patch11 -p1
%patch12
%patch13 -p1
%build
xmkmf -a
make CCOPTIONS="$RPM_OPT_FLAGS"
%install
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
make install DESTDIR=$RPM_BUILD_ROOT
make install.man MANSUFFIX=1 LIBMANSUFFIX=3 DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{appdefdir}/{ja,ja_JP.SJIS}/app-defaults/
install -m444 KTerm-ja.ad $RPM_BUILD_ROOT%{appdefdir}/ja/app-defaults/KTerm
iconv -f EUC-JP -t SJIS KTerm-ja.ad > KTerm-ja.ad.SJIS
LC_ALL=C perl -pi -e 's/^(\*VT100\*kanjiMode:\s+)euc/\1sjis/' KTerm-ja.ad.SJIS
install -m444 KTerm-ja.ad.SJIS $RPM_BUILD_ROOT%{appdefdir}/ja_JP.SJIS/app-defaults/KTerm
install -d -m755 $RPM_BUILD_ROOT%{mymandir}/ja/man1
iconv -f iso-2022-jp -t euc-jp kterm.jman > kterm.1
install -m444 kterm.1 $RPM_BUILD_ROOT%{mymandir}/ja/man1/kterm.1
%post
#
# Workaround to make kterm find it's app-defaults even if
# LANG="japanese" or LANG="japanese.euc" is used. Setting the LANG
# variable to such a value fails to load the app-defaults because X11
# searches for a directory /usr/X11R6/lib/X11/japanese/app-defaults,
# which doesn't exist.
#
# See "man XtResolvePathname"
#
# In the long term, this should probably be solved somehow in X11
#
# As a temporary workaround I just create symbolic links here, if
# such directories don't exist:
#
if [ ! -e %{appdefdir}/japanese ] ; then
ln -s %{appdefdir}/ja %{appdefdir}/japanese
fi
if [ ! -e %{appdefdir}/japanese.euc ] ; then
ln -s %{appdefdir}/ja %{appdefdir}/japanese.euc
fi
if [ ! -e %{appdefdir}/japanese.sjis ] ; then
ln -s %{appdefdir}/ja_JP.SJIS %{appdefdir}/japanese.sjis
fi
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
%files
%defattr(-,root,root)
%doc README.kt DEMO.kt.uu DEMO.xbm kterm.termcap kterm.terminfo
%attr(755,root,root) %{mybindir}/kterm
%{appdefdir}/app-defaults/KTerm
%{mymandir}/man1/kterm.1*
%dir %{appdefdir}/ja/
%dir %{appdefdir}/ja/app-defaults/
%{appdefdir}/ja/app-defaults/KTerm
%dir %{appdefdir}/ja_JP.SJIS/
%dir %{appdefdir}/ja_JP.SJIS/app-defaults/
%{appdefdir}/ja_JP.SJIS/app-defaults/KTerm
%dir %{mymandir}/ja/
%dir %{mymandir}/ja/man1/
%{mymandir}/ja/man1/kterm.1*
%changelog
* Thu Mar 29 2007 rguenther@suse.de
- add ncurses-devel to BuildRequires
* Fri Aug 04 2006 mfabian@suse.de
- adapt for Xorg X11R7 (paths changed).
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jun 15 2005 meissner@suse.de
- use RPM_OPT_FLAGS.
* Tue Apr 19 2005 mfabian@suse.de
- Fix more build issues (return values in non-void functions
(GCC 4 seems to become ever more picky here) and NULL pointer
in vararg list).
* Sun Apr 03 2005 aj@suse.de
- Fix GCC 4 build issue.
* Wed Jun 16 2004 ro@suse.de
- added return values to non-void functions
* Wed Nov 05 2003 ro@suse.de
- adapt permissions
- don't build as root
* Sat Aug 23 2003 mfabian@suse.de
- add patch to make it possible to have the scrollbar on the right.
(thanks to Chisato Yamauchi <cyamauch@hst.phyas.aichi-edu.ac.jp>)
- make the scrollbar at the right the default.
* Fri Jun 13 2003 mfabian@suse.de
- fix "directory is not owned by any package".
* Tue Jan 21 2003 mfabian@suse.de
- add /usr/X11R6/lib/X11/ja_JP.SJIS/app-defaults/KTerm to make
LC_ALL=ja_JP.SJIS kterm work out of the box.
* Thu Aug 01 2002 mfabian@suse.de
- add /bin/ln to Prereq:
* Tue Apr 16 2002 mfabian@suse.de
- fix kterm.termcap and kterm.terminfo (thanks to <mls@suse.de>)
(This is documentation only, the real terminfo information
is in the terminfo package.
* Thu Jan 31 2002 okir@suse.de
- Added utempter support; removed s bit.
My god, I forgot how messy code could be :(
* Mon Aug 20 2001 mfabian@suse.de
- improve font specifications in Japanese app-defaults to
allow jisx0212 fonts.
- cleanup spec file.
* Mon May 07 2001 mfabian@suse.de
- bzip2 source
* Sat Jan 06 2001 mfabian@suse.de
- make autolinefeed default to "off" again. It *does* have
disadvantages to turn it on: When turned on, one will get 2
prompts after typing return only once. Especially bad when
trying to log in:
login: mfabian
password:
and the password line is skipped, depriving one of the chance
to enter a password. Must find a different solution for the
soft-hyphen problem, switching autolinefeed on is really bad.
* Tue Dec 12 2000 mfabian@suse.de
- make autolinefeed default to "on".
This helps for viewing man-pages formatted with
"nroff -mandoc -Tlatin1". With the option "-Tlatin1", nroff
uses soft-hyphens to hyphenate words. When autolinefeed
is off, kterm displays a soft-hyphen (0xad) followed by
a linefeed (0x0a) as a linefeed only, i.e. very ugly
stairs are visible. When autolinefeed is on, a soft-hyphen
followed by a linefeed is displayed as linefeed and carriage
return. This looks much better. The soft-hyphen is still
invisible, but at least the formatting is OK.
I found no disadvantages of autolinefeed on, therefore
I make it the default.
- remove nkf from #neededforbuild and "BuildPreqeq:"
* Mon Dec 11 2000 mfabian@suse.de
- removed old patch ad.suse.diff
* Fri Dec 08 2000 mfabian@suse.de
- use iconv instead of nkf to convert manpage
* Fri Dec 08 2000 mfabian@suse.de
- workaround in %%post to make kterm find it's app-defaults
even if LANG=japanese or LANG=japanese.euc
* Tue Nov 14 2000 mfabian@suse.de
- repaired setlocale call for Glibc 2.2
- improved app-defaults.
* Thu Aug 31 2000 mfabian@suse.de
- Fix to make it work on PowerPC
* Fri Aug 11 2000 mfabian@suse.de
- moved Japanese manpage and app-defaults to "ja" subdirectory
* Fri Jun 02 2000 wede@suse.de
- initial package