]> git.pld-linux.org Git - packages/fontconfig.git/blobdiff - fontconfig.spec
trigger: remove empty dir
[packages/fontconfig.git] / fontconfig.spec
index 05bc5a86ed337238c46331f0d9530f7f3567bfd4..88609fa4a674c3bb67854b2f477a54e265fa3183 100644 (file)
@@ -1,26 +1,29 @@
-#
 # Conditional build
 %bcond_without static_libs     # don't build static library
-#
+%bcond_without doc
+
 Summary:       Font configuration and customization tools
 Summary(pl.UTF-8):     Narzędzia do konfigurowania fontów
 Summary(pt_BR.UTF-8):  Ferramentas para configuração e customização do acesso a fontes
 Name:          fontconfig
-Version:       2.7.0
-Release:       1
+Version:       2.10.1
+Release:       3
 Epoch:         1
 License:       MIT
 Group:         Libraries
 Source0:       http://fontconfig.org/release/%{name}-%{version}.tar.gz
-# Source0-md5: 7a9b3f53a7cf431d0acac13aab7573f7
+# Source0-md5: c94e380eea42f2f23ca9537035ef1899
 Source1:       %{name}-lcd-filter.conf
 Patch0:                %{name}-blacklist.patch
 Patch1:                %{name}-bitstream-cyberbit.patch
 URL:           http://fontconfig.org/
 BuildRequires: autoconf
 BuildRequires: automake
-BuildRequires: docbook-utils >= 0.6.13-3
+%if %{with doc}
+BuildRequires: docbook-dtd31-sgml
 BuildRequires: docbook-dtd41-sgml
+BuildRequires: docbook-utils >= 0.6.13-3
+%endif
 BuildRequires: ed
 BuildRequires: expat-devel
 BuildRequires: freetype-devel >= 2.1.5
@@ -52,11 +55,11 @@ Este pacote contém as ferramentas e documentação.
 Summary:       Font configuration and customization library
 Summary(pl.UTF-8):     Biblioteka do konfigurowania fontów
 Summary(pt_BR.UTF-8):  Biblioteca para configuração e customização do acesso a fontes
-Group:         Development/Libraries
+Group:         Libraries
 Requires:      freetype >= 2.1.5
 Provides:      XFree86-fontconfig
-Conflicts:     fontconfig <= 1:2.2.98-1
 Obsoletes:     XFree86-fontconfig
+Conflicts:     fontconfig <= 1:2.2.98-1
 
 %description libs
 Fontconfig is designed to locate fonts within the system and select
@@ -131,27 +134,45 @@ Este pacote contém a biblioteca estática do fontconfig
 %{__autoconf}
 %{__autoheader}
 %{__automake}
+
+# don't rebuild docs by default, use prebuild ones
+export HASDOCBOOK=no
+
 %configure \
-       --enable-docs \
+       --%{?with_doc:en}%{!?with_doc:dis}able-docs \
+       --disable-silent-rules \
        %{!?with_static_libs:--disable-static}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_mandir}/man{1,3,5},/var/cache/fontconfig}
+install -d $RPM_BUILD_ROOT{%{_mandir}/man{1,3,5},/var/cache/fontconfig} \
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
        htmldoc_DATA= \
        doc_DATA=
+
 install %{SOURCE1} \
-       $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.avail/10-lcd-filter.conf
+       $RPM_BUILD_ROOT%{_datadir}/%{name}/conf.avail/10-lcd-filter.conf
+
+ln -s %{_datadir}/%{name}/conf.avail $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.avail
 
-cp -f conf.d/README README.confd
+cp -pf conf.d/README README.confd
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pretrans
+# this needs to be a symlink
+if [ -d %{_sysconfdir}/fonts/conf.avail ] && [ ! -L %{_sysconfdir}/fonts/conf.avail ]; then
+       mv -f %{_sysconfdir}/fonts/conf.avail{,.rpmsave}
+       install -d %{_datadir}/%{name}/conf.avail
+       ln -s %{_datadir}/%{name}/conf.avail %{_sysconfdir}/fonts/conf.avail
+       mv -f %{_sysconfdir}/fonts/conf.avail.rpmsave/*.conf %{_sysconfdir}/fonts/conf.avail/
+       rmdir %{_sysconfdir}/fonts/conf.avail.rpmsave 2>/dev/null || :
+fi
+
 %post
 umask 022
 HOME=/tmp %{_bindir}/fc-cache -f 2>/dev/null || :
@@ -161,22 +182,33 @@ HOME=/tmp %{_bindir}/fc-cache -f 2>/dev/null || :
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog README README.confd
-%attr(755,root,root) %{_bindir}/fc-*
-%{_mandir}/man1/fc-*.1*
-%{_mandir}/man5/fonts-conf.5*
-/var/cache/fontconfig
-
-%files libs
-%defattr(644,root,root,755)
+%doc AUTHORS COPYING ChangeLog README README.confd doc/fontconfig-user.html
 %dir %{_sysconfdir}/fonts
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/fonts.conf
-%{_sysconfdir}/fonts/fonts.dtd
-%dir %{_sysconfdir}/fonts/conf.avail
-%{_sysconfdir}/fonts/conf.avail/*.conf
+%{_sysconfdir}/fonts/conf.avail
+%dir %{_datadir}/xml/%{name}
+%{_datadir}/xml/%{name}/fonts.dtd
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/conf.avail
+%{_datadir}/%{name}/conf.avail/*.conf
 %dir %{_sysconfdir}/fonts/conf.d
 %{_sysconfdir}/fonts/conf.d/README
 %config(noreplace,missingok) %verify(not link md5 mtime size) %{_sysconfdir}/fonts/conf.d/*.conf
+%attr(755,root,root) %{_bindir}/fc-cache
+%attr(755,root,root) %{_bindir}/fc-cat
+%attr(755,root,root) %{_bindir}/fc-list
+%attr(755,root,root) %{_bindir}/fc-match
+%attr(755,root,root) %{_bindir}/fc-query
+%attr(755,root,root) %{_bindir}/fc-pattern
+%attr(755,root,root) %{_bindir}/fc-scan
+%if %{with doc}
+%{_mandir}/man1/fc-*.1*
+%{_mandir}/man5/fonts-conf.5*
+%endif
+%dir /var/cache/fontconfig
+
+%files libs
+%defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libfontconfig.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libfontconfig.so.1
 
@@ -187,7 +219,9 @@ HOME=/tmp %{_bindir}/fc-cache -f 2>/dev/null || :
 %{_libdir}/libfontconfig.la
 %{_includedir}/fontconfig
 %{_pkgconfigdir}/fontconfig.pc
+%if %{with doc}
 %{_mandir}/man3/Fc*.3*
+%endif
 
 %if %{with static_libs}
 %files static
This page took 0.09071 seconds and 4 git commands to generate.