Clean up the spec file

This commit is contained in:
Peng Wu 2020-09-02 15:50:39 +08:00
parent 350f594609
commit 1c211d8ece

View File

@ -3,7 +3,7 @@
Name: ibus-hangul
Version: 1.5.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: The Hangul engine for IBus input platform
License: GPLv2+
URL: https://github.com/libhangul/ibus-hangul
@ -36,13 +36,14 @@ libhangul.
%setup -q
%patch1 -p1 -b .setup-abspath
# autopoint -f
# AUTOPOINT='intltoolize --automake --copy' autoreconf -fi
%build
./autogen.sh
%configure --disable-static --with-python=python3 %{?_with_hotkeys}
# make -C po update-gmo
%configure \
--disable-static \
--with-python=python3 \
%{?_with_hotkeys} \
%{nil}
make %{?_smp_mflags}
%install
@ -50,42 +51,6 @@ make DESTDIR=${RPM_BUILD_ROOT} install INSTALL="install -p"
%py_byte_compile %{python3} $RPM_BUILD_ROOT%{_datadir}/ibus-hangul/setup
# Register as an AppStream component to be visible in the software center
#
# NOTE: It would be *awesome* if this file was maintained by the upstream
# project, translated and installed into the right place during `make install`.
#
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
#
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
cat > $RPM_BUILD_ROOT%{_datadir}/appdata/hangul.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<component type="inputmethod">
<id>hangul.xml</id>
<metadata_license>CC0-1.0</metadata_license>
<name>Hangul</name>
<summary>Korean input method</summary>
<description>
<p>
The Hangul input method is designed for entering Korean text.
</p>
<p>
Input methods are typing systems allowing users to input complex languages.
They are necessary because these contain too many characters to simply be laid
out on a traditional keyboard.
</p>
</description>
<url type="homepage">http://code.google.com/p/ibus/</url>
<compulsory_for_desktop>GNOME</compulsory_for_desktop>
<project_group>GNOME</project_group>
<developer_name>The GNOME Project</developer_name>
<url type="bugtracker">https://code.google.com/p/ibus/issues/list</url>
<url type="donation">http://www.gnome.org/friends/</url>
<url type="help">https://code.google.com/p/ibus/wiki/FAQ</url>
<update_contact><!-- upstream-contact_at_email.com --></update_contact>
</component>
EOF
rm -f ${RPM_BUILD_ROOT}%{_bindir}/ibus-setup-hangul
sed -i 's!^Exec=ibus-setup-hangul!Exec=%{_libexecdir}/ibus-setup-hangul!' ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-hangul.desktop
@ -105,7 +70,6 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-hangu
%doc AUTHORS COPYING README
%{_libexecdir}/ibus-engine-hangul
%{_libexecdir}/ibus-setup-hangul
%{_datadir}/appdata/*.appdata.xml
%{_datadir}/metainfo/*.metainfo.xml
%{_datadir}/glib-2.0/schemas/*.gschema.xml
%{_datadir}/ibus-hangul
@ -114,6 +78,9 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-hangu
%{_datadir}/icons/hicolor/*/apps/*
%changelog
* Wed Sep 2 2020 Peng Wu <pwu@redhat.com> - 1.5.4-2
- Clean up the spec file
* Mon Aug 24 2020 Peng Wu <pwu@redhat.com> - 1.5.4-1
- Update to 1.5.4