[sr-dev] git:master:558298dd: pkg/kamailio: Created Makefile for RPM packaging

Sergey Safarov s.safarov at gmail.com
Tue Dec 12 08:34:05 CET 2017


Module: kamailio
Branch: master
Commit: 558298dd560df320aed12d38cf181a106e94445d
URL: https://github.com/kamailio/kamailio/commit/558298dd560df320aed12d38cf181a106e94445d

Author: Sergey Safarov <s.safarov at gmail.com>
Committer: Sergey Safarov <s.safarov at gmail.com>
Date: 2017-11-30T12:36:16+03:00

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/558298dd560df320aed12d38cf181a106e94445d.diff
Patch: https://github.com/kamailio/kamailio/commit/558298dd560df320aed12d38cf181a106e94445d.patch

---

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




More information about the sr-dev mailing list