Browse code

pkg/kamailio: fixed -pre release RPM packaging

Sergey Safarov authored on 22/06/2020 15:51:56
Showing 1 changed files
... ...
@@ -7,7 +7,7 @@ $(error Please start "make cfg" first)
7 7
 endif
8 8
 
9 9
 RPMBUILD_TOP := /tmp/kamailio_rpmbuild
10
-RPM_VER = ${shell echo "$(RELEASE)" | sed -e "s/-dev[0-9]//" -e "s/-rc[0-9]//"}
10
+RPM_VER = ${shell echo "$(RELEASE)" | sed -e "s/-dev[0-9]//" -e "s/-rc[0-9]//" -e "s/-pre[0-9]//"}
11 11
 RPM_REL = ${shell echo "$(RELEASE)." | grep -o -P "dev[0-9]\." }
12 12
 DIST_ARCHIVE = ${shell echo "kamailio-$(RPM_VER)_src.tar.gz"}
13 13
 APK_VERSION = ${shell echo "$(RELEASE)" | grep -o "^[0-9.]*"}
Browse code

pkg/kamailio: Updated RPM spec release extracting for "-rc" [skip ci]

Sergey Safarov authored on 11/10/2019 09:37:57
Showing 1 changed files
... ...
@@ -7,7 +7,7 @@ $(error Please start "make cfg" first)
7 7
 endif
8 8
 
9 9
 RPMBUILD_TOP := /tmp/kamailio_rpmbuild
10
-RPM_VER = ${shell echo "$(RELEASE)" | sed -e "s/-dev[0-9]//" }
10
+RPM_VER = ${shell echo "$(RELEASE)" | sed -e "s/-dev[0-9]//" -e "s/-rc[0-9]//"}
11 11
 RPM_REL = ${shell echo "$(RELEASE)." | grep -o -P "dev[0-9]\." }
12 12
 DIST_ARCHIVE = ${shell echo "kamailio-$(RPM_VER)_src.tar.gz"}
13 13
 APK_VERSION = ${shell echo "$(RELEASE)" | grep -o "^[0-9.]*"}
... ...
@@ -45,7 +45,7 @@ src.rpm: tar
45 45
             -e 's/setup -n %{name}-%{ver}/setup -n kamailio-$(RELEASE)/' \
46 46
             -i obs/kamailio.spec
47 47
 	rpmbuild ${RPMBUILD_OPT} -bs obs/kamailio.spec
48
-	mv ${RPMBUILD_TOP}/SRPMS/kamailio-$(RELEASE)*.src.rpm ../..
48
+	mv ${RPMBUILD_TOP}/SRPMS/kamailio-${RPM_VER}*.src.rpm ../..
49 49
 	rm -Rf ${RPMBUILD_TOP}
50 50
 
51 51
 # build rpm packages
Browse code

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

Sergey Safarov authored on 27/08/2019 18:03:33
Showing 1 changed files
... ...
@@ -6,8 +6,10 @@ else ifneq ($(MAKECMDGOALS),cfg)
6 6
 $(error Please start "make cfg" first)
7 7
 endif
8 8
 
9
-RPMBUILD_TOP := /tmp/rpmbuild
10
-DIST_ARCHIVE = ${shell echo "kamailio-$(RELEASE)_src.tar.gz" | sed -e "s/-dev[0-9]//" }
9
+RPMBUILD_TOP := /tmp/kamailio_rpmbuild
10
+RPM_VER = ${shell echo "$(RELEASE)" | sed -e "s/-dev[0-9]//" }
11
+RPM_REL = ${shell echo "$(RELEASE)." | grep -o -P "dev[0-9]\." }
12
+DIST_ARCHIVE = ${shell echo "kamailio-$(RPM_VER)_src.tar.gz"}
11 13
 APK_VERSION = ${shell echo "$(RELEASE)" | grep -o "^[0-9.]*"}
12 14
 RPMBUILD_OPT= --define "_topdir $(RPMBUILD_TOP)"
