2007-10-09 13:25:56 -04:00
|
|
|
#!/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.
|
2009-12-18 18:00:41 -05:00
|
|
|
export DH_VERBOSE=1
|
2007-12-02 18:50:45 -05:00
|
|
|
export DH_OPTIONS
|
|
|
|
export DEB_DH_INSTALL_SOURCEDIR=debian/tmp
|
|
|
|
export PASSTHRU_CODEC_MODULES=codecs/mod_g729 codecs/mod_g723_1 codecs/mod_amr
|
2009-12-18 18:00:41 -05:00
|
|
|
# Modules listed by those built by default, then those that are added in this package
|
|
|
|
export APPLICATIONS_MODULES=applications/mod_cluechoo applications/mod_commands applications/mod_conference applications/mod_dptools \
|
|
|
|
applications/mod_enum applications/mod_esf applications/mod_expr applications/mod_fifo applications/mod_fsv \
|
|
|
|
applications/mod_limit applications/mod_valet_parking applications/mod_voicemail applications/mod_rss \
|
|
|
|
applications/mod_fax applications/mod_cidlookup applications/mod_curl applications/mod_easyroute \
|
2010-02-15 02:21:08 -05:00
|
|
|
applications/mod_lcr applications/mod_nibblebill applications/mod_snom \
|
2009-12-18 18:00:41 -05:00
|
|
|
applications/mod_spy applications/mod_vmd applications/mod_directory
|
2009-09-25 11:59:10 -04:00
|
|
|
export ASR_TTS_MODULES=asr_tts/mod_tts_commandline
|
2009-02-17 16:54:56 -05:00
|
|
|
export CODECS_MODULES=codecs/mod_ilbc codecs/mod_h26x codecs/mod_speex codecs/mod_voipcodecs codecs/mod_siren codecs/mod_celt
|
2007-12-02 18:50:45 -05:00
|
|
|
export DIALPLANS_MODULES=dialplans/mod_dialplan_asterisk dialplans/mod_dialplan_directory dialplans/mod_dialplan_xml
|
|
|
|
export DIRECTORIES_MODULES=
|
|
|
|
export DOTNET_MODULES=
|
2010-01-23 15:15:08 -05:00
|
|
|
export ENDPOINTS_MODULES=endpoints/mod_dingaling endpoints/mod_portaudio endpoints/mod_sofia \
|
2010-03-18 10:08:15 -04:00
|
|
|
endpoints/mod_loopback ../../libs/openzap/mod_openzap endpoints/mod_skypopen
|
2008-07-08 05:49:53 -04:00
|
|
|
export EVENT_HANDLERS_MODULES=event_handlers/mod_event_multicast event_handlers/mod_event_socket event_handlers/mod_cdr_csv
|
2008-05-08 12:44:33 -04:00
|
|
|
export FORMATS_MODULES=formats/mod_local_stream formats/mod_native_file formats/mod_sndfile formats/mod_tone_stream formats/mod_shout
|
2010-01-17 00:48:36 -05:00
|
|
|
export LANGUAGES_MODULES=languages/mod_spidermonkey languages/mod_perl languages/mod_lua
|
2007-12-02 18:50:45 -05:00
|
|
|
export LOGGERS_MODULES=loggers/mod_console loggers/mod_logfile loggers/mod_syslog
|
2009-10-23 13:36:23 -04:00
|
|
|
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
|
2007-12-02 18:50:45 -05:00
|
|
|
export TIMERS_MODULES=
|
2010-02-15 02:21:08 -05:00
|
|
|
export DISABLED_MODULES=applications/mod_memcache applications/mod_soundtouch directories/mod_ldap languages/mod_java languages/mod_python \
|
2010-01-17 00:48:36 -05:00
|
|
|
asr_tts/mod_cepstral asr_tts/mod_lumenvox endpoints/mod_wanpipe \
|
2008-09-17 17:46:42 -04:00
|
|
|
event_handlers/mod_event_test event_handlers/mod_radius_cdr event_handlers/mod_zeroconf
|
2007-12-02 18:50:45 -05:00
|
|
|
export XML_INT_MODULES=xml_int/mod_xml_rpc xml_int/mod_xml_curl xml_int/mod_xml_cdr
|
2010-01-17 00:48:36 -05:00
|
|
|
export MYMODULES=$(PASSTHRU_CODEC_MODULES) $(APPLICATIONS_MODULES) $(ASR_TTS_MODULES) $(CODECS_MODULES) $(DIALPLANS_MODULES) $(DIRECTORIES_MODULES) $(DOTNET_MODULES) $(ENDPOINTS_MODULES) $(EVENT_HANDLERS_MODULES) $(FORMATS_MODULES) $(LANGUAGES_MODULES) $(LOGGERS_MODULES) $(SAY_MODULES) $(TIMERS_MODULES) $(XML_INT_MODULES)
|
2007-12-02 18:50:45 -05:00
|
|
|
export MODULES=$(MYMODULES)
|
2007-10-09 13:25:56 -04:00
|
|
|
|
2007-11-27 17:51:17 -05:00
|
|
|
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)
|
|
|
|
|
2008-09-17 17:46:42 -04:00
|
|
|
CFLAGS = -ggdb
|
2010-02-24 07:48:40 -05:00
|
|
|
MOD_CFLAGS = -ggdb
|
2007-11-27 17:51:17 -05:00
|
|
|
|
|
|
|
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
|
2008-07-08 05:49:53 -04:00
|
|
|
rm -f modules.conf
|
2007-12-02 18:50:45 -05:00
|
|
|
touch modules.conf
|
|
|
|
echo $(MODULES)
|
|
|
|
for i in $(MODULES); do echo $$i >> modules.conf; done
|
2009-02-16 10:34:39 -05:00
|
|
|
./configure --prefix=/opt/freeswitch --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) ${FEATURES}
|
2007-11-27 17:51:17 -05:00
|
|
|
|
2008-07-08 05:49:53 -04:00
|
|
|
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;
|
2007-11-27 17:51:17 -05:00
|
|
|
|
2007-10-09 13:25:56 -04:00
|
|
|
build: build-stamp
|
2007-11-27 17:51:17 -05:00
|
|
|
build-stamp: config.status
|
2007-10-09 13:25:56 -04:00
|
|
|
dh_testdir
|
|
|
|
|
|
|
|
$(MAKE)
|
|
|
|
|
2007-11-27 17:51:17 -05:00
|
|
|
touch $@
|
2007-10-09 13:25:56 -04:00
|
|
|
|
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2007-11-27 17:51:17 -05:00
|
|
|
rm -f build-stamp
|
2007-10-09 13:25:56 -04:00
|
|
|
|
2008-05-23 21:27:19 -04:00
|
|
|
-$(MAKE) update-clean
|
2007-11-27 17:51:17 -05:00
|
|
|
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
|
2007-11-28 19:38:58 -05:00
|
|
|
rm -f config.status
|
|
|
|
rm -f */*/config.status
|
|
|
|
rm -f */*/*/config.status
|
|
|
|
dh_clean
|
2007-10-09 13:25:56 -04:00
|
|
|
|
|
|
|
install: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2007-11-27 17:51:17 -05:00
|
|
|
dh_clean -k
|
2007-12-02 18:50:45 -05:00
|
|
|
dh_installdirs -A --sourcedir=debian/tmp
|
2007-10-09 13:25:56 -04:00
|
|
|
|
2009-12-18 18:00:41 -05:00
|
|
|
VERBOSE=1 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
|
2007-11-27 17:51:17 -05:00
|
|
|
|
2007-10-09 13:25:56 -04:00
|
|
|
|
|
|
|
# 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
|
2009-02-04 11:45:38 -05:00
|
|
|
dh_installdocs
|
|
|
|
dh_installchangelogs
|
2009-11-17 14:12:20 -05:00
|
|
|
dh_installinit
|
2008-07-08 05:49:53 -04:00
|
|
|
cp debian/monit/freeswitch.monitrc debian/freeswitch/etc/monit/freeswitch.monitrc
|
2007-11-30 09:12:23 -05:00
|
|
|
dh_install --sourcedir=debian/tmp
|
2008-09-17 17:46:42 -04:00
|
|
|
dh_link
|
|
|
|
dh_strip --dbg-package=freeswitch
|
2007-10-09 13:25:56 -04:00
|
|
|
dh_compress
|
2009-02-16 10:34:39 -05:00
|
|
|
dh_fixperms --exclude /opt/freeswitch/conf
|
2007-10-09 13:25:56 -04:00
|
|
|
dh_installdeb
|
2007-11-27 17:51:17 -05:00
|
|
|
dh_shlibdeps --exclude=/opt/freeswitch
|
2007-10-09 13:25:56 -04:00
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
2007-11-27 17:51:17 -05:00
|
|
|
.PHONY: build clean binary-indep binary-arch binary install
|