forked from Mirrors/freeswitch
77f52bb6a8
debian/bootstrap.sh: * only build one of freeswitch-sysvinit or freeswitch-systemd * squeeze is removed from supported releases * added stretch to supported releases * avoid_mods_wheezy extended to modules which fail to build on wheezy * use systemd by default for future distros * new command-line option -v to enforce sysvinit * added dependency on dh-systemd for systemd-powered distros * freeswitch-init is now a virtual package * freeswitch-sysvinit and freeswitch-systemd are set to conflict with each other debian/freeswitch.postinst: * no need to call systemctl explicitly. dh-systemd does it in a standard way debian/rules: * integrated dh-systemd in override_dh_installinit debian/freeswitch-systemd.freeswitch.default renamed to freeswitch-sysvinit.freeswitch.default: * /etc/default/freeswitch is not installed by freeswitch-systemd, but still respected if there is a need to modify the startup options debian/freeswitch-systemd.freeswitch.service: * proper expansion of DAEMON_OPTS
141 lines
3.4 KiB
Makefile
Executable File
141 lines
3.4 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
# -*- mode:makefile -*-
|
|
##### Author: Travis Cross <tc@traviscross.com>
|
|
|
|
export DH_VERBOSE=1
|
|
export VERBOSE=1
|
|
export V=1
|
|
|
|
FS_CC?=gcc
|
|
FS_CXX?=g++
|
|
FS_CPPFLAGS?=-D_FORTIFY_SOURCE=2
|
|
FS_CFLAGS?=-g3 -O2 -fPIC -fstack-protector --param=ssp-buffer-size=4
|
|
FS_CXXFLAGS?=$(FS_CFLAGS)
|
|
FS_LDFLAGS?=-Wl,-z,relro
|
|
export PATH?=/usr/lib/ccache:/usr/sbin:/usr/bin:/sbin:/bin
|
|
export CC:=$(FS_CC)
|
|
export CXX:=$(FS_CXX)
|
|
export CPPFLAGS:=$(FS_CPPFLAGS)
|
|
export CFLAGS:=$(FS_CFLAGS)
|
|
export CXXFLAGS:=$(FS_CXXFLAGS)
|
|
export LDFLAGS:=$(FS_LDFLAGS)
|
|
|
|
NJOBS=1
|
|
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
NJOBS=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
endif
|
|
|
|
show_vars= \
|
|
echo; \
|
|
echo "Making target $@"; \
|
|
echo "PATH='$(PATH)'"; \
|
|
echo "CC='$(CC)'"; \
|
|
echo "CXX='$(CXX)'"; \
|
|
echo "CPPFLAGS='$(CPPFLAGS)'"; \
|
|
echo "CFLAGS='$(CFLAGS)'"; \
|
|
echo "CXXFLAGS='$(CXXFLAGS)'"; \
|
|
echo "LDFLAGS='$(LDFLAGS)'"; \
|
|
echo "CCACHE_DIR='$(CCACHE_DIR)'"; \
|
|
echo;
|
|
|
|
binary:
|
|
@$(call show_vars)
|
|
dh $@
|
|
binary-arch:
|
|
@$(call show_vars)
|
|
dh $@
|
|
binary-indep:
|
|
@$(call show_vars)
|
|
dh $@
|
|
build-arch:
|
|
@$(call show_vars)
|
|
dh $@
|
|
build-indep:
|
|
@$(call show_vars)
|
|
dh $@
|
|
build: debian/.stamp-bootstrap
|
|
@$(call show_vars)
|
|
dh $@
|
|
clean:
|
|
dh $@
|
|
|
|
override_dh_auto_clean:
|
|
|
|
.stamp-bootstrap:
|
|
@$(call show_vars)
|
|
[ -f ./bootstrap.sh ] && ./bootstrap.sh -j || ./rebootstrap.sh -j
|
|
touch $@
|
|
|
|
.stamp-configure: .stamp-bootstrap
|
|
@$(call show_vars)
|
|
touch noreg
|
|
cp debian/modules_.conf modules.conf
|
|
./configure -C --enable-portable-binary --disable-dependency-tracking \
|
|
--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
|
|
--prefix=/usr --localstatedir=/var --sysconfdir=/etc \
|
|
--with-gnu-ld --with-python --with-erlang --with-openssl \
|
|
--enable-core-odbc-support --enable-zrtp \
|
|
--enable-core-pgsql-support \
|
|
--enable-static-v8 --disable-parallel-build-v8
|
|
touch $@
|
|
|
|
override_dh_auto_configure: .stamp-configure
|
|
|
|
.stamp-build: .stamp-configure
|
|
@$(call show_vars)
|
|
make -j$(NJOBS)
|
|
make -C libs/esl pymod
|
|
touch $@
|
|
|
|
override_dh_auto_build: .stamp-build
|
|
|
|
override_dh_auto_test:
|
|
|
|
override_dh_strip:
|
|
dh_strip -a -k
|
|
./debian/util.sh create-dbg-pkgs
|
|
|
|
override_dh_auto_install:
|
|
dh_auto_install
|
|
dh_auto_install -- -C libs/esl pymod-install
|
|
rm -f debian/tmp/usr/share/freeswitch/grammar/model/communicator/COPYING
|
|
|
|
override_dh_installinit:
|
|
if [ `cat debian/freeswitch-init.provided_by` = freeswitch-systemd ]; then \
|
|
dh_systemd_enable -pfreeswitch-systemd --name=freeswitch; \
|
|
dh_systemd_start -pfreeswitch-systemd --name=freeswitch; \
|
|
dh_systemd_enable -pfreeswitch-all --name=freeswitch; \
|
|
dh_systemd_start -pfreeswitch-all --name=freeswitch; \
|
|
else \
|
|
dh_installinit -pfreeswitch-sysvinit --name=freeswitch; \
|
|
dh_installinit -pfreeswitch-all --name=freeswitch; \
|
|
fi
|
|
|
|
override_dh_makeshlibs:
|
|
dh_makeshlibs
|
|
sed \
|
|
-e '/^libfreeswitch 1/{s/freeswitch-all/libfreeswitch1/g}' \
|
|
-i debian/freeswitch-all/DEBIAN/shlibs
|
|
|
|
debian-bootstrap: debian/.stamp-bootstrap
|
|
debian/.stamp-bootstrap:
|
|
(cd debian && ./bootstrap.sh)
|
|
touch $@
|
|
|
|
build-depends: debian/.stamp-build-depends
|
|
debian/.stamp-build-depends:
|
|
./debian/util.sh install-build-depends
|
|
touch $@
|
|
|
|
binary-basetest:
|
|
@$(call show_vars)
|
|
echo "applications/mod_commands" > debian/modules.conf
|
|
(cd debian && ./bootstrap.sh)
|
|
dh binary
|
|
|
|
binary-quicktest:
|
|
@$(call show_vars)
|
|
echo "applications/mod_commands" > debian/modules.conf
|
|
(cd debian && ./bootstrap.sh)
|
|
dh binary
|