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.
|
2007-12-02 18:50:45 -05:00
|
|
|
# export DH_VERBOSE=1
|
|
|
|
export DH_OPTIONS
|
|
|
|
export DH_COMPAT=4
|
|
|
|
export DEB_DH_INSTALL_SOURCEDIR=debian/tmp
|
|
|
|
export PASSTHRU_CODEC_MODULES=codecs/mod_g729 codecs/mod_g723_1 codecs/mod_amr
|
2008-09-17 17:46:42 -04:00
|
|
|
export SPIDERMONKEY_MODULES=languages/mod_spidermonkey languages/mod_spidermonkey_core_db languages/mod_spidermonkey_odbc \
|
|
|
|
languages/mod_spidermonkey_socket languages/mod_spidermonkey_teletone
|
|
|
|
export APPLICATIONS_MODULES=applications/mod_commands applications/mod_conference applications/mod_dptools applications/mod_enum \
|
|
|
|
applications/mod_esf applications/mod_expr applications/mod_fifo applications/mod_limit \
|
|
|
|
applications/mod_rss applications/mod_voicemail applications/mod_fsv \
|
2008-09-29 13:17:26 -04:00
|
|
|
applications/mod_fax
|
2009-01-15 18:25:05 -05:00
|
|
|
export ASR_TTS_MODULES=
|
2008-05-09 09:35:11 -04:00
|
|
|
export CODECS_MODULES=codecs/mod_ilbc codecs/mod_h26x codecs/mod_speex codecs/mod_voipcodecs
|
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=
|
2008-09-17 17:46:42 -04:00
|
|
|
export ENDPOINTS_MODULES=endpoints/mod_dingaling endpoints/mod_iax endpoints/mod_portaudio endpoints/mod_sofia \
|
2008-12-14 19:57:04 -05:00
|
|
|
endpoints/mod_loopback ../../libs/openzap/mod_openzap
|
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
|
2008-05-09 09:35:11 -04:00
|
|
|
export LANGUAGES_MODULES=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
|
2008-07-08 05:49:53 -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
|
2007-12-02 18:50:45 -05:00
|
|
|
export TIMERS_MODULES=
|
2008-09-17 17:46:42 -04:00
|
|
|
export DISABLED_MODULES=applications/mod_soundtouch directories/mod_ldap languages/mod_java languages/mod_python \
|
|
|
|
languages/mod_spidermonkey_skel ast_tts/mod_cepstral asr_tts/mod_lumenvox endpoints/mod_wanpipe \
|
|
|
|
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
|
|
|
|
export MYMODULES=$(PASSTHRU_CODEC_MODULES) $(SPIDERMONKEY_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)
|
|
|
|
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
|
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-11 07:35:56 -05:00
|
|
|
./configure --sysconfdir=/etc/freeswitch --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
|
|
|
|
2008-07-08 05:49:53 -04:00
|
|
|
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install uhd-sounds-install moh-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
|
2007-12-02 18:50:45 -05:00
|
|
|
dh_installinit --sourcedir=debian/tmp
|
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-11 07:35:56 -05:00
|
|
|
dh_fixperms --exclude /etc/freeswitch
|
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
|