X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=packaging%2Ffontconfig.spec;h=bda5710a0c3ec636497581ef4fcb27c2cb96f767;hb=refs%2Ftags%2Faccepted%2Ftizen%2Fivi%2F20170103.051252;hp=e8562aceb93b6b613202cf25c39cc5e951a11285;hpb=6a0de9c1db147c8a574ded2d42db6f5d8181e019;p=platform%2Fupstream%2Ffontconfig.git diff --git a/packaging/fontconfig.spec b/packaging/fontconfig.spec index e8562ac..bda5710 100644 --- a/packaging/fontconfig.spec +++ b/packaging/fontconfig.spec @@ -1,18 +1,28 @@ -%global freetype_version 2.1.4 +%global freetype_version 2.5.0 Name: fontconfig -Version: 2.10.91 -Release: 0 -License: MIT Summary: Font configuration and customization library -Url: http://fontconfig.org -Group: Graphics/Font Management -Source: %{name}-%{version}.tar.bz2 -BuildRequires: expat-devel +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 +Source100: fontconfig.conf +Source1001: fontconfig.manifest +BuildRequires: pkgconfig(freetype2) >= %{freetype_version} BuildRequires: gawk +BuildRequires: expat-devel BuildRequires: perl -BuildRequires: pkgconfig(freetype2) >= %{freetype_version} -Requires(pre): /usr/bin/fc-cache, /usr/bin/mkdir /usr/bin/rm, /usr/bin/grep +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 @@ -21,7 +31,7 @@ applications. %package devel Summary: Font configuration and customization library -Group: Development/Libraries +Group: Graphics & UI Framework/Fonts Requires: %{name} = %{version} Requires: fontconfig = %{version} Requires: freetype-devel >= %{freetype_version} @@ -36,62 +46,111 @@ will use fontconfig. %prep %setup -q +cp %{SOURCE1001} . %build # We don't want to rebuild the docs, but we want to install the included ones. export HASDOCBOOK=no %reconfigure --disable-static \ - --with-expat=/usr \ + --with-expat=%{_prefix} \ --with-expat-include=%{_includedir} \ --with-expat-lib=%{_libdir} \ - --with-freetype-config=%{_bindir}/freetype-config \ - --with-add-fonts=%{_datadir}/fonts,/usr/share/app_fonts,/usr/share/fallback_fonts \ - --with-cache-dir=/var/cache/fontconfig \ - --with-confdir=/etc/fonts \ - --with-templatedir=%{_sysconfdir}/fonts/conf.avail \ + --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,%{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 \ + --with-templatedir=%{TZ_SYS_RO_ETC}/fonts/conf.avail \ + --with-xmldir=%{TZ_SYS_RO_ETC}/fonts \ --disable-docs -make %{?_smp_mflags} - -%check -make check +make %{?jobs:-j%jobs} +#make check %install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{upgrade_script_path} +cp -f scripts/500.fontconfig.sh %{buildroot}%{upgrade_script_path} %make_install -mkdir -p %{buildroot}%{_datadir}/fonts +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 +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 +#rm $RPM_BUILD_ROOT%{_libdir}/*.a %post /sbin/ldconfig umask 0022 -mkdir -p /var/cache/fontconfig -# Remove stale caches -rm -f /var/cache/fontconfig/????????????????????????????????.cache-2 -rm -f /var/cache/fontconfig/stamp - -if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{version} ; then -HOME=/root /usr/bin/fc-cache -f -fi +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 +#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 + +# Force regeneration of all fontconfig cache files +# 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 +#fi %postun -p /sbin/ldconfig %files -%license COPYING +%manifest fontconfig.manifest +%defattr(-,root,root,-) +%defattr(-, root, root) +%doc README AUTHORS COPYING %{_libdir}/libfontconfig.so.* -%{_bindir}/fc-* -%{_sysconfdir}/fonts/* -%dir %{_datadir}/fonts -%doc %{_sysconfdir}/fonts/conf.d/README -%config %{_sysconfdir}/fonts/conf.avail/*.conf -%config(noreplace) %{_sysconfdir}/fonts/conf.d/*.conf -%dir %{_localstatedir}/cache/fontconfig -/usr/share/xml/fontconfig/fonts.dtd +%{TZ_SYS_BIN}/fc-* +%{TZ_SYS_RO_ETC}/fonts/* +%dir %{TZ_SYS_RO_ETC}/fonts/conf.avail +%dir %{TZ_SYS_RO_SHARE}/fonts +%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}/500.fontconfig.sh %files devel +%manifest fontconfig.manifest +%defattr(-,root,root,-) +%defattr(-, root, root) %{_libdir}/libfontconfig.so %{_libdir}/pkgconfig/* %{_includedir}/fontconfig