[asterisk-commits] murf: trunk r43362 - /trunk/sounds/Makefile
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Sep 20 13:33:16 MST 2006
Author: murf
Date: Wed Sep 20 15:33:15 2006
New Revision: 43362
URL: http://svn.digium.com/view/asterisk?rev=43362&view=rev
Log:
sounds/Makefile updated to handle the extra-sounds tarball; some optimizations
Modified:
trunk/sounds/Makefile
Modified: trunk/sounds/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/sounds/Makefile?rev=43362&r1=43361&r2=43362&view=diff
==============================================================================
--- trunk/sounds/Makefile (original)
+++ trunk/sounds/Makefile Wed Sep 20 15:33:15 2006
@@ -19,7 +19,9 @@
SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds
MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh
CORE_SOUNDS_VERSION:=1.4.1
+EXTRA_SOUNDS_VERSION:=1.4.1
SOUNDS_URL:=http://ftp.digium.com/pub/telephony/sounds/releases
+EXTRA_SOUNDS_URL:=http://ftp.digium.com/pub/telephony/sounds/releases
MOH_URL:=http://ftp.digium.com/pub/telephony/sounds
MENUSELECT_CORE_SOUNDS:=$(subst -EN-,-en-,$(MENUSELECT_CORE_SOUNDS))
MENUSELECT_CORE_SOUNDS:=$(subst -FR-,-fr-,$(MENUSELECT_CORE_SOUNDS))
@@ -39,7 +41,8 @@
MENUSELECT_EXTRA_SOUNDS:=$(subst -ALAW,-alaw,$(MENUSELECT_EXTRA_SOUNDS))
MENUSELECT_EXTRA_SOUNDS:=$(subst -GSM,-gsm,$(MENUSELECT_EXTRA_SOUNDS))
MENUSELECT_EXTRA_SOUNDS:=$(subst -G729,-g729,$(MENUSELECT_EXTRA_SOUNDS))
-EXTRA_SOUNDS:=$(MENUSELECT_EXTRA_SOUNDS:EXTRA-SOUNDS-%=asterisk-extra-sounds-%.tar.gz)
+EXTRA_SOUNDS:=$(MENUSELECT_EXTRA_SOUNDS:EXTRA-SOUNDS-%=asterisk-extra-sounds-%-$(EXTRA_SOUNDS_VERSION).tar.gz)
+EXTRA_SOUND_TAGS:=$(MENUSELECT_EXTRA_SOUNDS:EXTRA-SOUNDS-%=$(SOUNDS_DIR)/.asterisk-extra-sounds-%-$(EXTRA_SOUNDS_VERSION))
MENUSELECT_MOH:=$(subst -FREEPLAY-,-freeplay-,$(MENUSELECT_MOH))
MENUSELECT_MOH:=$(subst -WAV,-wav,$(MENUSELECT_MOH))
MENUSELECT_MOH:=$(subst -ULAW,-ulaw,$(MENUSELECT_MOH))
@@ -50,44 +53,41 @@
MOH_TAGS:=$(MENUSELECT_MOH:MOH-%=$(MOH_DIR)/.asterisk-moh-%)
WGET_ARGS:=--continue
-all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
+all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
-$(SOUNDS_DIR)/.asterisk-core-sounds-en-%:
- @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),,$@)-* && \
- (cd $(SOUNDS_DIR); cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
+$(SOUNDS_DIR)/.asterisk-core-sounds-en-%: asterisk-core-sounds-en-%.tar.gz $(SOUNDS_DIR)
+ cat $< | gzip -d | tar xCf $(SOUNDS_DIR) -
touch $@
-$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%: $(SOUNDS_DIR)/fr
- @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),,$@)-* && \
- (cd $(SOUNDS_DIR)/fr; cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
+$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%: asterisk-core-sounds-fr-%.tar.gz $(SOUNDS_DIR)/fr
+ cat $< | gzip -d | tar xCf $(SOUNDS_DIR)/fr -
touch $@
-$(SOUNDS_DIR)/.asterisk-core-sounds-es-%: $(SOUNDS_DIR)/es
- @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),,$@)-* && \
- (cd $(SOUNDS_DIR)/es; cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
+$(SOUNDS_DIR)/.asterisk-core-sounds-es-%: asterisk-core-sounds-es-%.tar.gz $(SOUNDS_DIR)/es
+ cat $< | gzip -d | tar xCf $(SOUNDS_DIR)/es -
touch $@
-$(MOH_DIR)/.asterisk-moh-%:
- @PACKAGE=$(subst $(MOH_DIR)/.asterisk,asterisk,$@).tar.gz; \
- if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(MOH_URL)/$${PACKAGE}; fi; \
- if test ! -f $${PACKAGE}; then exit 1; fi; \
- (cd $(MOH_DIR); cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
+$(SOUNDS_DIR)/.asterisk-extra-sounds-en-%: asterisk-extra-sounds-en-%.tar.gz $(SOUNDS_DIR)
+ cat $< | gzip -d | tar xCf $(SOUNDS_DIR) -
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-extra-sounds-fr-%: asterisk-extra-sounds-fr-%.tar.gz $(SOUNDS_DIR)
+ cat $< | gzip -d | tar xCf $(SOUNDS_DIR) -
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-extra-sounds-es-%: asterisk-extra-sounds-es-%.tar.gz $(SOUNDS_DIR)
+ cat $< | gzip -d | tar xCf $(SOUNDS_DIR) -
+ touch $@
+
+$(MOH_DIR)/.asterisk-moh-%: asterisk-moh-%.tar.gz $(MOH_DIR)
+ cat $< | gzip -d | tar xCf $(MOH_DIR) -
touch $@
asterisk-core-%.tar.gz:
@wget $(WGET_ARGS) $(SOUNDS_URL)/$@
asterisk-extra-%.tar.gz:
- @wget $(WGET_ARGS) $(MOH_URL)/$@
+ @wget $(WGET_ARGS) $(EXTRA_SOUNDS_URL)/$@
asterisk-moh-%.tar.gz:
@wget $(WGET_ARGS) $(MOH_URL)/$@
@@ -95,10 +95,12 @@
dist-clean:
rm -f *.tar.gz
+.PHONY: $(SOUNDS_DIR) $(SOUNDS_DIR)/fr $(SOUNDS_DIR)/es $(MOH_DIR)
+
$(SOUNDS_DIR) $(MOH_DIR) $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr:
mkdir -p $@
-install: $(SOUNDS_DIR) $(MOH_DIR) $(CORE_SOUND_TAGS) $(MOH_TAGS)
+install: $(CORE_SOUND_TAGS) $(EXTRA_SOUND_TAGS) $(MOH_TAGS)
uninstall:
rm -rf $(SOUNDS_DIR)
More information about the asterisk-commits
mailing list