This commit is contained in:
parent
a6ee90f51c
commit
f2654d1bcc
@ -23,8 +23,6 @@ Summary: Commons for Font Packages
|
||||
License: BSD-3-Clause
|
||||
Group: System/Base
|
||||
Source0: rpm-macros.fonts-config
|
||||
Source1: reconfigure-fonts.sh
|
||||
Source2: reconfigure-fonts-cjk.sh
|
||||
Source100: COPYING
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
@ -48,14 +46,10 @@ cp %{SOURCE100} .
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
||||
cp -a %{SOURCE0} %{buildroot}%{_sysconfdir}/rpm/macros.fonts-config
|
||||
mkdir -p %{buildroot}%{_datadir}/%{name}-devel
|
||||
cp -a %{SOURCE1} %{SOURCE2} %{buildroot}%{_datadir}/%{name}-devel
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING
|
||||
%config %{_sysconfdir}/rpm/macros.fonts-config
|
||||
%dir %{_datadir}/%{name}-devel
|
||||
%{_datadir}/%{name}-devel/*.sh
|
||||
|
||||
%changelog
|
||||
|
@ -1,11 +0,0 @@
|
||||
adobecifontconfig=/usr/sbin/acroread-cidfont-config
|
||||
ghostscriptcjkconfig=/usr/sbin/ghostscript-cjk-config
|
||||
runflag=/var/run/fontpackages/reconfigure-fonts-cjk
|
||||
if [ -e $runflag ]; then
|
||||
if [ -x $adobecidfontconfig ]; then
|
||||
$adobecidfontconfig
|
||||
fi
|
||||
if [ -x $ghostscriptcjkconfig ]; then
|
||||
$ghostscriptcjkconfig
|
||||
fi
|
||||
fi
|
@ -1,8 +0,0 @@
|
||||
runflag=/var/run/fontpackages/reconfigure-fonts
|
||||
fontsconfig=/usr/sbin/fonts-config
|
||||
if [ -e $runflag ]; then
|
||||
if [ -x $fontsconfig ]; then
|
||||
$fontsconfig --quiet
|
||||
fi
|
||||
rm $runflag
|
||||
fi
|
@ -6,10 +6,8 @@
|
||||
%_fontsconfddir %{_fontsconfdir}/conf.d
|
||||
%_fontsconfavaildir %{_datadir}/%{name}/conf.avail
|
||||
# private
|
||||
%__fontsconfigrunflag /var/run/fontpackages/reconfigure-fonts
|
||||
%__run_fonts_config /usr/share/fontpackages-devel/reconfigure-fonts.sh
|
||||
%__run_cjk_init /usr/share/fontpackages-devel/reconfigure-fonts-cjk.sh
|
||||
%__fontsupdatescript /var/adm/update-scripts/%{name}-%{version}-%{release}-reconfigure-fonts
|
||||
%__fontsconfigrunflag /var/run/fontpackages/reconfigure-fonts
|
||||
%__fontsupdatescript /var/adm/update-scripts/%{name}-%{version}-%{release}-reconfigure-fonts
|
||||
|
||||
# macro: link_avail_to_system_fontsconf name
|
||||
# (takes exactly one argument, name of configuration file)
|
||||
@ -73,6 +71,29 @@
|
||||
Requires(pre): perl aaa_base \
|
||||
%nil
|
||||
|
||||
|
||||
# macro: reconfigure_fonts
|
||||
# font setup for suse
|
||||
%reconfigure_fonts \
|
||||
if test -x /usr/sbin/fonts-config ; then \
|
||||
LC_ALL=POSIX \
|
||||
/usr/sbin/fonts-config --verbose \
|
||||
fi \
|
||||
%nil
|
||||
|
||||
|
||||
# macro: reconfigure_fonts
|
||||
# cjk font setup for suse
|
||||
%reconfigure_fonts_cjk \
|
||||
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:
|
||||
@ -85,10 +106,23 @@ Requires(pre): perl aaa_base \
|
||||
touch %{__fontsconfigrunflag}-cjk \
|
||||
} \
|
||||
if [ -n "$ZYPP_IS_RUNNING" ]; then \
|
||||
cp %{__run_fonts_config} %{__fontsupdatescript} \
|
||||
echo 'if [ -e %{__fontsconfigrunflag} ]; then' > %{__fontsupdatescript} \
|
||||
echo ' if [ -x /usr/sbin/fonts-config ]; then' >> %{__fontsupdatescript} \
|
||||
echo ' /usr/sbin/fonts-config --quiet' >> %{__fontsupdatescript} \
|
||||
echo ' fi' >> %{__fontsupdatescript} \
|
||||
echo ' rm %{__fontsconfigrunflag}' >> %{__fontsupdatescript} \
|
||||
echo 'fi' >> %{__fontsupdatescript} \
|
||||
echo 'rm %{__fontsupdatescript}' >> %{__fontsupdatescript} \
|
||||
%{-c: \
|
||||
cp %{__run_cjk_init} %{__fontsupdatescript}-cjk \
|
||||
echo 'if [ -e %{__fontsconfigrunflag}-cjk ]; then' > %{__fontsupdatescript}-cjk \
|
||||
echo ' if [ -x $adobecidfontconfig ]; then' >> %{__fontsupdatescript}-cjk \
|
||||
echo ' /usr/sbin/acroread-cidfont-config' >> %{__fontsupdatescript}-cjk \
|
||||
echo ' fi' >> %{__fontsupdatescript}-cjk \
|
||||
echo ' if [ -x $ghostscriptcjkconfig ]; then' >> %{__fontsupdatescript}-cjk \
|
||||
echo ' /usr/sbin/ghostscript-cjk-config' >> %{__fontsupdatescript}-cjk \
|
||||
echo ' fi' >> %{__fontsupdatescript}-cjk \
|
||||
echo ' rm %{__fontsconfigrunflag}-cjk' >> %{__fontsupdatescript} \
|
||||
echo 'fi' >> %{__fontsupdatescript}-cjk \
|
||||
echo 'rm %{__fontsupdatescript}-cjk' >> %{__fontsupdatescript}-cjk \
|
||||
} \
|
||||
fi \
|
||||
@ -100,14 +134,11 @@ Requires(pre): perl aaa_base \
|
||||
# -c (the fonts are CJK fonts, also do setup which is only needed
|
||||
# for CJK)
|
||||
%reconfigure_fonts_postun(c) \
|
||||
mkdir -p `dirname %{__fontsconfigrunflag}` \
|
||||
touch %{__fontsconfigrunflag} \
|
||||
%{-c: \
|
||||
touch %{__fontsconfigrunflag}-cjk \
|
||||
} \
|
||||
if [ $1 -eq 0 ]; then \
|
||||
sh %{__run_fonts_config} \
|
||||
%{-c: sh %{__run_cjk_init}} \
|
||||
%reconfigure_fonts \
|
||||
%{-c: \
|
||||
%reconfigure_fonts_cjk \
|
||||
} \
|
||||
fi \
|
||||
%nil
|
||||
|
||||
@ -118,8 +149,14 @@ Requires(pre): perl aaa_base \
|
||||
# for CJK)
|
||||
%reconfigure_fonts_posttrans \
|
||||
if [ -z "$ZYPP_IS_RUNNING" ]; then \
|
||||
sh %{__run_fonts_config} \
|
||||
sh %{__run_cjk_init} \
|
||||
if [ -e %{__fontsconfigrunflag} ]; then \
|
||||
%reconfigure_fonts \
|
||||
rm %{__fontsconfigrunflag} \
|
||||
fi \
|
||||
if [ -e %{__fontsconfigrunflag}-cjk ]; then \
|
||||
%reconfigure_fonts_cjk \
|
||||
rm %{__fontsconfigrunflag}-cjk \
|
||||
fi \
|
||||
fi \
|
||||
%nil
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user