Allow installing 32/64 bit version of fc-cache at the same time. (#1474257)

Add fc-cache script to invoke both version of fc-cache if available.
This commit is contained in:
Akira TAGOH 2017-07-24 18:18:44 +09:00
parent 94b0cacf6c
commit 61e3ec408b
2 changed files with 16 additions and 2 deletions

4
fc-cache Executable file
View File

@ -0,0 +1,4 @@
#! /bin/sh
[ -x /usr/bin/fc-cache-32 ] && /usr/bin/fc-cache-32 $@
[ -x /usr/bin/fc-cache-64 ] && /usr/bin/fc-cache-64 $@

View File

@ -12,6 +12,7 @@ License: MIT and Public Domain and UCD
Source: http://fontconfig.org/release/%{name}-%{version}.tar.bz2
URL: http://fontconfig.org
Source1: 25-no-bitmap-fedora.conf
Source2: fc-cache
# https://bugzilla.redhat.com/show_bug.cgi?id=140335
Patch0: %{name}-sleep-less.patch
@ -78,11 +79,16 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/
# move installed doc files back to build directory to package themm
# move installed doc files back to build directory to package them
# in the right place
mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* .
rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/
# rename fc-cache binary
mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa_bits}
install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache
%check
make check
@ -117,7 +123,7 @@ HOME=/root /usr/bin/fc-cache -s
%doc %{_fontconfig_confdir}/README
%license COPYING
%{_libdir}/libfontconfig.so.*
%{_bindir}/fc-cache
%{_bindir}/fc-cache*
%{_bindir}/fc-cat
%{_bindir}/fc-list
%{_bindir}/fc-match
@ -145,6 +151,10 @@ HOME=/root /usr/bin/fc-cache -s
%doc fontconfig-devel.txt fontconfig-devel
%changelog
* Mon Jul 24 2017 Akira TAGOH <tagoh@redhat.com> - 2.12.4-2
- Allow installing 32/64 bit version of fc-cache at the same time. (#1474257)
- Add fc-cache script to invoke both version of fc-cache if available.
* Wed Jul 5 2017 Akira TAGOH <tagoh@redhat.com> - 2.12.4-1
- New upstream release.