factored static.req

This commit is contained in:
Alexey Tourbin 2007-03-07 12:36:29 +03:00
parent d87d2c8431
commit 80c40744e1
6 changed files with 29 additions and 6 deletions

View File

@ -314,12 +314,6 @@ FindTclReqs()
$r"
}
if [ -n "$RPM_SUBPACKAGE_NAME" ]; then
if [ -n "${RPM_SUBPACKAGE_NAME%%glibc*}" -a -z "${RPM_SUBPACKAGE_NAME##*-devel-static}" ]; then
FOUND_REQS=glibc-devel-static
fi
fi
while IFS= read -r f; do
if [ -n "$FIND_FILES" ]; then
for p in $(grep '^[^#]' @RPMCONFIGDIR@/files.req.list); do

View File

@ -1005,6 +1005,7 @@ AC_OUTPUT([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
scripts/shebang.req
scripts/shell.prov
scripts/shell.req
scripts/static.req
scripts/strip_files
scripts/verify-elf
tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile

View File

@ -475,6 +475,7 @@ fi
%rpmattr %_rpmlibdir/pkgconfig.*
%rpmattr %_rpmlibdir/shell.*
%rpmattr %_rpmlibdir/shebang.*
%rpmattr %_rpmlibdir/static.*
%rpmattr %_rpmlibdir/verify-elf
%rpmattr %_rpmlibdir/Specfile.pm
%rpmattr %_rpmlibdir/*.awk

View File

@ -18,6 +18,7 @@ EXTRA_DIST = \
shebang.req shebang.req.files \
shell.req shell.req.files shell.prov shell.prov.files \
sql.prov sql.req strip_files \
static.req static.req.files \
tcl.req trpm u_pkg.sh verify-elf vpkg-provides.sh vpkg-provides2.sh
installprefix = $(DESTDIR)
@ -41,4 +42,5 @@ config_SCRIPTS = \
shebang.req shebang.req.files \
shell.req shell.req.files shell.prov shell.prov.files \
sql.prov sql.req strip_files \
static.req static.req.files \
tcl.req trpm u_pkg.sh verify-elf vpkg-provides.sh vpkg-provides2.sh

5
scripts/static.req.files Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh -efu
while IFS=$'\t' read -r f t; do
[ -z "${f##*.a}" ] && [ -z "${t#*current ar archive*}" ] &&
echo "$f" ||:
done

20
scripts/static.req.in Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh -efu
. @RPMCONFIGDIR@/functions
StaticReq()
{
local f="$1"; shift
[ -z "${f##*.a}" ] || return 0
local name="${RPM_SUBPACKAGE_NAME-}"
[ -n "$name" ] || name=$(rpmquery --qf '%{NAME}\n' -f -- "$f")
case "$name" in
glibc*) return 0 ;;
*-devel-static) echo glibc-devel-static ;;
*) Verbose "package $name has static library ${f#${RPM_BUILD_ROOT-}}" ;;
esac
}
ArgvFileAction StaticReq "$@"