factored files.req
This commit is contained in:
parent
80c40744e1
commit
c33a51b79c
@ -131,12 +131,6 @@ ParseMethod()
|
||||
nojava)
|
||||
FIND_JAVA=
|
||||
;;
|
||||
files)
|
||||
FIND_FILES=1
|
||||
;;
|
||||
nofiles)
|
||||
FIND_FILES=
|
||||
;;
|
||||
mono)
|
||||
FIND_MONO=1
|
||||
;;
|
||||
@ -168,7 +162,6 @@ ParseMethod()
|
||||
FIND_TCL=
|
||||
;;
|
||||
all)
|
||||
FIND_FILES=1
|
||||
FIND_MONO=1
|
||||
FIND_JAVA=1
|
||||
FIND_PAM=1
|
||||
@ -195,8 +188,7 @@ if [ -n "$FIND_PAM" -o \
|
||||
FIND_SCRIPT=1
|
||||
fi
|
||||
|
||||
if [ -z "$FIND_FILES" -a \
|
||||
-z "$FIND_JAVA" -a \
|
||||
if [ -z "$FIND_JAVA" -a \
|
||||
-z "$FIND_MONO" -a \
|
||||
-z "$FIND_SCRIPT" ]; then
|
||||
# Nothing to do
|
||||
@ -315,15 +307,6 @@ $r"
|
||||
}
|
||||
|
||||
while IFS= read -r f; do
|
||||
if [ -n "$FIND_FILES" ]; then
|
||||
for p in $(grep '^[^#]' @RPMCONFIGDIR@/files.req.list); do
|
||||
if [ -z "${fname%%$p/*}" ]; then
|
||||
[ -z "$FOUND_REQS" ] && FOUND_REQS="$p" || FOUND_REQS="$FOUND_REQS
|
||||
$p"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ -z "${t##*MS Windows PE*}" ]; then
|
||||
[ -z "$LIST_MONO" ] && LIST_MONO="$f" || LIST_MONO="$LIST_MONO
|
||||
$f"
|
||||
|
@ -990,6 +990,8 @@ AC_OUTPUT([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
|
||||
scripts/brp-verify_elf
|
||||
scripts/check-files
|
||||
scripts/compress_files
|
||||
scripts/files.req
|
||||
scripts/files.req.files
|
||||
scripts/find-lang
|
||||
scripts/find-package
|
||||
scripts/fixup-binconfig
|
||||
|
@ -10,7 +10,8 @@ EXTRA_DIST = \
|
||||
cpanflute cpanflute2 Specfile.pm find-provides.perl find-requires.perl \
|
||||
fixup-binconfig fixup-pkgconfig fixup-libtool fixup-libraries \
|
||||
get_magic.pl getpo.sh http.req \
|
||||
functions files.req.list magic.prov magic.req \
|
||||
files.req files.req.files files.req.list \
|
||||
functions magic.prov magic.req \
|
||||
ldd lib.req lib.req.files lib.prov lib.prov.files shlib.req.awk \
|
||||
pam.prov pam.req perl.prov perl.req \
|
||||
pkgconfig.req pkgconfig.req.files pkgconfig.prov pkgconfig.prov.files \
|
||||
@ -34,7 +35,8 @@ config_SCRIPTS = \
|
||||
cpanflute cpanflute2 Specfile.pm find-provides.perl find-requires.perl \
|
||||
fixup-binconfig fixup-pkgconfig fixup-libtool fixup-libraries \
|
||||
get_magic.pl getpo.sh http.req \
|
||||
functions files.req.list magic.prov magic.req \
|
||||
files.req files.req.files files.req.list \
|
||||
functions magic.prov magic.req \
|
||||
ldd lib.req lib.req.files lib.prov lib.prov.files shlib.req.awk \
|
||||
pam.prov pam.req perl.prov perl.req \
|
||||
pkgconfig.req pkgconfig.req.files pkgconfig.prov pkgconfig.prov.files \
|
||||
|
2
scripts/files.req.files.in
Executable file
2
scripts/files.req.files.in
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh -efu
|
||||
cut -f1 |grep -Ff @RPMCONFIGDIR@/files.req.list || [ $? = 1 ]
|
18
scripts/files.req.in
Executable file
18
scripts/files.req.in
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh -efu
|
||||
|
||||
. @RPMCONFIGDIR@/functions
|
||||
|
||||
list=$(grep ^/. @RPMCONFIGDIR@/files.req.list)
|
||||
|
||||
FilesReq()
|
||||
{
|
||||
local f="$1" d=; shift
|
||||
for d in $list; do
|
||||
case "$f" in
|
||||
"${RPM_BUILD_ROOT-}$d"/*)
|
||||
echo "$d" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
ArgvFileAction FilesReq "$@"
|
Loading…
x
Reference in New Issue
Block a user