summaryrefslogtreecommitdiff
path: root/scripts/fontconfig.prov
blob: bfb6ea084186a5d0d4c767016ece98937ed59e68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/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 <behdad@redhat.com>
# Based on other provides scripts from RPM
#

fcquery=/usr/bin/fc-query

if [ ! -x $fcquery ]; then
    cat > /dev/null
    exit 0
fi

# filter out anything outside main fontconfig path
grep /usr/share/fonts/ |
while read fn; do
    $fcquery --format '%{=pkgkit}' "${fn}" 2> /dev/null
done