nbdkit/nbdkit-find-provides
Richard W.M. Jones 8860174767 Rebase to new stable branch version 1.30.0
resolves: rhbz#2059289
Add automatic provides generator and subpackage nbdkit-srpm-macros
resolves: rhbz#2059291 [bootstrap stage]
New filters: blocksize-policy, protect, retry-request
Fix license of bash-completion subpackage
2022-03-04 15:04:47 +00:00

24 lines
534 B
Bash
Executable File

#!/bin/bash -
# Generate RPM provides automatically for nbdkit packages and filters.
# Copyright (C) 2009-2022 Red Hat Inc.
# To test:
# find /usr/lib64/nbdkit/plugins | ./nbdkit-find-provides VER REL
# find /usr/lib64/nbdkit/filters | ./nbdkit-find-provides VER REL
ver="$1"
rel="$2"
function process_file
{
if [[ $1 =~ /plugins/nbdkit-.*-plugin ]] ||
[[ $1 =~ /filters/nbdkit-.*-filter ]]; then
echo "Provides:" "$(basename $1 .so)" "=" "$ver-$rel"
fi
}
while read line; do
process_file "$line"
done