pkg/kamailio: Updated RPM spec release extracting for "-rc" [skip ci]
authorSergey Safarov <s.safarov@gmail.com>
Fri, 11 Oct 2019 09:37:57 +0000 (12:37 +0300)
committerSergey Safarov <s.safarov@gmail.com>
Thu, 24 Oct 2019 19:46:51 +0000 (22:46 +0300)
pkg/kamailio/Makefile

index a221ff0..d6ce667 100644 (file)
@@ -7,7 +7,7 @@ $(error Please start "make cfg" first)
 endif
 
 RPMBUILD_TOP := /tmp/kamailio_rpmbuild
-RPM_VER = ${shell echo "$(RELEASE)" | sed -e "s/-dev[0-9]//" }
+RPM_VER = ${shell echo "$(RELEASE)" | sed -e "s/-dev[0-9]//" -e "s/-rc[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.]*"}
@@ -45,7 +45,7 @@ src.rpm: tar
             -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 ../..
+       mv ${RPMBUILD_TOP}/SRPMS/kamailio-${RPM_VER}*.src.rpm ../..
        rm -Rf ${RPMBUILD_TOP}
 
 # build rpm packages