-
Notifications
You must be signed in to change notification settings - Fork 937
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1637 from sergey-safarov/spec_update
[5.1] pkg/docker: Updated submodule
- Loading branch information
Showing
4 changed files
with
159 additions
and
4 deletions.
There are no files selected for viewing
Submodule docker
updated
3 files
+1 −1 | alpine/Dockerfile.debug | |
+3 −0 | alpine/README.md | |
+2 −9 | alpine/build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Makefile to help building packages | ||
|
||
ifneq ("$(wildcard ../../src/config.mak)","") | ||
include ../../src/Makefile.defs | ||
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]//" } | ||
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} | ||
|
||
# generate config.mak and modules.lst | ||
.PHONY: cfg | ||
cfg: | ||
$(MAKE) -C ../../src cfg | ||
|
||
# generate the tarball with source tree | ||
.PHONY: tar | ||
tar: | ||
rm -f ../../kamailio*_src.tar.gz | ||
$(MAKE) -C ../.. tar | ||
|
||
# build alpine apk packages | ||
.PHONY: apk | ||
apk: | ||
echo Building alpine packages using commit ${GIT_TAG} | ||
sed -e "s/^_gitcommit=.*/_gitcommit=${GIT_TAG}/" \ | ||
-e "s/^pkgver=.*/pkgver=${APK_VERSION}/" \ | ||
-i alpine/APKBUILD | ||
cd alpine && abuild snapshot | ||
@echo \"abuild\" cannot be start from Makefile please start manualy \"cd alpine \&\& abuild -r\" | ||
|
||
# build source rpm package | ||
.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} | ||
|
||
# build rpm packages | ||
.PHONY: rpm | ||
rpm: src.rpm | ||
mock ../../kamailio-$(RELEASE).*.src.rpm | ||
|
||
# build debian packages | ||
.PHONY: deb | ||
deb: | ||
$(MAKE) -C ../.. deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Kamailio Packaging # | ||
|
||
The `pkg/kamailio/` directory contains packaging specs for several operation systems. | ||
|
||
Currently the DEB and RPM specs are actively maintained, the rest are still kept | ||
in case someone wants to pick up and update. | ||
|
||
## DEBS ## | ||
|
||
DEB packages can be generated for several flavours of Debian and Ubuntu | ||
operating systems. | ||
|
||
To generate deb packages, run: | ||
|
||
``` | ||
make deb | ||
``` | ||
|
||
This is using a generic Debian spec. To select a specific Debian or Ubuntu, go | ||
to root folder of Kamailio source tree, create a `debian` symlink to the | ||
desired distro from `pkg/kamailio/deb/` and run `make deb`. For example, | ||
on a Debian Stretch (9.x), do: | ||
|
||
``` | ||
ln -s pkg/kamailio/deb/stretch debian | ||
make deb | ||
``` | ||
|
||
The DEB files are generated in the parent folder. | ||
|
||
## RPMS ## | ||
|
||
There are couple of variants of RPM specs. The most actual one is stored in `obs/` | ||
subfolder and has conditional options to build for many operating systems that | ||
use RPM for packages (e.g., CenOS, RedHat, Fedora, OpenSuse). The folders with | ||
the name reflecting an operating system might be older, some not really | ||
maintained. | ||
|
||
To build RPM packages for CentOS, RHEL, Fedora, OpenSUSE and Oracle linux execute | ||
|
||
``` | ||
make rpm | ||
``` | ||
|
||
When utility is finished, you can see the directory where compiled RPM files | ||
are 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 | ||
``` | ||
|
||
The `obs` folder aims at using it also in OpenSuse Build Service. | ||
|
||
* https://build.opensuse.org | ||
|
||
Kamailio build project on OBS is at: | ||
|
||
* https://build.opensuse.org/project/show/home:kamailio | ||
|
||
## Gentoo ## | ||
|
||
Not actively mentained, still fairly recent updated. | ||
|
||
## BSD ## | ||
|
||
There are specs for FreeBSD, NetBST and OpenBSD. They are not actively | ||
maintained, being quite old. | ||
|
||
## Solaris ## | ||
|
||
Not actively maintained, being quite old. | ||
|
||
## Alpine Linux ## | ||
|
||
To build apk packages please execute | ||
|
||
``` | ||
make cfg | ||
make apk | ||
cd alpine && abuild -r | ||
``` | ||
|
||
NOTICE: Now `abuild -r` command is failed when called from `Makefile`. This reason why need to execute command from shell. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters