From 0a87f6d73e7c745065eead825620876952ff8165 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Feb 06 2009 06:54:05 +0000 Subject: - enable fontconfig provides generation --- diff --git a/fontconfig.prov b/fontconfig.prov new file mode 100755 index 0000000..79e0825 --- /dev/null +++ b/fontconfig.prov @@ -0,0 +1,37 @@ +#!/bin/bash +# +# Script to install in: +# /usr/lib/rpm/redhat/find-provides.d +# +# Transform font files into RPM provides +# Requires fontconfig >= 2.6.90 +# +# Author: Behdad Esfahbod +# Based on other provides scripts from RPM +# + +fcquery=/usr/bin/fc-query + +[ -x $fcquery ] || exit 0 + +# filter out anything outside main fontconfig path +grep /usr/share/fonts/ | +xargs $fcquery --format '%{family}\n:lang=%{lang}\n' 2> /dev/null | +while read line; do + case $line in + :lang=*) + langs=${line#:lang=} + OLDIFS=$IFS + IFS='|' + for lang in $langs; do + echo :lang=$lang + done + IFS=$OLDIFS + ;; + *) + echo "$line" | tr 'A-Z_' 'a-z-' | tr -d -c 'a-z0-9-\n' + ;; + esac +done | +sed 's/\(.*\)/Font(\1)/' | +sort -u diff --git a/rpm-4.6.0-extra-provides.patch b/rpm-4.6.0-extra-provides.patch index 9f7f871..5ec72ce 100644 --- a/rpm-4.6.0-extra-provides.patch +++ b/rpm-4.6.0-extra-provides.patch @@ -75,7 +75,7 @@ diff -up rpm-4.6.0-rc4/macros.in.extra-prov rpm-4.6.0-rc4/macros.in %__pkgconfig_provides @RPMCONFIGDIR@/pkgconfigdeps.sh --provides %__pkgconfig_requires @RPMCONFIGDIR@/pkgconfigdeps.sh --requires -+#%__fontconfig_provides /usr/lib/rpm/fontconfig.prov ++%__fontconfig_provides /usr/lib/rpm/fontconfig.prov +%__desktop_provides /usr/lib/rpm/desktop-file.prov + #============================================================================== diff --git a/rpm.spec b/rpm.spec index 112fecf..3447291 100644 --- a/rpm.spec +++ b/rpm.spec @@ -18,7 +18,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: 0.%{snapver}.4%{?dist} +Release: 0.%{snapver}.5%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2 @@ -26,6 +26,7 @@ Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2 Source1: db-%{bdbver}.tar.gz %endif Source10: desktop-file.prov +Source11: fontconfig.prov Patch0: rpm-4.5.90-devel-autodep.patch Patch1: rpm-4.5.90-pkgconfig-path.patch @@ -217,7 +218,7 @@ install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/rpm -install -p -m 755 %{SOURCE10} ${RPM_BUILD_ROOT}%{rpmhome}/ +install -p -m 755 %{SOURCE10} %{SOURCE11} ${RPM_BUILD_ROOT}%{rpmhome}/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm @@ -348,6 +349,7 @@ exit 0 %{rpmhome}/mkinstalldirs %{rpmhome}/rpmdiff* %{rpmhome}/desktop-file.prov +%{rpmhome}/fontconfig.prov %{rpmhome}/macros.perl %{rpmhome}/macros.python @@ -374,6 +376,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Fri Feb 06 2009 Panu Matilainen - 4.6.0-0.rc4.5 +- enable fontconfig provides generation + * Thu Feb 05 2009 Panu Matilainen - 4.6.0-0.rc4.4 - fixup rpm translation lookup to match Fedora specspo (#436941)