Switch to use py_byte_compile rpm macro

This commit is contained in:
Peng Wu 2020-07-13 17:22:10 +08:00
parent d528af181c
commit de86aec281

View File

@ -1,14 +1,10 @@
# This package depends on automagic byte compilation
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
%global _python_bytecompile_extra 1
%global snapshot 0
Name: ibus-libpinyin
Version: 1.11.92
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Intelligent Pinyin engine based on libpinyin for IBus
License: GPLv2+
License: GPLv3+
URL: https://github.com/libpinyin/ibus-libpinyin
Source0: http://downloads.sourceforge.net/libpinyin/ibus-libpinyin/%{name}-%{version}.tar.gz
%if %snapshot
@ -60,6 +56,8 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-libbopo
%install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
%py_byte_compile %{python3} $RPM_BUILD_ROOT/%{datadir}/ibus-libpinyin/setup
%find_lang %{name}
%post
@ -89,6 +87,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
%{_datadir}/ibus/component/*
%changelog
* Mon Jul 13 2020 Peng Wu <pwu@redhat.com> - 1.11.92-2
- Switch to use py_byte_compile rpm macro
* Thu Mar 19 2020 Peng Wu <pwu@redhat.com> - 1.11.92-1
- Update to 1.11.92
- fixes desktop files