Petr Gajdos
9b3d6e78ac
/etc/fonts/conf.avail to /usr/share/%{name}/conf.avail as fontconfig 2.10 ship its avail conf in /usr/share/fontconfig/conf.avail - added %link_avail_to_system_fontsconf, which creates symlink pointing from /etc/fonts/conf.d to ../../../usr/share/%{name}/conf.avail OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/fontpackages?expand=0&rev=11
95 lines
2.9 KiB
Plaintext
95 lines
2.9 KiB
Plaintext
# directories
|
|
%_fontsdir %{_usr}/share/fonts
|
|
%_ttfontsdir %{_fontsdir}/truetype
|
|
%_miscfontsdir %{_fontsdir}/misc
|
|
%_fontsconfdir %{_sysconfdir}/fonts
|
|
%_fontsconfddir %{_fontsconfdir}/conf.d
|
|
%_fontsconfavaildir %{_datadir}/%{name}/conf.avail
|
|
|
|
# macro: link_avail_to_system_fontsconf name
|
|
# (takes exactly one argument, name of configuration file)
|
|
# creates symlink pointing from /etc/fonts/conf.d/name to
|
|
# ../../../usr/share/%{name}/conf.avail/name
|
|
%link_avail_to_system_fontsconf() \
|
|
if test "x%1" == "x%%1"; then \
|
|
echo "Missing argument in call to %%link_avail_to_system_fontsconf: name of configuration file." \
|
|
false \
|
|
fi \
|
|
echo "Linking available configuration in %{_fontsconfavaildir}/%1 to %{_fontsconfddir}/%1" \
|
|
mkdir -p "%{buildroot}%{_fontsconfddir}" \
|
|
ln -s "../../..%{_fontsconfavaildir}/%1" "%{buildroot}%{_fontsconfddir}" \
|
|
%nil
|
|
|
|
# macro: reconfigure_fonts_prereq
|
|
# adds requires for fonts-config
|
|
%reconfigure_fonts_prereq \
|
|
Requires(pre): perl aaa_base \
|
|
%nil
|
|
|
|
# macro: reconfigure_fonts
|
|
# font setup for suse
|
|
# options:
|
|
# -c (the fonts are CJK fonts, also do setup which is only needed
|
|
# for CJK)
|
|
%reconfigure_fonts(c) \
|
|
if test -x /usr/sbin/fonts-config ; then \
|
|
LC_ALL=POSIX \
|
|
/usr/sbin/fonts-config --verbose \
|
|
fi \
|
|
%{-c: \
|
|
if test -x /usr/sbin/acroread-cidfont-config ; then \
|
|
/usr/sbin/acroread-cidfont-config \
|
|
fi \
|
|
if test -x /usr/sbin/ghostscript-cjk-config ; then \
|
|
/usr/sbin/ghostscript-cjk-config \
|
|
fi} \
|
|
%nil
|
|
|
|
# macro: reconfigure_fonts_post
|
|
# now alias to reconfigure_fonts, this can change in the future
|
|
# options:
|
|
# -c (the fonts are CJK fonts, also do setup which is only needed
|
|
# for CJK)
|
|
%reconfigure_fonts_post(c) \
|
|
if [ $1 -ne 2 ]; then \
|
|
%reconfigure_fonts c \
|
|
fi \
|
|
%nil
|
|
|
|
# macro: reconfigure_fonts_postun
|
|
# now alias to reconfigure_fonts, this can change in the future
|
|
# options:
|
|
# -c (the fonts are CJK fonts, also do setup which is only needed
|
|
# for CJK)
|
|
%reconfigure_fonts_postun(c) \
|
|
%reconfigure_fonts c \
|
|
%nil
|
|
|
|
# macro: reconfigure_fonts_post
|
|
# do nothing for now, this can change in the future
|
|
# options:
|
|
# -c (the fonts are CJK fonts, also do setup which is only needed
|
|
# for CJK)
|
|
%reconfigure_fonts_posttrans(c) \
|
|
%nil
|
|
|
|
# macro: reconfigure_fonts_scriptles
|
|
# groups %post, %postun and %posttrans of font packages
|
|
# options:
|
|
# -c (the fonts are CJK fonts, also do setup which is only needed
|
|
# for CJK)
|
|
# -n <name> (name of subpackage; when ommited, also no -n parameter
|
|
# is passed to %post, %postun and %posttrans)
|
|
%reconfigure_fonts_scriptlets(c,n:) \
|
|
%post %{-n:-n %{-n*}} \
|
|
%reconfigure_fonts_post c \
|
|
\
|
|
%postun %{-n:-n %{-n*}} \
|
|
%reconfigure_fonts_postun c \
|
|
\
|
|
%posttrans %{-n:-n %{-n*}} \
|
|
%reconfigure_fonts_posttrans c \
|
|
\
|
|
%nil
|
|
|