Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 2507a50392
Fetching contributors…

Cannot retrieve contributors at this time

86 lines (75 sloc) 3.28 kb
# Initial Version Copyright (C) 2010 eZuce, Inc., All Rights Reserved.
# Licensed to the User under the LGPL license.
#
# Determine software dependencies for building source by analyzing spec files. This does not build
# the dependencies themselves, see *-build.mk* for that.
#
lib.deps-% : LIB_REWRITE_DEPS = $(foreach P,$(lib),-e '/$(P)/Id')
# grep pulls deps for all distros, here we remove irrellevant ones for each distro
# some are deps for parts we do not build
REWRITE_DEPS = \
-e "/$${proj}/d" \
-e '/%{\?name}\?/d' \
-e '/java-ibm.*/d'\
-e '/libsng_isdn/d'\
-e '/libsng_ss7/d'\
-e '/sng-tc-linux/d'\
-e '/wanpipe/d'
REWRITE_DEPS_redhat = \
$(REWRITE_DEPS) \
-e '/java-1_6_0-sun-devel/d' \
-e 's/java-devel/java-1.6.0-openjdk-devel/g' \
-e '/docbook-xsl-stylesheets/d' \
-e '/pwdutils/d' \
-e '/apache2-.*/d' \
-e '/libapr1-devel/d' \
-e '/lzo-devel/d' \
-e '/rubygem-postgres/d' \
-e '/cron/d'
REWRITE_DEPS_centos_5 = \
$(REWRITE_DEPS_redhat) \
-e '/perl-ExtUtils-Embed/d'
REWRITE_DEPS_fedora = \
$(REWRITE_DEPS_redhat) \
-e '/termcap/d' \
-e '/jpeg-devel/d' \
-e 's/libopenjpeg-devel/openjpeg-devel/g' \
-e 's/mongodb-devel/mongodb-devel-fsv2-patch/g' \
-e 's/curl-devel/libcurl-devel/g' \
-e 's/jakarta-commons-beanutils/apache-commons-beanutils/g'
REWRITE_DEPS_suse = \
$(REWRITE_DEPS) \
-e '/docbook-style-xsl/d' \
-e '/httpd-.*/d' \
-e '/apr-devel/d' \
-e '/ruby-postgres/d' \
-e '/openldap-devel/d' \
-e '/vixiecron/d'
# All fedoras have same dependencies as eachother. Assume future versions do too until proven otherwise.
$(foreach T,10 11 12 13 14 15 16 17 18 19 20,$(eval REWRITE_DEPS_fedora_$(T) = $(REWRITE_DEPS_fedora)))
help.{1|2}.deps-list = List all dependencies to run a package(s).
help.{1|2}.deps-build-list = List all dependencies to build package(s).
help.{1|2}.deps-missing = List all dependencies to run a package(s) that are not currently installed on this system.
help.{1|2}.deps-missing-build-list = List all dependencies to build a package(s) that are not currently installed on this system.
sipx.deps-% lib.deps-% : DEPS_TARGET=$(lastword $(subst ., ,$@))
sipx.deps-% lib.deps-% : DEPS_LIST=$(firstword $(subst ., ,$@))
# when listing all together, remove interdependencies from the group, make sence when you think about it
$(foreach T,sipx lib,$(T).deps-list $(T).deps-missing $(T).deps-missing-build-list $(T).deps-build-list) :
@$(MAKE) --no-print-directory $(foreach T,$($(DEPS_LIST)),$(T).$(DEPS_TARGET)) | \
sed $(foreach P,$(sipx),-e '/$(P)/Id') $(LIB_REWRITE_DEPS) | \
sort -u
%.deps-missing-build-list : DEPS_LIST_TARGET = deps-build-list
%.deps-missing : DEPS_LIST_TARGET = deps-list
$(foreach T,$(all),$(T).deps-missing $(T).deps-missing-build-list):
@rpm -q rpm `$(MAKE) --no-print-directory $(PROJ).$(DEPS_LIST_TARGET)` | grep 'is not installed' | awk '{print $$2}'
%.deps-build-list : REQUIRES_TAG = BuildRequires
%.deps-list : REQUIRES_TAG = Requires
$(foreach T,$(all),$(T).deps-list $(T).deps-build-list):
@proj=$(call lowercase,$(PROJ)); \
grep '^$(REQUIRES_TAG):' $(SRC)/$(PROJ)/$$proj.spec* | \
sed \
-e 's/$(REQUIRES_TAG)://' \
-e 's/,/\n/g' \
$(REWRITE_DEPS_$(DISTRO_OS)_$(DISTRO_VER)) | \
awk '{print $$1}' | \
sort -u
Jump to Line
Something went wrong with that request. Please try again.