13 15
 GIT_TAG = ${shell git rev-parse HEAD 2> /dev/null}
... ...
@@ -38,7 +40,10 @@ apk:
38 40
 src.rpm: tar
39 41
 	mkdir -p ${RPMBUILD_TOP}/SOURCES
40 42
 	mv ../../kamailio-$(RELEASE)_src.tar.gz ${RPMBUILD_TOP}/SOURCES/${DIST_ARCHIVE}
41
-	sed -i -e 's/setup -n %{name}-%{ver}/setup -n kamailio-$(RELEASE)/' obs/kamailio.spec
43
+	sed -e 's/%define ver .*/%define ver ${RPM_VER}/' \
44
+            -e 's/%define rel .*/%define rel ${RPM_REL}0%{dist}/' \
45
+            -e 's/setup -n %{name}-%{ver}/setup -n kamailio-$(RELEASE)/' \
46
+            -i obs/kamailio.spec
42 47
 	rpmbuild ${RPMBUILD_OPT} -bs obs/kamailio.spec
43 48
 	mv ${RPMBUILD_TOP}/SRPMS/kamailio-$(RELEASE)*.src.rpm ../..
44 49
 	rm -Rf ${RPMBUILD_TOP}
Browse code

pkg/kamailio: Fixed db_redis RPM packaging after ee95675177466a7ae5f9575db300df32e42661f2 Please look ticket #1676

Sergey Safarov authored on 14/10/2018 15:51:35 • Henning Westerholt committed on 14/10/2018 19:16:34
Showing 1 changed files
... ...
@@ -40,7 +40,7 @@ src.rpm: tar
40 40
 	mv ../../kamailio-$(RELEASE)_src.tar.gz ${RPMBUILD_TOP}/SOURCES/${DIST_ARCHIVE}
41 41
 	sed -i -e 's/setup -n %{name}-%{ver}/setup -n kamailio-$(RELEASE)/' obs/kamailio.spec
42 42
 	rpmbuild ${RPMBUILD_OPT} -bs obs/kamailio.spec
43
-	mv ${RPMBUILD_TOP}/SRPMS/kamailio-$(RELEASE).*.src.rpm ../..
43
+	mv ${RPMBUILD_TOP}/SRPMS/kamailio-$(RELEASE)*.src.rpm ../..
44 44
 	rm -Rf ${RPMBUILD_TOP}
45 45
 
46 46
 # build rpm packages
Browse code

pkg/kamailio/alpine: Added function to build package from local git tree

Sergey Safarov authored on 01/09/2018 19:55:32
Showing 1 changed files
... ...
@@ -1,10 +1,21 @@
1 1
 # Makefile to help building packages
2 2
 
3
+ifneq ("$(wildcard ../../src/config.mak)","")
3 4
 include ../../src/Makefile.defs
5
+else ifneq ($(MAKECMDGOALS),cfg)
6
+$(error Please start "make cfg" first)
7
+endif
4 8
 
5 9
 RPMBUILD_TOP := /tmp/rpmbuild
6 10
 DIST_ARCHIVE = ${shell echo "kamailio-$(RELEASE)_src.tar.gz" | sed -e "s/-dev[0-9]//" }
11
+APK_VERSION = ${shell echo "$(RELEASE)" | grep -o "^[0-9.]*"}
7 12
 RPMBUILD_OPT= --define "_topdir $(RPMBUILD_TOP)"
13
+GIT_TAG = ${shell git rev-parse HEAD 2> /dev/null}
14
+
15
+# generate config.mak and modules.lst
16
+.PHONY: cfg
17
+cfg:
18
+	$(MAKE) -C ../../src cfg
8 19
 
9 20
 # generate the tarball with source tree
10 21
 .PHONY: tar
... ...
@@ -12,6 +23,16 @@ tar:
12 23
 	rm -f ../../kamailio*_src.tar.gz
13 24
 	$(MAKE) -C ../.. tar
14 25
 
