debian swirl logo

Back to the packages list asterisk-prompt-it

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
FILENAME = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz
UP_VER_REAL= $(subst +,-,$(DEB_UPSTREAM_VERSION))
UP_NAME= asterisk-core-sounds-it

BASE_URL= http://www.voip.ammdomus.it/pub
FORMATS= alaw gsm wav
#FORMATS=alaw gsm sln16 wav
TARGET_DIR= ../tarballs
#TARGET_DIR=..

TMPDIR= tmp
PKGNAME= $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)
PKGDIR= $(TMPDIR)/$(PKGNAME)

URLS= $(FORMATS:%=http://www.voip.ammdomus.it/pub/asterisk-core-sounds-it-%-$(UP_VER_REAL).tar.gz)

TARBALL_NAMES= $(FORMATS)
TARBALLS_EXTRA= $(TARBALL_NAMES:%=$(TARGET_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig-%.tar.gz)

$(TARGET_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig-%.tar.gz:
		set -e; cd $(@D); \
			wget -q -c $(BASE_URL)/$(UP_NAME)-$*-$(UP_VER_REAL).tar.gz
		ln -fs $(UP_NAME)-$*-$(UP_VER_REAL).tar.gz $@

print-version:
		@echo formats: $(FORMATS)
		@echo package: $(DEB_SOURCE_PACKAGE)
		@echo version: $(DEB_UPSTREAM_VERSION)
		@echo names: $(TARBALLS_EXTRA)

get-orig-source: $(TARBALLS_EXTRA)
		rm -rf $(PKGDIR)
		mkdir -p $(PKGDIR)
	# Empty tarball
		tar czf $(TARGET_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz \
			-C $(TMPDIR) $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)
		rm -rf $(TMPDIR)

# Get them re-downloaded (with wget -c) in case of a partial download:
.PHONY: $(TARGET_DIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig-%.tar.gz

Builds:

asterisk-prompt-it
dummy transitional package
asterisk-prompt-it-menardi-alaw
asterisk pbx italian sound files - a-law prompts
asterisk-prompt-it-menardi
asterisk pbx italian sound files
asterisk-prompt-it-menardi-gsm
asterisk pbx italian sound files - gsm prompts
asterisk-prompt-it-menardi-wav
asterisk pbx italian sound files - wav prompts