X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=packaging%2Ffontconfig.spec;h=1511de7b8704d0bc3175a4438ae8ffd446372c88;hb=eba79794acd2d2ce09d63f18195638210f58f799;hp=46281af5411d8adab020991f440aeb446d866465;hpb=2e370bf22bab2691f4cfecfae8e22b58b36f10d9;p=platform%2Fupstream%2Ffontconfig.git diff --git a/packaging/fontconfig.spec b/packaging/fontconfig.spec index 46281af..1511de7 100644 --- a/packaging/fontconfig.spec +++ b/packaging/fontconfig.spec @@ -2,24 +2,28 @@ Name: fontconfig Summary: Font configuration and customization library -Version: 2.11.93 +Version: 2.12.1 Release: 1 Group: Graphics & UI Framework/Fonts License: MIT URL: http://fontconfig.org Source0: http://fontconfig.org/release/fontconfig-%{version}.tar.gz -Source1001: packaging/fontconfig.manifest +Source100: fontconfig.conf +Source1001: fontconfig.manifest BuildRequires: pkgconfig(freetype2) >= %{freetype_version} BuildRequires: gawk BuildRequires: expat-devel BuildRequires: perl BuildRequires: gperf BuildRequires: python +BuildRequires: systemd-devel BuildRequires: pkgconfig(libtzplatform-config) Requires(pre): %{TZ_SYS_BIN}/fc-cache, %{TZ_SYS_BIN}/mkdir %{TZ_SYS_BIN}/rm, %{TZ_SYS_BIN}/grep, %{TZ_SYS_BIN}/chsmack Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig +%define upgrade_script_path /usr/share/upgrade/scripts + %description Fontconfig is designed to locate fonts within the system and select them according to requirements specified by @@ -53,7 +57,7 @@ export HASDOCBOOK=no --with-expat-include=%{_includedir} \ --with-expat-lib=%{_libdir} \ --with-freetype-config=%{TZ_SYS_BIN}/freetype-config \ - --with-add-fonts=%{TZ_SYS_RO_SHARE}/fonts,%{TZ_SYS_RO_SHARE}/app_fonts,%{TZ_SYS_RO_SHARE}/fallback_fonts \ + --with-add-fonts=%{TZ_SYS_RO_SHARE}/fonts,%{TZ_SYS_RO_SHARE}/app_fonts,%{TZ_SYS_RO_SHARE}/fallback_fonts,%{TZ_SYS_SHARE}/fonts \ --with-cache-dir=%{TZ_SYS_VAR}/cache/fontconfig \ --with-baseconfigdir=%{TZ_SYS_RO_ETC}/fonts \ --with-configdir=%{TZ_SYS_RO_ETC}/fonts/conf.d \ @@ -66,9 +70,14 @@ make %{?jobs:-j%jobs} #make check %install rm -rf %{buildroot} +mkdir -p %{buildroot}%{upgrade_script_path} +cp -f scripts/fontconfig_upgrade.sh %{buildroot}%{upgrade_script_path} %make_install +mkdir -p %{buildroot}%{_tmpfilesdir} +install -m 0644 %SOURCE100 %{buildroot}%{_tmpfilesdir}/fontconfig.conf + # All font packages depend on this package, so we create # and own /usr/share/fonts mydir=$RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts @@ -85,25 +94,22 @@ cat COPYING > %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name} umask 0022 -mkdir -p %{TZ_SYS_VAR}/cache/fontconfig -# Remove stale caches -rm -f %{TZ_SYS_VAR}/cache/fontconfig/* -mkdir -p %{TZ_SYS_VAR}/cache/fontconfig mkdir -p %{TZ_SYS_RO_SHARE}/fonts mkdir -p %{TZ_SYS_RO_SHARE}/fallback_fonts mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts -chsmack -t %{TZ_SYS_VAR}/cache/fontconfig -chsmack -a System::Shared %{TZ_SYS_VAR}/cache/fontconfig -rm -rf %{TZ_USER_CACHE}/fontconfig -mkdir -p %{TZ_USER_CACHE}/fontconfig -chmod 755 %{TZ_USER_CACHE} -chown app:app %{TZ_USER_CACHE} -chsmack -t %{TZ_USER_CACHE} -chsmack -a System::Shared %{TZ_USER_CACHE} -chmod 755 %{TZ_USER_CACHE}/fontconfig -chown app:app %{TZ_USER_CACHE}/fontconfig -chsmack -t %{TZ_USER_CACHE}/fontconfig -chsmack -a System::Shared %{TZ_USER_CACHE}/fontconfig + +# Skip making fontconfig cache folder for users. (/opt/home/app/.cache) +# The path will be changed according to a name of user. +#rm -rf %{TZ_USER_CACHE}/fontconfig +#mkdir -p %{TZ_USER_CACHE}/fontconfig +#chmod 755 %{TZ_USER_CACHE} +#chown app:app %{TZ_USER_CACHE} +#chsmack -t %{TZ_USER_CACHE} +#chsmack -a System::Shared %{TZ_USER_CACHE} +#chmod 755 %{TZ_USER_CACHE}/fontconfig +#chown app:app %{TZ_USER_CACHE}/fontconfig +#chsmack -t %{TZ_USER_CACHE}/fontconfig +#chsmack -a System::Shared %{TZ_USER_CACHE}/fontconfig # remove 49-sansserif.conf to fix bmc #9024 #rm -rf /usr/%{_sysconfdir}/fonts/conf.d/49-sansserif.conf @@ -114,6 +120,9 @@ chsmack -a System::Shared %{TZ_USER_CACHE}/fontconfig # The HOME setting is to avoid problems if HOME hasn't been reset if [ -x %{TZ_SYS_BIN}/fc-cache ] && %{TZ_SYS_BIN}/fc-cache --version 2>&1 | grep -q %{version} ; then fc-cache -rf --system-only +chsmack -t %{TZ_SYS_VAR}/cache/fontconfig +chsmack -a User::App::Shared %{TZ_SYS_VAR}/cache/fontconfig +chsmack -a User::App::Shared %{TZ_SYS_VAR}/cache/fontconfig/* fi %postun -p /sbin/ldconfig @@ -131,8 +140,9 @@ fi %doc %{TZ_SYS_RO_ETC}/fonts/conf.d/README %config %{TZ_SYS_RO_ETC}/fonts/conf.avail/*.conf %config(noreplace) %{TZ_SYS_RO_ETC}/fonts/conf.d/*.conf -%dir %{TZ_SYS_VAR}/cache/fontconfig %{TZ_SYS_RO_SHARE}/license/%{name} +%{_tmpfilesdir}/fontconfig.conf +%{upgrade_script_path}/fontconfig_upgrade.sh %files devel %manifest fontconfig.manifest