26
+# build alpine apk packages
27
+.PHONY: apk
28
+apk:
29
+	echo Building alpine packages using commit ${GIT_TAG}
30
+	sed -e "s/^_gitcommit=.*/_gitcommit=${GIT_TAG}/" \
31
+	    -e "s/^pkgver=.*/pkgver=${APK_VERSION}/" \
32
+	    -i alpine/APKBUILD
33
+	cd alpine && abuild snapshot
34
+	@echo \"abuild\" cannot be start from Makefile please start manualy \"cd alpine \&\& abuild -r\"
35
+
15 36
 # build source rpm package
16 37
 .PHONY: src.rpm
17 38
 src.rpm: tar
Browse code

pkg/kamailio: updated to the docs about building the packages

Daniel-Constantin Mierla authored on 12/12/2017 08:09:56
Showing 1 changed files
... ...
@@ -1,14 +1,18 @@
1
+# Makefile to help building packages
2
+
1 3
 include ../../src/Makefile.defs
2 4
 
3 5
 RPMBUILD_TOP := /tmp/rpmbuild
4 6
 DIST_ARCHIVE = ${shell echo "kamailio-$(RELEASE)_src.tar.gz" | sed -e "s/-dev[0-9]//" }
5 7
 RPMBUILD_OPT= --define "_topdir $(RPMBUILD_TOP)"
6 8
 
9
+# generate the tarball with source tree
7 10
 .PHONY: tar
8 11
 tar:
9 12
 	rm -f ../../kamailio*_src.tar.gz
10 13
 	$(MAKE) -C ../.. tar
11 14
 
15
+# build source rpm package
12 16
 .PHONY: src.rpm
13 17
 src.rpm: tar
14 18
 	mkdir -p ${RPMBUILD_TOP}/SOURCES
... ...
@@ -18,10 +22,12 @@ src.rpm: tar
18 22
 	mv ${RPMBUILD_TOP}/SRPMS/kamailio-$(RELEASE).*.src.rpm ../..
19 23
 	rm -Rf ${RPMBUILD_TOP}
20 24
 
25
+# build rpm packages
21 26
 .PHONY: rpm
22 27
 rpm: src.rpm
23 28
 	mock ../../kamailio-$(RELEASE).*.src.rpm
24 29
 
30
+# build debian packages
25 31
 .PHONY: deb
26 32
 deb:
27 33
 	$(MAKE) -C ../.. deb
Browse code

pkg/kamailio: Created Makefile for RPM packaging

Sergey Safarov authored on 27/11/2017 15:44:48
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,27 @@
1
+include ../../src/Makefile.defs
2
+
3
+RPMBUILD_TOP := /tmp/rpmbuild
4
+DIST_ARCHIVE = ${shell echo "kamailio-$(RELEASE)_src.tar.gz" | sed -e "s/-dev[0-9]//" }
5
+RPMBUILD_OPT= --define "_topdir $(RPMBUILD_TOP)"
6
+
7
+.PHONY: tar
8
+tar:
9
+	rm -f ../../kamailio*_src.tar.gz
10
+	$(MAKE) -C ../.. tar
11
+
12
+.PHONY: src.rpm
13
+src.rpm: tar
14
+	mkdir -p ${RPMBUILD_TOP}/SOURCES
15
+	mv ../../kamailio-$(RELEASE)_src.tar.gz ${RPMBUILD_TOP}/SOURCES/${DIST_ARCHIVE}
16
+	sed -i -e 's/setup -n %{name}-%{ver}/setup -n kamailio-$(RELEASE)/' obs/kamailio.spec
17
+	rpmbuild ${RPMBUILD_OPT} -bs obs/kamailio.spec
18
+	mv ${RPMBUILD_TOP}/SRPMS/kamailio-$(RELEASE).*.src.rpm ../..
19
+	rm -Rf ${RPMBUILD_TOP}
20
+
21
+.PHONY: rpm
22
+rpm: src.rpm
23
+	mock ../../kamailio-$(RELEASE).*.src.rpm
24
+
25
+.PHONY: deb
26
+deb:
27
+	$(MAKE) -C ../.. deb