fontconfig: upgrade to 2.13.0
[platform/upstream/fontconfig.git] / packaging / fontconfig.spec
index 6f9fa3d..ed42479 100644 (file)
@@ -1,8 +1,8 @@
-%global freetype_version 2.5.0
+%global freetype_version 2.9.0
 
 Name:           fontconfig
 Summary:        Font configuration and customization library
-Version:        2.12.1
+Version:        2.13.0
 Release:        1
 Group:          Graphics & UI Framework/Fonts
 License:        MIT
@@ -17,6 +17,8 @@ BuildRequires:  perl
 BuildRequires:  gperf
 BuildRequires:  python
 BuildRequires:  systemd-devel
+BuildRequires:  gettext-tools
+BuildRequires:  libuuid-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
@@ -57,7 +59,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 \
@@ -71,7 +73,7 @@ make %{?jobs:-j%jobs}
 %install
 rm -rf %{buildroot}
 mkdir -p %{buildroot}%{upgrade_script_path}
-cp -f scripts/fontconfig_upgrade.sh %{buildroot}%{upgrade_script_path}
+cp -f scripts/500.fontconfig.sh %{buildroot}%{upgrade_script_path}
 
 %make_install
 
@@ -82,8 +84,6 @@ install -m 0644 %SOURCE100 %{buildroot}%{_tmpfilesdir}/fontconfig.conf
 # and own /usr/share/fonts
 mydir=$RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
 mkdir -p $RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
-mkdir -p %{buildroot}%{TZ_SYS_RO_SHARE}/license
-cat COPYING > %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}
 
 # Remove unpackaged files. no need when configure --disable-static
 #rm $RPM_BUILD_ROOT%{_libdir}/*.la
@@ -98,6 +98,12 @@ mkdir -p %{TZ_SYS_RO_SHARE}/fonts
 mkdir -p %{TZ_SYS_RO_SHARE}/fallback_fonts
 mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts
 
+mkdir -p %{TZ_SYS_VAR}/cache/fontconfig
+chown root:root %{TZ_SYS_VAR}/cache/fontconfig
+chmod 755 %{TZ_SYS_VAR}/cache/fontconfig
+chsmack -t %{TZ_SYS_VAR}/cache/fontconfig
+chsmack -a User::App::Shared %{TZ_SYS_VAR}/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
@@ -118,11 +124,9 @@ mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts
 # The check for existance is needed on dual-arch installs (the second
 #  copy of fontconfig might install the binary instead of the first)
 # 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
-chown -R owner:users %{TZ_SYS_VAR}/cache/fontconfig
-chmod -R 664 %{TZ_SYS_VAR}/cache/fontconfig
-fi
+#if [ -x %{TZ_SYS_BIN}/fc-cache ] && %{TZ_SYS_BIN}/fc-cache --version 2>&1 | grep -q %{version} ; then
+#fc-cache -rf --system-only
+#fi
 
 %postun -p /sbin/ldconfig
 
@@ -136,12 +140,14 @@ fi
 %{TZ_SYS_RO_ETC}/fonts/*
 %dir %{TZ_SYS_RO_ETC}/fonts/conf.avail
 %dir %{TZ_SYS_RO_SHARE}/fonts
+%{TZ_SYS_RO_SHARE}/gettext/its/fontconfig*
+%{TZ_SYS_RO_SHARE}/locale/*/*/fontconfig*
 %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
-%{TZ_SYS_RO_SHARE}/license/%{name}
 %{_tmpfilesdir}/fontconfig.conf
-%{upgrade_script_path}/fontconfig_upgrade.sh
+%{upgrade_script_path}/500.fontconfig.sh
+%license COPYING
 
 %files devel
 %manifest fontconfig.manifest