[sr-dev] git:5.2:116fb010: pkg/kamailio: added rpm spec version and release configuration [skip ci]

Sergey Safarov s.safarov at gmail.com
Thu Oct 24 22:08:48 CEST 2019


Module: kamailio
Branch: 5.2
Commit: 116fb0108b0f422cff955a37ce6b16de94f22c64
URL: https://github.com/kamailio/kamailio/commit/116fb0108b0f422cff955a37ce6b16de94f22c64

Author: Sergey Safarov <s.safarov at gmail.com>
Committer: Sergey Safarov <s.safarov at gmail.com>
Date: 2019-10-24T23:08:03+03:00

pkg/kamailio: added rpm spec version and release configuration [skip ci]

(cherry picked from commit ab0a69eb01953be97ccdfdb230e5af06bac9649c)

---

Modified: pkg/kamailio/Makefile

---

Diff:  https://github.com/kamailio/kamailio/commit/116fb0108b0f422cff955a37ce6b16de94f22c64.diff
Patch: https://github.com/kamailio/kamailio/commit/116fb0108b0f422cff955a37ce6b16de94f22c64.patch

---

diff --git a/pkg/kamailio/Makefile b/pkg/kamailio/Makefile
index 63c024c158..a221ff085c 100644
--- a/pkg/kamailio/Makefile
+++ b/pkg/kamailio/Makefile
@@ -6,8 +6,10 @@ else ifneq ($(MAKECMDGOALS),cfg)
 $(error Please start "make cfg" first)
 endif
 
-RPMBUILD_TOP := /tmp/rpmbuild
-DIST_ARCHIVE = ${shell echo "kamailio-$(RELEASE)_src.tar.gz" | sed -e "s/-dev[0-9]//" }
+RPMBUILD_TOP := /tmp/kamailio_rpmbuild
+RPM_VER = ${shell echo "$(RELEASE)" | sed -e "s/-dev[0-9]//" }
+RPM_REL = ${shell echo "$(RELEASE)." | grep -o -P "dev[0-9]\." }
+DIST_ARCHIVE = ${shell echo "kamailio-$(RPM_VER)_src.tar.gz"}
 APK_VERSION = ${shell echo "$(RELEASE)" | grep -o "^[0-9.]*"}
 RPMBUILD_OPT= --define "_topdir $(RPMBUILD_TOP)"
 GIT_TAG = ${shell git rev-parse HEAD 2> /dev/null}
@@ -38,7 +40,10 @@ apk:
 src.rpm: tar
 	mkdir -p ${RPMBUILD_TOP}/SOURCES
 	mv ../../kamailio-$(RELEASE)_src.tar.gz ${RPMBUILD_TOP}/SOURCES/${DIST_ARCHIVE}
-	sed -i -e 's/setup -n %{name}-%{ver}/setup -n kamailio-$(RELEASE)/' obs/kamailio.spec
+	sed -e 's/%define ver .*/%define ver ${RPM_VER}/' \
+            -e 's/%define rel .*/%define rel ${RPM_REL}0%{dist}/' \
+            -e 's/setup -n %{name}-%{ver}/setup -n kamailio-$(RELEASE)/' \
+            -i obs/kamailio.spec
 	rpmbuild ${RPMBUILD_OPT} -bs obs/kamailio.spec
 	mv ${RPMBUILD_TOP}/SRPMS/kamailio-$(RELEASE)*.src.rpm ../..
 	rm -Rf ${RPMBUILD_TOP}




More information about the sr-dev mailing list