Module: kamailio
Branch: master
Commit: cbb8d801d5e4836d922483c61f29eb7e02a4f360
URL:
https://github.com/kamailio/kamailio/commit/cbb8d801d5e4836d922483c61f29eb7…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Sergey Safarov <s.safarov(a)gmail.com>
Date: 2017-09-30T16:41:25-04:00
pkg/kamailio/alpine_docker: Allow build docker image from forked repos
---
Modified: pkg/kamailio/alpine_docker/build.sh
---
Diff:
https://github.com/kamailio/kamailio/commit/cbb8d801d5e4836d922483c61f29eb7…
Patch:
https://github.com/kamailio/kamailio/commit/cbb8d801d5e4836d922483c61f29eb7…
---
diff --git a/pkg/kamailio/alpine_docker/build.sh b/pkg/kamailio/alpine_docker/build.sh
index fad1cd199d..71cf1e170b 100755
--- a/pkg/kamailio/alpine_docker/build.sh
+++ b/pkg/kamailio/alpine_docker/build.sh
@@ -22,6 +22,11 @@ apk add --no-cache abuild git gcc build-base bison db-dev flex
expat-dev perl-de
}
build_and_install(){
+ cd /usr/src/kamailio
+ REPO_OWNER=$(git remote get-url origin 2> /dev/null | sed -e
's:^.*github.com/::' -e 's:/.*\.git::')
+ if [ ! -z "$REPO_OWNER" ]; then
+ sed -i -e "s:github.com/kamailio:github.com/$REPO_OWNER:"
/usr/src/kamailio/pkg/kamailio/alpine/APKBUILD
+ fi
if [ ! -z "$GIT_TAG" ]; then
sed -i -e "s/^_gitcommit=.*/_gitcommit=$GIT_TAG/"
/usr/src/kamailio/pkg/kamailio/alpine/APKBUILD
fi