File hanterm-xf.spec of Package hanterm-xf

#
# spec file for package hanterm-xf
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           hanterm-xf
Version:        2.0.5_173
Release:        0
Summary:        Hangul Terminal for the X Window System
License:        MIT
Group:          System/X11/Terminals
URL:            http://kldp.net/project/showfiles.php?group_id=34
# 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
BuildRequires:  ncurses-devel
BuildRequires:  update-desktop-files
BuildRequires:  libXaw-devel
Requires:       xfntkr
Obsoletes:      htermxf
Provides:       htermxf
%if 0%{?suse_version} > 1130
BuildRequires:  utempter-devel
%else
BuildRequires:  utempter
%endif

%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
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure %{_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_build

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

%files
%doc README* INSTALL* docs/
%attr(555,root,root) %{_bindir}/hanterm
%{_mandir}/man1/*
%config(noreplace) %{_datadir}/hangul_keyboard
%{_datadir}/pixmaps/hanterm.png
%{_datadir}/applications/hanterm.desktop

%changelog
openSUSE Build Service is sponsored by