Blob Blame History Raw
#!/bin/sh
# Strips requirements that are against the package itself, since we
# do not autoprovide them (for that we don't override gecko-devel's provides)

# Lubomir Rintel <lkundrak@v3.sk>

# This should be called with the real build root as argument, so that
# we will be able to strip dependencies of lightning on what would be
# provided by sunbird.

FIND_PROVIDES="$(rpm --eval %__find_provides)"
FIND_REQUIRES="$(rpm --eval %__find_requires)"
RPM_BUILD_ROOT="$1"

(
	# Assume all ur subpackages require everything that all our
	# subpackages  provide (actually it's not true,
	# this is just to prevent depending on it), thus print twice
	find $RPM_BUILD_ROOT |$FIND_PROVIDES |awk '{print; print}'
	# Add this subpackage's requires
	$FIND_REQUIRES
# What wasn't mentioned twice is an external dependency
) |sort |uniq -u