2006-06-07 20:54:30 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
|
|
|
# Makefile for sound files
|
|
|
|
#
|
|
|
|
# Copyright (C) 2006, Digium, Inc.
|
|
|
|
#
|
|
|
|
# Kevin P. Fleming <kpfleming@digium.com>
|
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
2006-06-22 15:45:32 +00:00
|
|
|
.PHONY: dist-clean all uninstall
|
2006-06-22 11:27:03 +00:00
|
|
|
|
2006-08-26 23:58:47 +00:00
|
|
|
-include $(ASTTOPDIR)/menuselect.makeopts
|
2006-06-07 20:54:30 +00:00
|
|
|
|
2006-09-25 15:24:48 +00:00
|
|
|
PWD:=$(shell pwd)
|
2006-06-07 22:03:02 +00:00
|
|
|
SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds
|
2006-06-07 22:37:31 +00:00
|
|
|
MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh
|
2006-09-26 18:39:01 +00:00
|
|
|
CORE_SOUNDS_VERSION:=1.4.3
|
2006-09-22 16:43:00 +00:00
|
|
|
EXTRA_SOUNDS_VERSION:=1.4.2
|
2006-06-07 22:55:46 +00:00
|
|
|
SOUNDS_URL:=http://ftp.digium.com/pub/telephony/sounds/releases
|
2006-09-20 22:58:03 +00:00
|
|
|
MCS:=$(subst -EN-,-en-,$(MENUSELECT_CORE_SOUNDS))
|
|
|
|
MCS:=$(subst -FR-,-fr-,$(MCS))
|
|
|
|
MCS:=$(subst -ES-,-es-,$(MCS))
|
|
|
|
MCS:=$(subst -WAV,-wav,$(MCS))
|
|
|
|
MCS:=$(subst -ULAW,-ulaw,$(MCS))
|
|
|
|
MCS:=$(subst -ALAW,-alaw,$(MCS))
|
|
|
|
MCS:=$(subst -GSM,-gsm,$(MCS))
|
|
|
|
MCS:=$(subst -G729,-g729,$(MCS))
|
|
|
|
CORE_SOUNDS:=$(MCS:CORE-SOUNDS-%=asterisk-core-sounds-%-$(CORE_SOUNDS_VERSION).tar.gz)
|
|
|
|
CORE_SOUND_TAGS:=$(MCS:CORE-SOUNDS-%=$(SOUNDS_DIR)/.asterisk-core-sounds-%-$(CORE_SOUNDS_VERSION))
|
|
|
|
MES:=$(subst -EN-,-en-,$(MENUSELECT_EXTRA_SOUNDS))
|
|
|
|
MES:=$(subst -FR-,-fr-,$(MES))
|
|
|
|
MES:=$(subst -ES-,-es-,$(MES))
|
|
|
|
MES:=$(subst -WAV,-wav,$(MES))
|
|
|
|
MES:=$(subst -ULAW,-ulaw,$(MES))
|
|
|
|
MES:=$(subst -ALAW,-alaw,$(MES))
|
|
|
|
MES:=$(subst -GSM,-gsm,$(MES))
|
|
|
|
MES:=$(subst -G729,-g729,$(MES))
|
|
|
|
EXTRA_SOUNDS:=$(MES:EXTRA-SOUNDS-%=asterisk-extra-sounds-%-$(EXTRA_SOUNDS_VERSION).tar.gz)
|
|
|
|
EXTRA_SOUND_TAGS:=$(MES:EXTRA-SOUNDS-%=$(SOUNDS_DIR)/.asterisk-extra-sounds-%-$(EXTRA_SOUNDS_VERSION))
|
|
|
|
MM:=$(subst -FREEPLAY-,-freeplay-,$(MENUSELECT_MOH))
|
|
|
|
MM:=$(subst -WAV,-wav,$(MM))
|
|
|
|
MM:=$(subst -ULAW,-ulaw,$(MM))
|
|
|
|
MM:=$(subst -ALAW,-alaw,$(MM))
|
|
|
|
MM:=$(subst -GSM,-gsm,$(MM))
|
|
|
|
MM:=$(subst -G729,-g729,$(MM))
|
|
|
|
MOH:=$(MM:MOH-%=asterisk-moh-%.tar.gz)
|
|
|
|
MOH_TAGS:=$(MM:MOH-%=$(MOH_DIR)/.asterisk-moh-%)
|
2006-06-07 23:09:41 +00:00
|
|
|
WGET_ARGS:=--continue
|
2006-06-07 22:03:02 +00:00
|
|
|
|
2006-09-20 20:33:15 +00:00
|
|
|
all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
|
2006-06-25 08:50:14 +00:00
|
|
|
|
2006-09-20 22:58:03 +00:00
|
|
|
$(SOUNDS_DIR)/.asterisk-core-sounds-en-%:
|
2006-09-20 22:29:31 +00:00
|
|
|
@PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
|
|
if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
|
|
|
|
if test ! -f $${PACKAGE}; then exit 1; fi; \
|
|
|
|
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
|
2006-09-25 15:24:48 +00:00
|
|
|
(cd $(SOUNDS_DIR); cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
|
2006-09-20 22:29:31 +00:00
|
|
|
touch $@
|
|
|
|
|
2006-09-20 22:58:03 +00:00
|
|
|
$(SOUNDS_DIR)/.asterisk-core-sounds-es-%:
|
2006-09-20 22:29:31 +00:00
|
|
|
@PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
|
|
if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
|
|
|
|
if test ! -f $${PACKAGE}; then exit 1; fi; \
|
|
|
|
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
|
2006-09-25 15:24:48 +00:00
|
|
|
(cd $(SOUNDS_DIR)/es; cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
|
2006-09-20 22:29:31 +00:00
|
|
|
touch $@
|
|
|
|
|
2006-09-20 22:58:03 +00:00
|
|
|
$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%:
|
2006-09-20 22:29:31 +00:00
|
|
|
@PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
|
|
if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
|
|
|
|
if test ! -f $${PACKAGE}; then exit 1; fi; \
|
|
|
|
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
|
2006-09-25 15:24:48 +00:00
|
|
|
(cd $(SOUNDS_DIR)/fr; cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
|
2006-09-20 22:29:31 +00:00
|
|
|
touch $@
|
|
|
|
|
2006-09-20 22:58:03 +00:00
|
|
|
$(SOUNDS_DIR)/.asterisk-extra-sounds-en-%:
|
2006-09-20 22:29:31 +00:00
|
|
|
@PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
|
|
if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
|
|
|
|
if test ! -f $${PACKAGE}; then exit 1; fi; \
|
|
|
|
rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
|
2006-09-25 15:24:48 +00:00
|
|
|
(cd $(SOUNDS_DIR); cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
|
2006-09-20 22:29:31 +00:00
|
|
|
touch $@
|
|
|
|
|
2006-09-20 22:58:03 +00:00
|
|
|
$(SOUNDS_DIR)/.asterisk-extra-sounds-es-%:
|
2006-09-20 22:29:31 +00:00
|
|
|
@PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
|
|
if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
|
|
|
|
if test ! -f $${PACKAGE}; then exit 1; fi; \
|
|
|
|
rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
|
2006-09-25 15:24:48 +00:00
|
|
|
(cd $(SOUNDS_DIR)/es; cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
|
2006-09-20 22:29:31 +00:00
|
|
|
touch $@
|
|
|
|
|
2006-09-20 22:58:03 +00:00
|
|
|
$(SOUNDS_DIR)/.asterisk-extra-sounds-fr-%:
|
2006-09-20 22:29:31 +00:00
|
|
|
@PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
|
|
if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
|
|
|
|
if test ! -f $${PACKAGE}; then exit 1; fi; \
|
|
|
|
rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
|
2006-09-25 15:24:48 +00:00
|
|
|
(cd $(SOUNDS_DIR)/fr; cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
|
2006-09-20 22:29:31 +00:00
|
|
|
touch $@
|
|
|
|
|
2006-09-20 22:58:03 +00:00
|
|
|
$(MOH_DIR)/.asterisk-moh-%:
|
2006-09-20 22:29:31 +00:00
|
|
|
@PACKAGE=$(subst $(MOH_DIR)/.asterisk,asterisk,$@).tar.gz; \
|
|
|
|
if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
|
|
|
|
if test ! -f $${PACKAGE}; then exit 1; fi; \
|
2006-09-25 15:24:48 +00:00
|
|
|
(cd $(MOH_DIR); cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
|
2006-09-20 22:29:31 +00:00
|
|
|
touch $@
|
2006-06-07 20:54:30 +00:00
|
|
|
|
2006-06-07 22:55:46 +00:00
|
|
|
asterisk-core-%.tar.gz:
|
2006-06-07 23:09:41 +00:00
|
|
|
@wget $(WGET_ARGS) $(SOUNDS_URL)/$@
|
2006-06-07 20:54:30 +00:00
|
|
|
|
2006-06-07 22:55:46 +00:00
|
|
|
asterisk-extra-%.tar.gz:
|
2006-09-20 20:43:41 +00:00
|
|
|
@wget $(WGET_ARGS) $(SOUNDS_URL)/$@
|
2006-06-07 22:55:46 +00:00
|
|
|
|
|
|
|
asterisk-moh-%.tar.gz:
|
2006-09-20 20:43:41 +00:00
|
|
|
@wget $(WGET_ARGS) $(SOUNDS_URL)/$@
|
2006-06-07 22:55:46 +00:00
|
|
|
|
2006-06-07 21:05:05 +00:00
|
|
|
dist-clean:
|
|
|
|
rm -f *.tar.gz
|
2006-06-07 20:54:30 +00:00
|
|
|
|
2006-07-19 18:50:55 +00:00
|
|
|
$(SOUNDS_DIR) $(MOH_DIR) $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr:
|
2006-06-07 22:03:02 +00:00
|
|
|
mkdir -p $@
|
|
|
|
|
2006-09-20 22:58:03 +00:00
|
|
|
install: $(SOUNDS_DIR) $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr $(MOH_DIR) $(CORE_SOUND_TAGS) $(EXTRA_SOUND_TAGS) $(MOH_TAGS)
|
2006-06-07 20:54:30 +00:00
|
|
|
|
|
|
|
uninstall:
|
2006-06-07 22:03:02 +00:00
|
|
|
rm -rf $(SOUNDS_DIR)
|
|
|
|
rm -rf $(MOH_DIR)
|