File fcitx-hangul.spec of Package fcitx-hangul

# spec file for package fcitx-hangul
# Copyright (c) 2017 SUSE LINUX 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

Name:           fcitx-hangul
Version:        0.3.1
Release:        0
Summary:        Hangul Module for Fcitx IM Framework
License:        GPL-2.0
Group:          System/I18n/Korean
BuildRequires:  cmake
BuildRequires:  fcitx-devel >= 4.2.2
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  intltool
BuildRequires:  libhangul-devel >= 0.1.0
BuildRequires:  pkg-config
BuildRequires:  xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       locale(fcitx:ko)

Fcitx-hangul is a Korean Wrapper for Fcitx IM Framework.
It's generally an IBus hangul implementation on Fcitx.

%setup -q

mkdir -p build
pushd build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR=%{_libdir} ..
make %{?_smp_mflags}

pushd build
make DESTDIR=%{buildroot} install

strip %{buildroot}%{_libdir}/fcitx/%{name}.so

# Fix incorrect-fsf-address
sed -i "s/59\ Temple\ Place,\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307\ \ USA/51\ Franklin\ Street,\ Fifth\ Floor,\ Boston,\ MA\ \ 02110-1301\ \ USA/" COPYING

%find_lang %{name}
%if 0%{?suse_version}
%fdupes %{buildroot}
fdupes -q -n -r %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang