#!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- # Copyright 2016-2018 Jonas Smedegaard # Description: Main Debian packaging script for baresip # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . include /usr/share/cdbs/1/class/makefile.mk include /usr/share/cdbs/1/rules/debhelper.mk # Run this to update arch list: debian/rules clean DEB_MAINTAINER_MODE=1 # (in maintainer mode only, uses network and messes with control file) ifneq (,$(DEB_MAINTAINER_MODE)) debian/control:: debian/archs-update endif ARCHS_directfb := $(shell cat debian/ARCHS_directfb) # Needs and module hints for core package core-deps = asound2 avahi-client codec2 directfb jack gsm1 opus core-deps += opencore-amrnb opencore-amrwb png sdl2 sndfile1 sndio core-deps += spandsp speex speexdsp twolame vpx ssl mosquitto core-deps-extra = libevdev-dev [linux-any] core-deps-extra +=, portaudio19-dev core-mods-extra = b2bua codec2 echo snapshot sndio core-mods-extra += $(if $(filter $(ARCHS_directfb),$(DEB_HOST_ARCH)),directfb) CDBS_BUILD_DEPENDS +=, $(patsubst %,$(comma) lib%-dev,$(core-deps)) CDBS_BUILD_DEPENDS +=, $(core-deps-extra), pkg-config CDBS_BUILD_DEPENDS +=, libre-dev (>= 0.5.7) CDBS_BUILD_DEPENDS +=, librem-dev (>= 0.5.2) EXTRA_MODULES += $(core-mods-extra) CDBS_DEPENDS_baresip +=, baresip-core # Needs and module hints for module packages ffmpeg-deps = avcodec avformat avdevice swscale x265 ffmpeg-mods = avformat avcodec h265 ffmpeg-mods-extra = swscale gstreamer-deps = gstreamer1.0 gstreamer-plugins-base1.0 gstreamer-mods = gst1 gst_video1 gtk-deps = gtk2.0 gtk-mods = gtk x11-deps = cairo2 omxil-bellagio mpg123 pulse xext x11 x11-mods = cairo omx pulse rst sdl2 vidinfo x11 x11grab define MODULE_template = CDBS_BUILD_DEPENDS +=, $$(patsubst %,$$(comma) lib%-dev,$$($1-deps)) EXTRA_MODULES += $$($1-mods-extra) DEB_DH_INSTALL_ARGS_baresip-$1 = \ $$(patsubst %,usr/lib/baresip/modules/%.so,$$($1-mods) $$($1-mods-extra)) \ usr/lib/baresip/modules # Do not install these modules as part of baresip DEB_DH_INSTALL_ARGS_baresip-core += \ $$(patsubst %,-X%.so,$$($1-mods) $$($1-mods-extra)) CDBS_RECOMMENDS_baresip +=, baresip-$1 CDBS_RECOMMENDS_baresip-core +=, avahi-daemon CDBS_SUGGESTS_baresip-core +=, baresip-$1 CDBS_ENHANCES_baresip-$1 = baresip-core endef $(foreach module,ffmpeg gstreamer gtk x11,\ $(eval $(call MODULE_template,$(module)))) DEB_MAKE_EXTRA_ARGS = V=1 PREFIX=/usr RELEASE=1 \ EXTRA_MODULES="$(EXTRA_MODULES)" \ EXTRA_CFLAGS="$(CFLAGS) $(CPPFLAGS)" \ EXTRA_LFLAGS="$(LDFLAGS)" \ $(DEB_MAKE_PARALLEL) DEB_MAKE_BUILD_TARGET = info all DEB_MAKE_CHECK_TARGET = test DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(cdbs_make_curdestdir) DEB_INSTALL_CHANGELOGS_ALL = docs/ChangeLog DEB_INSTALL_DOCS_ALL += README.md docs/TODO DEB_INSTALL_EXAMPLES_baresip-core = docs/examples/* # LIBDIR for installation LIBDIR=/usr/lib