Only build emoji color font since Fedora 26

This commit is contained in:
Peng Wu 2018-06-19 16:37:54 +08:00
parent 58a1f9a482
commit 4cd757e036

View File

@ -3,10 +3,16 @@
%global fontname google-noto-emoji %global fontname google-noto-emoji
%if (0%{?fedora} > 25 || 0%{?rhel} > 7)
%global buildfont 1
%else
%global buildfont 0
%endif
Name: %{fontname}-fonts Name: %{fontname}-fonts
Version: 20180508 Version: 20180508
Release: 2%{?dist} Release: 3%{?dist}
Summary: Google “Noto Emoji” Black-and-White emoji font Summary: Google “Noto Emoji” Black-and-White emoji font
# In noto-emoji-fonts source # In noto-emoji-fonts source
@ -63,16 +69,23 @@ This package provides the Google “Noto Color Emoji” colored emoji font.
rm -rf third_party/pngquant rm -rf third_party/pngquant
%build %build
%if %buildfont
# Work around UTF-8 # Work around UTF-8
export LANG=C.UTF-8 export LANG=C.UTF-8
make %{?_smp_mflags} OPT_CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} OPT_CFLAGS="$RPM_OPT_FLAGS"
%endif
%install %install
install -m 0755 -d %{buildroot}%{_fontdir} install -m 0755 -d %{buildroot}%{_fontdir}
%if %buildfont
# Built by us from the supplied pngs: # Built by us from the supplied pngs:
install -m 0644 -p NotoColorEmoji.ttf %{buildroot}%{_fontdir} install -m 0644 -p NotoColorEmoji.ttf %{buildroot}%{_fontdir}
%else
# Pre-built, and included with the source:
install -m 0644 -p fonts/NotoColorEmoji.ttf %{buildroot}%{_fontdir}
%endif
# Pre-built, and included with the source: # Pre-built, and included with the source:
install -m 0644 -p fonts/NotoEmoji-Regular.ttf %{buildroot}%{_fontdir} install -m 0644 -p fonts/NotoEmoji-Regular.ttf %{buildroot}%{_fontdir}
@ -93,6 +106,9 @@ install -m 0644 -p %{SOURCE3} %{buildroot}%{_datadir}/appdata
%changelog %changelog
* Tue Jun 19 2018 Peng Wu <pwu@redhat.com> - 20180508-3
- Only build emoji color font since Fedora 26
* Wed May 23 2018 Peng Wu <pwu@redhat.com> - 20180508-2 * Wed May 23 2018 Peng Wu <pwu@redhat.com> - 20180508-2
- Use GraphicsMagick instead of ImageMagick - Use GraphicsMagick instead of ImageMagick