File hanterm-xf.spec of Package hanterm-xf

#
# spec file for package hanterm-xf (Version 2.0.5_173)
#
# Copyright (c) 2010 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:           hanterm-xf
BuildRequires:  ncurses-devel update-desktop-files xorg-x11-devel
%if 0%{?suse_version} > 1130
BuildRequires:  utempter-devel
%else
BuildRequires:  utempter
%endif
%define	appdefdir  /usr/share/X11
License:        MIT
Group:          System/X11/Terminals
Obsoletes:      htermxf
Provides:       htermxf
Requires:       xfntkr
AutoReqProv:    on
Summary:        Hangul Terminal for the X Window System
Url:            http://kldp.net/project/showfiles.php?group_id=34
Version:        2.0.5_173
Release:        397
# http://download.kldp.net/hanterm-xf/hanterm-xf-2.0.5-173.tar.gz
Source0:        http://download.kldp.net/hanterm-xf/hanterm-xf-2.0.5-173.tar.bz2
Source5:        hanterm.desktop.kde3x
Source7:        hanterm-32x32.png
Patch1:         hanterm-xf-64bit.patch
Patch2:         hanterm-xf-powerpc.patch
Patch3:         hanterm-xf-utempter.patch
Patch4:         hanterm-can-2003-0078.patch
Patch5:         hanterm-xf-nonvoid.patch
Patch6:         sentinel.patch
Patch7:         hanterm-xf-includes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Hanterm is a replacement for XTerm that supports Hangul input and
output; it is a modified version of the XTerm program from the X Window
System. Hanterm uses its own native input system and does not require
an X Window System input method server. For Hanterm to work properly, a
Hangul-encoded font must be available.

%prep
%setup -q -n hanterm-xf-2.0.5-173
%patch1 -p 1 -b .64bit
%patch2 -p 1 -b .powerpc
%patch3 -p 1 -b .utempter
%patch4 -p 1 -b .can-2003-0078
%patch5 -p 0 -b .nonvoid
%patch6 -p 1
%patch7 -p1

%build
# update config.{guess,sub}
%{?suse_update_config}
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" 
./configure --prefix=%{_prefix} \
            --bindir=%{_bindir} \
            --mandir=%{_mandir} \
	    --libdir=%{_libdir} \
	    --datadir=%{_datadir} \
            %{_target_cpu}-suse-linux-gnu \
	    --with-utempter \
	    --enable-256-color \
	    --enable-dec-locator \
	    --enable-hp-fkeys \
	    --enable-sco-fkeys \
	    --enable-boxchar \
	    --enable-ansi-color \
	    --enable-wide-chars \
	    --disable-imake
#	    --enable-luit \ # doesn't seem to work currently
make

%install
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -c -m 555 hanterm $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m444 hanterm.man $RPM_BUILD_ROOT%{_mandir}/man1/hanterm.1
mkdir -p $RPM_BUILD_ROOT%{appdefdir}/{ko,ko_KR.UTF-8,}/app-defaults
install -m644 Hanterm.ad \
	$RPM_BUILD_ROOT%{appdefdir}/ko/app-defaults/Hanterm
install -m644 Hanterm-col.ad \
	$RPM_BUILD_ROOT%{appdefdir}/ko/app-defaults/Hanterm-color
# may be shared with Ami!:
mkdir -p $RPM_BUILD_ROOT%{_datadir}/hangul_keyboard
install -m444 keyboard/*.kbd $RPM_BUILD_ROOT%{_datadir}/hangul_keyboard
install -m444 keyboard/*.map $RPM_BUILD_ROOT%{_datadir}/hangul_keyboard
# Icons and desktop stuff:
mkdir -p %{buildroot}/usr/share/pixmaps/
install -c -m 644 $RPM_SOURCE_DIR/hanterm-32x32.png \
	%{buildroot}/usr/share/pixmaps/hanterm.png
mkdir -p %{buildroot}/usr/share/applications/
install -c -m 644 $RPM_SOURCE_DIR/hanterm.desktop.kde3x \
	%{buildroot}/usr/share/applications/hanterm.desktop
%suse_update_desktop_file hanterm TerminalEmulator

%clean
rm -rf $RPM_BUILD_ROOT;

%files
%defattr(-,root,root)
%doc README* INSTALL* docs/
%attr(555,root,root) %{_bindir}/hanterm
%{_mandir}/man1/*
%dir %{appdefdir}/ko/
%dir %{appdefdir}/ko/app-defaults/
%{appdefdir}/*/app-defaults/*
%config(noreplace) %{_datadir}/hangul_keyboard
/usr/share/pixmaps/hanterm.png
/usr/share/applications/hanterm.desktop

%changelog
openSUSE Build Service is sponsored by