[asterisk-commits] qwell: branch 1.4 r43386 - /branches/1.4/sounds/Makefile

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Sep 20 15:27:54 MST 2006


Author: qwell
Date: Wed Sep 20 17:27:54 2006
New Revision: 43386

URL: http://svn.digium.com/view/asterisk?rev=43386&view=rev
Log:
Go back to the old(ish) way of installing sound files.

Modified:
    branches/1.4/sounds/Makefile

Modified: branches/1.4/sounds/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.4/sounds/Makefile?rev=43386&r1=43385&r2=43386&view=diff
==============================================================================
--- branches/1.4/sounds/Makefile (original)
+++ branches/1.4/sounds/Makefile Wed Sep 20 17:27:54 2006
@@ -53,26 +53,60 @@
 
 all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
 
-$(SOUNDS_DIR)/.asterisk-core-sounds-en-%: asterisk-core-sounds-en-%.tar.gz $(SOUNDS_DIR)
-	cat $< | gzip -d | tar xCf $(SOUNDS_DIR) -
+$(SOUNDS_DIR)/.asterisk-core-sounds-en-%: $(SOUNDS_DIR)
+	@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),,$@)-* && \
+	cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR) -
+	touch $@
 
-$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%: asterisk-core-sounds-fr-%.tar.gz $(SOUNDS_DIR)/fr
-	cat $< | gzip -d | tar xCf $(SOUNDS_DIR)/fr -
+$(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),,$@)-* && \
+	cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR)/es -
+	touch $@
 
-$(SOUNDS_DIR)/.asterisk-core-sounds-es-%: asterisk-core-sounds-es-%.tar.gz $(SOUNDS_DIR)/es
-	cat $< | gzip -d | tar xCf $(SOUNDS_DIR)/es -
+$(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),,$@)-* && \
+	cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR)/fr -
+	touch $@
 
-$(SOUNDS_DIR)/.asterisk-extra-sounds-en-%: asterisk-extra-sounds-en-%.tar.gz $(SOUNDS_DIR)
-	cat $< | gzip -d | tar xCf $(SOUNDS_DIR) -
+$(SOUNDS_DIR)/.asterisk-extra-sounds-en-%: $(SOUNDS_DIR)
+	@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),,$@)-* && \
+	cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR) -
+	touch $@
 
-$(SOUNDS_DIR)/.asterisk-extra-sounds-fr-%: asterisk-extra-sounds-fr-%.tar.gz $(SOUNDS_DIR)/fr
-	cat $< | gzip -d | tar xCf $(SOUNDS_DIR)/fr -
+$(SOUNDS_DIR)/.asterisk-extra-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 -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
+	cat /$${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR)/es -
+	touch $@
 
-$(SOUNDS_DIR)/.asterisk-extra-sounds-es-%: asterisk-extra-sounds-es-%.tar.gz $(SOUNDS_DIR)/es
-	cat $< | gzip -d | tar xCf $(SOUNDS_DIR)/es -
+$(SOUNDS_DIR)/.asterisk-extra-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 -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
+	cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR)/fr -
+	touch $@
 
-$(MOH_DIR)/.asterisk-moh-%: asterisk-moh-%.tar.gz $(MOH_DIR)
-	cat $< | gzip -d | tar xCf $(MOH_DIR) -
+$(MOH_DIR)/.asterisk-moh-%: $(MOH_DIR)
+	@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; \
+	cat $${PACKAGE} | gzip -d | tar xCf $(MOH_DIR) -
+	touch $@
 
 asterisk-core-%.tar.gz:
 	@wget $(WGET_ARGS) $(SOUNDS_URL)/$@



More information about the asterisk-commits mailing list