LOWER_MDG = $(shell echo $(MDG) | tr '[:upper:]' '[:lower:]')
+CONTAINER_NAME ?= $(LOWER_MDG)
+
CMD_DOCKER_ARGS ?= -q
DOCKER_ARGS = $(CMD_DOCKER_ARGS)
-DEPS := MON IM LCM RO common osmclient devops NBI POL Keystone
+DEPS := MON IM LCM RO common osmclient devops NBI policy-module Keystone
DEPS_TARGETS = $(addprefix $(MKBUILD)/.dep_, $(DEPS))
$(MKBUILD):
$Qmkdir -p $(MKBUILD)
+$(MKBUILD)/.dep_policy-module:
+ $Q$(MKINCLUDE)/get_version.sh -r $(REPOSITORY) -R $(RELEASE) -k $(REPOSITORY_KEY) -u $(REPOSITORY_BASE) -m POL -p policy-module > $@
+
$(MKBUILD)/.dep_%:
$Q$(MKINCLUDE)/get_version.sh -r $(REPOSITORY) -R $(RELEASE) -k $(REPOSITORY_KEY) -u $(REPOSITORY_BASE) -m $* > $@
--build-arg COMMON_VERSION==$(shell cat $(MKBUILD)/.dep_common) \
--build-arg OSMCLIENT_VERSION==$(shell cat $(MKBUILD)/.dep_osmclient) \
--build-arg NBI_VERSION==$(shell cat $(MKBUILD)/.dep_NBI) \
- --build-arg POL_VERSION==$(shell cat $(MKBUILD)/.dep_POL) \
+ --build-arg POL_VERSION==$(shell cat $(MKBUILD)/.dep_policy-module) \
--build-arg DEVOPS_VERSION==$(shell cat $(MKBUILD)/.dep_devops) \
--build-arg LWUI_VERSION==$(shell date +%s) \
$(DOCKER_ARGS) .
rm -f $(MKBUILD)/.dep*
tag:
- docker tag osm/$(LOWER_MDG) osm/$(LOWER_MDG):$(TAG)
+ docker tag osm/$(CONTAINER_NAME) osm/$(LOWER_MDG):$(TAG)
REPOSITORY_BASE="http://osm-download.etsi.org/repository/osm/debian"
DEBUG=
-while getopts ":r:k:u:R:b:-:dm:" o; do
+while getopts ":r:k:u:R:b:-:dm:p:" o; do
case "${o}" in
r)
REPOSITORY=${OPTARG}
d)
DEBUG=y
;;
+ p)
+ PACKAGE_NAME=${OPTARG}
+ ;;
m)
MDG=${OPTARG}
;;
echo "missing MDG"
fi
+[ -z "$PACKAGE_NAME" ] && PACKAGE_NAME=$MDG
+
if [ -n "$DEBUG" ]; then
echo curl $REPOSITORY_BASE/$RELEASE/dists/$REPOSITORY/$MDG/binary-amd64/Packages
fi
-curl $REPOSITORY_BASE/$RELEASE/dists/$REPOSITORY/$MDG/binary-amd64/Packages 2>/dev/null | awk -v mdg=$MDG '{
- if ( /Package:/ && match($2,tolower(mdg)) ) {
+curl $REPOSITORY_BASE/$RELEASE/dists/$REPOSITORY/$MDG/binary-amd64/Packages 2>/dev/null | awk -v pkg=$PACKAGE_NAME '{
+ if ( /Package:/ && match($2,sprintf("%s$",tolower(pkg)) ) ) {
package=1;
} else if (package==1 && match($1,"Version:")) {
package=0;