Module: kamailio
Branch: master
Commit: 6b044936db3d1eb9e901c2db5544925c764f9fc1
URL:
https://github.com/kamailio/kamailio/commit/6b044936db3d1eb9e901c2db5544925…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2017-12-12T08:34:00+01:00
Merge pull request #1347 from sergey-safarov/master
pkg/kamailio: Created Makefile for RPM packaging
---
Added: pkg/kamailio/Makefile
Added: pkg/kamailio/README.md
Modified: pkg/kamailio/obs/kamailio.spec
---
Diff:
https://github.com/kamailio/kamailio/commit/6b044936db3d1eb9e901c2db5544925…
Patch:
https://github.com/kamailio/kamailio/commit/6b044936db3d1eb9e901c2db5544925…
---
diff --git a/pkg/kamailio/Makefile b/pkg/kamailio/Makefile
new file mode 100644
index 0000000000..a72ca12ed8
--- /dev/null
+++ b/pkg/kamailio/Makefile
@@ -0,0 +1,27 @@
+include ../../src/Makefile.defs
+
+RPMBUILD_TOP := /tmp/rpmbuild
+DIST_ARCHIVE = ${shell echo "kamailio-$(RELEASE)_src.tar.gz" | sed -e
"s/-dev[0-9]//" }
+RPMBUILD_OPT= --define "_topdir $(RPMBUILD_TOP)"
+
+.PHONY: tar
+tar:
+ rm -f ../../kamailio*_src.tar.gz
+ $(MAKE) -C ../.. tar
+
+.PHONY: src.rpm
+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
+ rpmbuild ${RPMBUILD_OPT} -bs obs/kamailio.spec
+ mv ${RPMBUILD_TOP}/SRPMS/kamailio-$(RELEASE).*.src.rpm ../..
+ rm -Rf ${RPMBUILD_TOP}
+
+.PHONY: rpm
+rpm: src.rpm
+ mock ../../kamailio-$(RELEASE).*.src.rpm
+
+.PHONY: deb
+deb:
+ $(MAKE) -C ../.. deb
diff --git a/pkg/kamailio/README.md b/pkg/kamailio/README.md
new file mode 100644
index 0000000000..9faf9c38aa
--- /dev/null
+++ b/pkg/kamailio/README.md
@@ -0,0 +1,12 @@
+This directory contains packaging script for several operation systems
+
+To build RPM packages for CentOS, RHEL, Fedora, OpenSUSE and Oracle linux execure `make
rpm`
+When utility is finished, you can see dricetory where compiled RPM files located.
+Example:
+```
+Finish: rpmbuild kamailio-5.2.0-dev1.0.fc25.src.rpm
+Finish: build phase for kamailio-5.2.0-dev1.0.fc25.src.rpm
+INFO: Done(../../kamailio-5.2.0-dev1.0.fc25.src.rpm) Config(default) 8 minutes 30
seconds
+INFO: Results and/or logs in: /var/lib/mock/fedora-25-x86_64/result
+Finish: run
+```
\ No newline at end of file
diff --git a/pkg/kamailio/obs/kamailio.spec b/pkg/kamailio/obs/kamailio.spec
index 0f60a0a8a0..5c98924046 100644
--- a/pkg/kamailio/obs/kamailio.spec
+++ b/pkg/kamailio/obs/kamailio.spec
@@ -1,6 +1,6 @@
%define name kamailio
-%define ver 5.0.3
-%define rel dev0.0%{dist}
+%define ver 5.2.0
+%define rel dev1.0%{dist}
%if 0%{?fedora} == 24
%define dist_name fedora