From: Jaeun Choi Date: Tue, 3 Nov 2015 07:20:13 +0000 (+0900) Subject: Update spec file X-Git-Tag: accepted/tizen/ivi/20160218.024747~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Ffontconfig.git;a=commitdiff_plain;h=899e8471099d0825e6e744fb8383ae898a2dc4a2 Update spec file Change-Id: I99560bf9cd09aefab77173a0080271f528523bd5 --- diff --git a/packaging/fontconfig.spec b/packaging/fontconfig.spec index 2f4467b..6aab74f 100644 --- a/packaging/fontconfig.spec +++ b/packaging/fontconfig.spec @@ -1,20 +1,23 @@ -%global freetype_version 2.1.4 +%global freetype_version 2.5.0 Name: fontconfig -Version: 2.11.1 -Release: 0 -License: MIT Summary: Font configuration and customization library -Url: http://fontconfig.org +Version: 2.11.93 +Release: 1 Group: Graphics & UI Framework/Fonts -Source: %{name}-%{version}.tar.bz2 -Source1001: fontconfig.manifest -BuildRequires: expat-devel +License: MIT +URL: http://fontconfig.org +Source0: http://fontconfig.org/release/fontconfig-%{version}.tar.gz +Source1001: packaging/fontconfig.manifest +BuildRequires: pkgconfig(freetype2) >= %{freetype_version} BuildRequires: gawk +BuildRequires: expat-devel BuildRequires: perl BuildRequires: gperf -BuildRequires: pkgconfig(freetype2) >= %{freetype_version} +BuildRequires: python Requires(pre): /usr/bin/fc-cache, /usr/bin/mkdir /usr/bin/rm, /usr/bin/grep, /usr/bin/chsmack +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig %description Fontconfig is designed to locate fonts within the @@ -43,27 +46,38 @@ cp %{SOURCE1001} . %build # We don't want to rebuild the docs, but we want to install the included ones. export HASDOCBOOK=no -%autogen --disable-static \ + +%reconfigure --disable-static \ --with-expat=/usr \ --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-add-fonts=/opt/share/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-baseconfigdir=/usr/etc/fonts \ + --with-configdir=/usr/etc/fonts/conf.d \ + --with-templatedir=/usr/etc/fonts/conf.avail \ + --with-xmldir=/usr/etc/fonts \ --disable-docs -%__make %{?_smp_mflags} - -%check -%__make check +make %{?jobs:-j%jobs} +#make check %install +rm -rf %{buildroot} %make_install -mkdir -p %{buildroot}%{_datadir}/fonts +# All font packages depend on this package, so we create +# and own /usr/share/fonts +mydir=$RPM_BUILD_ROOT%{_datadir}/fonts +mkdir -p $RPM_BUILD_ROOT%{_datadir}/fonts +mkdir -p %{buildroot}/usr/share/license +cat COPYING > %{buildroot}/usr/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 @@ -72,32 +86,57 @@ umask 0022 mkdir -p /var/cache/fontconfig # Remove stale caches -rm -f /var/cache/fontconfig/????????????????????????????????.cache-2 -rm -f /var/cache/fontconfig/stamp - -chsmack -a System::Shared -t /var/cache/fontconfig - +rm -f /var/cache/fontconfig/* +mkdir -p /opt/var/cache/fontconfig +mkdir -p /usr/share/fonts +mkdir -p /usr/share/fallback_fonts +mkdir -p /usr/share/app_fonts +chsmack -t /opt/var/cache/fontconfig +chsmack -a System::Shared /opt/var/cache/fontconfig +rm -rf /opt/home/app/.cache/fontconfig +mkdir -p /opt/home/app/.cache/fontconfig +chmod 755 /opt/home/app/.cache +chown app:app /opt/home/app/.cache +chsmack -t /opt/home/app/.cache +chsmack -a System::Shared /opt/home/app/.cache +chmod 755 /opt/home/app/.cache/fontconfig +chown app:app /opt/home/app/.cache/fontconfig +chsmack -t /opt/home/app/.cache/fontconfig +chsmack -a System::Shared /opt/home/app/.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 /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{version} ; then -HOME=/root /usr/bin/fc-cache -f +fc-cache -rf --system-only fi %postun -p /sbin/ldconfig %files -%manifest %{name}.manifest -%license COPYING +%manifest fontconfig.manifest +%defattr(-,root,root,-) +%defattr(-, root, root) +%doc README AUTHORS COPYING %{_libdir}/libfontconfig.so.* %{_bindir}/fc-* -%{_sysconfdir}/fonts/* +/usr/%{_sysconfdir}/fonts/* +%dir /usr/%{_sysconfdir}/fonts/conf.avail %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 -%{_datadir}/xml/fontconfig/fonts.dtd +%doc /usr/%{_sysconfdir}/fonts/conf.d/README +%config /usr/%{_sysconfdir}/fonts/conf.avail/*.conf +%config(noreplace) /usr/%{_sysconfdir}/fonts/conf.d/*.conf +%dir /var/cache/fontconfig +/usr/share/license/%{name} %files devel -%manifest %{name}.manifest +%manifest fontconfig.manifest +%defattr(-,root,root,-) +%defattr(-, root, root) %{_libdir}/libfontconfig.so %{_libdir}/pkgconfig/* %{_includedir}/fontconfig