Subject: [alpine-aports] [PATCH] main/kamailio add new mohqueue module not yet upstreamed

From: Nathan Angelacos <[email-masked]>
Date: Mon, 8 Jun 2015 17:25:16 +0000

---
 main/kamailio/APKBUILD | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/main/kamailio/APKBUILD b/main/kamailio/APKBUILD
index ccf91bb..5d75f0c 100644
--- a/main/kamailio/APKBUILD
+++ b/main/kamailio/APKBUILD
@@ -11,9 +11,10 @@ pkgname=kamailio
 _giturl="git://github.com/$pkgname/$pkgname.git"
 _gittag=HEAD
 
+_mohqueuever=v0.11
 
 pkgver=4.2.5
-pkgrel=0
+pkgrel=1
 [ -z "${_gitcommit}" ] && _suffix="_src" || _suffix="-${_gitcommit}"
 
 pkgdesc="Open Source SIP Server"
@@ -232,6 +233,7 @@ source="http://www.kamailio.org/pub/kamailio/$pkgver/src/kamailio-${pkgver}${_su
 
 	kamailio.cfg
 	kamailio.initd
+	https://github.com/rdboisvert/mohqueue/archive/${_mohqueuever}.zip
 	"
 
 _builddir="$srcdir"/${pkgname}-fb-${_ver}
@@ -254,6 +256,9 @@ snapshot() {
 _builddir="$srcdir"/$pkgname-$pkgver
 prepare() {
 	cd "$_builddir"
+
+	cp -r "$srcdir"/mohqueue-${_mohqueuever}/* modules/mohqueue/
+
 	for i in $source; do
 		case $i in
 		*.patch)
@@ -499,7 +504,8 @@ e9c0ba8192a1a4f2a08a2e2add20e3d7  kamailio-4.2-ipops-srv-query.patch
 841fa62c432c5d8aeb57ad70d2ec3030  default_ctl.patch
 d0052e6054884b9cec955af4480c7c85  kamctl_build.patch
 299706d97e30a4f0d9b4c873df422866  kamailio.cfg
-39dc9355fa7d8fec425d3b17c2fb26e0  kamailio.initd"
+39dc9355fa7d8fec425d3b17c2fb26e0  kamailio.initd
+409497792c30fd088f348830ada7b266  v0.11.zip"
 sha256sums="bc19d7a7cc0c3aceb68ac9bb64c2169d8713fe73a2267509954bd36f037810cc  kamailio-4.2.5_src.tar.gz
 d7e59be721ed0ad4621d404493b9a519708d801e9d4914b0164b819fa1abcd13  kamailio-4.2-backslash.patch
 b98555ff304b51b82c6cf7e01d757b15ea4f05bd2e603c84d4384df6a6be62b6  0001-musl-fixes.patch
@@ -508,7 +514,8 @@ b98555ff304b51b82c6cf7e01d757b15ea4f05bd2e603c84d4384df6a6be62b6  0001-musl-fixe
 755efa4ad126c672bc67c53268260b57f7da1f454cdc1a1601778ed7c7d5f0e5  default_ctl.patch
 e00eefed792acbc1ee6eca8fa7389f9973bd53b68fa7abc573f19f1ff26812a1  kamctl_build.patch
 8b742ff710ef67ff59ec07a260690ebcdda24fb6f0b7b64dc50433a1bacf99f2  kamailio.cfg
-ba928fa914feea2b95b8c659832e3fbea25eb6ac1ce56e4c23ff58c09f1ec3b8  kamailio.initd"
+ba928fa914feea2b95b8c659832e3fbea25eb6ac1ce56e4c23ff58c09f1ec3b8  kamailio.initd
+4d4e9ee56628d2d68bbdf0d821e5cdda69afeff604b52a1b617421c9a3e1b155  v0.11.zip"
 sha512sums="737303478eb69da8f0b9782005130a11ef8a9cefb1cb77b5d76e6c066121106e08398861e6096000522d7ddfd7dabd36238d1fdfd4b1e5631048955402393d26  kamailio-4.2.5_src.tar.gz
 a9bb1e8f9f373264b8351ddae099a36a46ddd46fdec09e468d297ba4f64bb4896e7d6e599da70a424e8a28695ab3f3b4ac940afab534593a6b9d08ae462f001a  kamailio-4.2-backslash.patch
 dea7ef2ccf01357576045ba375d41301e2447b4454324007c7ca1862322835c57045852017192ca5434b32dd1b7a2e9669209b7111889dab335b74f042d0f11f  0001-musl-fixes.patch
@@ -517,4 +524,5 @@ b5c048b6e06de0c7514c14d0ec99bbe939eaa956d9d9d3dd5f48b1bcbcff06dbd6498d384427253f
 2321d8afe29b53057ce21e0552dfb80fd6a0e7dc0caf3c4798a8b253518f4c8c546797302933373f4b055a4531329a36ee2d7117b0a88fe39cf153bfef91a656  default_ctl.patch
 4c2c9bde3a4c44feca2863bb03cb031aa55e1c3df21dc7c0acb3a392c34cb36d9a132bcbdf451a0624f8ec202152f1cf238c89280c32f1c04312ce80427a18c6  kamctl_build.patch
 c1abf69b48847dc8c7ab0d11ef9adb531aa4635f9d44db6933981edc5a47df374664fb24867b19aa64abbcc9777bf1cd0360d9aea54e27b081065928c61e0f0b  kamailio.cfg
-cd6e3b677d803cd78561ad14d9b2589fd35ad0096f48047fdcb4ddc7d9103871357efba3b350946844cb53dbb081210746421fc420c22ac845b90251168a628e  kamailio.initd"
+cd6e3b677d803cd78561ad14d9b2589fd35ad0096f48047fdcb4ddc7d9103871357efba3b350946844cb53dbb081210746421fc420c22ac845b90251168a628e  kamailio.initd
+d995ca71395aeae477bd76d4a698b1db64ee0630130f1f675edb1cb6bd6585cd0c681042fa8c2bf6a12283787bb096fe4e266369a36faf52af77b30056e329a5  v0.11.zip"
-- 
2.4.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Timo Teras <[email-masked]>
Date: Mon, 8 Jun 2015 21:54:22 +0300

On Mon,  8 Jun 2015 17:25:16 +0000
Nathan Angelacos <[email-masked]> wrote:

> @@ -232,6 +233,7 @@
> source="http://www.kamailio.org/pub/kamailio/$pkgver/src/kamailio-${pkgver}${_su 
>  	kamailio.cfg
>  	kamailio.initd
> +
> https://github.com/rdboisvert/mohqueue/archive/${_mohqueuever}.zip "

As minimum save-as feature should be used, so the file will not
conflict in builder cache. As in:
kamailio-mohqueue-${_mohqueuever}zip::https://github.com/rdboisvert/mohqueue/archive/${_mohqueuever}.zip

... but. I'm thinking it'd probably be more appropriate to just have
this as a patch? See below.

> +	cp -r "$srcdir"/mohqueue-${_mohqueuever}/* modules/mohqueue/

This would not work e.g. if there's files removed with the changes.
It'll also happily downgrade when kamailio gets upgraded to version
containing that version + potentially other fixes done in kamalio git
only.

Thanks.

---

---

From: Nathan Angelacos <[email-masked]>
Date: Mon, 08 Jun 2015 19:51:23 -0400

> this as a patch? See below. 

Done.  Except I didn't RTFM 
(http://wiki.alpinelinux.org/wiki/Creating_patches#Resend_an_updated_patch) 
regarding sending the next patch as "v2"

---