Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/kamailio/alpine: Set of updates alpine packaging and docker #1259

Merged
merged 3 commits into from
Oct 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 2 additions & 11 deletions pkg/kamailio/alpine/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pkgrel=0

# If building from a git snapshot, specify the gitcommit
# If building a proper release, leave gitcommit blank
_gitcommit=1fe5970917f21e9d69127635e04ba8ae585e2da4
_gitcommit=c5ffc265cf83c7e329ee8d21c3bafba78b670c58

[ ! -z "${_gitcommit}" ] && pkgver="${pkgver}.$(date +%Y%m%d)"
[ ! -z "${_gitcommit}" ] && _suffix="-${_gitcommit:0:7}"
Expand Down Expand Up @@ -237,7 +237,6 @@ done
source="${pkgname}-${pkgver}${_suffix}.tar.gz::https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz
0001-kamdbctl.base.patch
0004-src_core_tcp_read_c.patch
kamailio.cfg
kamailio.initd
"

Expand Down Expand Up @@ -281,13 +280,6 @@ package() {
cd "$builddir"
make FREERADIUS=1 -j1 install || return 1

# move default config to -doc package and use our own default config

mv "$pkgdir"/etc/kamailio/kamailio.cfg \
"$pkgdir"/usr/share/doc/kamailio/
install -m644 -D "$srcdir"/kamailio.cfg \
"$pkgdir"/etc/kamailio/kamailio.cfg

install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -d -o kamailio "$pkgdir"/var/run/kamailio
}
Expand Down Expand Up @@ -517,8 +509,7 @@ python() {
}


sha512sums="6b4c58fe628270f8927721813607ce080b5e257cca8ace8c7b286c77c7880be258c07f1c7fb5711449cfc1f8841468e6ca647cf2e28be7a8d3dbb316527b7198 kamailio-5.1.0.20170922-1fe5970.tar.gz
sha512sums="245411ac2445f4865cd09f56a3cfc4d10a64c9a1be90bfb35cfe80149e845c34c1a867ff661bbd9dac1c48a0416bc577b57ae6133edb69e2a2b43d3a2305ffde kamailio-5.1.0.20170930-c5ffc26.tar.gz
6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db 0001-kamdbctl.base.patch
af8362201957eae6b66baf7368c9ca884024209a396d77c5c52180c9aabe13772e9c6513e59721d39503e5bb7a8c1030f5c10301ea9055bddafb7f01ee2f3076 0004-src_core_tcp_read_c.patch
c1abf69b48847dc8c7ab0d11ef9adb531aa4635f9d44db6933981edc5a47df374664fb24867b19aa64abbcc9777bf1cd0360d9aea54e27b081065928c61e0f0b kamailio.cfg
cd6e3b677d803cd78561ad14d9b2589fd35ad0096f48047fdcb4ddc7d9103871357efba3b350946844cb53dbb081210746421fc420c22ac845b90251168a628e kamailio.initd"
106 changes: 0 additions & 106 deletions pkg/kamailio/alpine/kamailio.cfg

This file was deleted.

10 changes: 9 additions & 1 deletion pkg/kamailio/alpine_docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -60,6 +65,7 @@ extra_files() {
/var
/var/run
/run
/tmp
EOF
}

Expand Down Expand Up @@ -101,8 +107,10 @@ find_binaries() {
sort $FILELIST_BINARY | sort | uniq > $FILELIST_BINARY.new
mv -f $FILELIST_BINARY.new $FILELIST_BINARY

# Resolving simbolic links
# Resolving symbolic links and removing duplicates
cat $FILELIST_BINARY | xargs realpath > $FILELIST_BINARY.new
cat $FILELIST_BINARY.new >> $FILELIST_BINARY
sort $FILELIST_BINARY | sort | uniq > $FILELIST_BINARY.new
mv -f $FILELIST_BINARY.new $FILELIST_BINARY
}

Expand Down