#!/usr/bin/make -f # Sample debian/rules that uses debhelper. # This file is public domain software, originally written by Joey Hess. # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 export DH_OPTIONS export DEB_DH_INSTALL_SOURCEDIR=debian/tmp export PASSTHRU_CODEC_MODULES=codecs/mod_g729 codecs/mod_g723_1 codecs/mod_amr codecs/mod_amrwb # Modules listed by those built by default, then those that are added in this package export APPLICATION_MODULES_AE= applications/mod_avmd applications/mod_callcenter applications/mod_cidlookup applications/mod_cluechoo \ applications/mod_commands applications/mod_conference applications/mod_db applications/mod_directory \ applications/mod_distributor applications/mod_dptools applications/mod_easyroute applications/mod_enum \ applications/mod_esf applications/mod_expr export APPLICATION_MODULES_FM= applications/mod_fifo applications/mod_fsv applications/mod_hash applications/mod_lcr applications/mod_limit \ applications/mod_memcache export APPLICATION_MODULES_NY= applications/mod_nibblebill applications/mod_redis applications/mod_rss applications/mod_snom \ applications/mod_spandsp applications/mod_spy applications/mod_stress \ applications/mod_valet_parking applications/mod_vmd applications/mod_voicemail export APPLICATIONS_MODULES= $(APPLICATION_MODULES_AE) $(APPLICATION_MODULES_FM) $(APPLICATION_MODULES_NY) $(APPLICATION_MODULES_VZ) export ASR_TTS_MODULES= asr_tts/mod_pocketsphinx asr_tts/mod_unimrcp export CODECS_MODULES= codecs/mod_bv codecs/mod_h26x codecs/mod_speex codecs/mod_celt codecs/mod_codec2 codecs/mod_ilbc codecs/mod_mp4v \ codecs/mod_silk codecs/mod_siren codecs/mod_theora export DIALPLANS_MODULES= dialplans/mod_dialplan_asterisk dialplans/mod_dialplan_directory dialplans/mod_dialplan_xml export ENDPOINTS_MODULES= endpoints/mod_dingaling endpoints/mod_portaudio endpoints/mod_sofia \ endpoints/mod_loopback ../../libs/frieetdm/mod_freetdm endpoints/mod_skypopen \ endpoints/mod_skinny export EVENT_HANDLERS_MODULES=event_handlers/mod_event_multicast event_handlers/mod_event_socket event_handlers/mod_cdr_csv export FORMATS_MODULES= formats/mod_file_string formats/mod_local_stream formats/mod_native_file formats/mod_portaudio_stream \ formats/mod_shout formats/mod_sndfile formats/mod_tone_stream export LANGUAGES_MODULES=languages/mod_spidermonkey languages/mod_perl languages/mod_lua languages/mod_python export LOGGERS_MODULES=loggers/mod_console loggers/mod_logfile loggers/mod_syslog export SAY_MODULES=say/mod_say_en say/mod_say_it say/mod_say_de say/mod_say_fr say/mod_say_es say/mod_say_nl say/mod_say_ru export XML_INT_MODULES=xml_int/mod_xml_rpc xml_int/mod_xml_curl xml_int/mod_xml_cdr export MYMODULES=$(PASSTHRU_CODEC_MODULES) $(APPLICATIONS_MODULES) $(ASR_TTS_MODULES) $(CODECS_MODULES) $(DIALPLANS_MODULES) $(ENDPOINTS_MODULES) $(EVENT_HANDLERS_MODULES) $(FORMATS_MODULES) $(LANGUAGES_MODULES) $(LOGGERS_MODULES) $(SAY_MODULES) $(XML_INT_MODULES) export MODULES=$(MYMODULES) ifndef AUTOCONF AUTOCONFS := $(wildcard /usr/bin/autoconf*) AUTOCONF = $(shell which autoconf) ifneq (,$(findstring 2.50,${AUTOCONFS})) AUTOCONF = /usr/bin/autoconf2.50 endif endif # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -ggdb MOD_CFLAGS = -ggdb FEATURES = --enable-core-libedit-support --enable-core-odbc-support --with-libcurl --with-openssl ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) FEATURES += --disable-optimization endif config.status: configure dh_testdir rm -f modules.conf touch modules.conf echo $(MODULES) for i in $(MODULES); do echo $$i >> modules.conf; done ./configure --prefix=/opt/freeswitch --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) ${FEATURES} configure: if test ! -f Makefile.in ; then \ if test -f ./bootstrap.sh ; then \ AUTOCONF=${AUTOCONF} ./bootstrap.sh ; \ else \ echo "No Makefile.in and no known way to bootstrap." ; \ exit 1; \ fi; \ fi; build: build-stamp build-stamp: config.status dh_testdir $(MAKE) touch $@ clean: dh_testdir dh_testroot rm -f build-stamp -$(MAKE) update-clean ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub build/config/config.sub endif ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess build/config/config.guess endif rm -f config.status rm -f */*/config.status rm -f */*/*/config.status dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs -A --sourcedir=debian/tmp VERBOSE=1 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installdocs dh_installchangelogs dh_installinit cp debian/monit/freeswitch.monitrc debian/freeswitch/etc/monit/freeswitch.monitrc dh_install --sourcedir=debian/tmp dh_link dh_strip --dbg-package=freeswitch dh_compress dh_fixperms --exclude /opt/freeswitch/conf dh_installdeb dh_shlibdeps --exclude=/opt/freeswitch dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install