| 1 |
########################################################### |
|---|
| 2 |
# |
|---|
| 3 |
# asterisk14-extra-sounds-en-g729 |
|---|
| 4 |
# |
|---|
| 5 |
########################################################### |
|---|
| 6 |
# |
|---|
| 7 |
# ASTERISK14_EXTRA_SOUNDS_EN_G729_VERSION, ASTERISK14_EXTRA_SOUNDS_EN_G729_SITE and ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE define |
|---|
| 8 |
# the upstream location of the source code for the package. |
|---|
| 9 |
# ASTERISK14_EXTRA_SOUNDS_EN_G729_DIR is the directory which is created when the source |
|---|
| 10 |
# archive is unpacked. |
|---|
| 11 |
# ASTERISK14_EXTRA_SOUNDS_EN_G729_UNZIP is the command used to unzip the source. |
|---|
| 12 |
# It is usually "zcat" (for .gz) or "bzcat" (for .bz2) |
|---|
| 13 |
# |
|---|
| 14 |
# You should change all these variables to suit your package. |
|---|
| 15 |
# Please make sure that you add a description, and that you |
|---|
| 16 |
# list all your packages' dependencies, seperated by commas. |
|---|
| 17 |
# |
|---|
| 18 |
# If you list yourself as MAINTAINER, please give a valid email |
|---|
| 19 |
# address, and indicate your irc nick if it cannot be easily deduced |
|---|
| 20 |
# from your name or email address. If you leave MAINTAINER set to |
|---|
| 21 |
# "NSLU2 Linux" other developers will feel free to edit. |
|---|
| 22 |
# |
|---|
| 23 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_SITE=http://downloads.digium.com/pub/telephony/sounds/releases |
|---|
| 24 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_VERSION=1.4.7 |
|---|
| 25 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE=asterisk-extra-sounds-en-g729-$(ASTERISK14_EXTRA_SOUNDS_EN_G729_VERSION).tar.gz |
|---|
| 26 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_DIR=asterisk-extra-sounds-en-g729-$(ASTERISK14_EXTRA_SOUNDS_EN_G729_VERSION) |
|---|
| 27 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_UNZIP=zcat |
|---|
| 28 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_MAINTAINER=NSLU2 Linux <nslu2-linux@yahoogroups.com> |
|---|
| 29 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_DESCRIPTION=asterisk-extra-sounds-en-g729 |
|---|
| 30 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_SECTION=misc |
|---|
| 31 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_PRIORITY=optional |
|---|
| 32 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_DEPENDS= |
|---|
| 33 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_SUGGESTS= |
|---|
| 34 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_CONFLICTS=asterisk-sounds |
|---|
| 35 |
|
|---|
| 36 |
# |
|---|
| 37 |
# ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_VERSION should be incremented when the ipk changes. |
|---|
| 38 |
# |
|---|
| 39 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_VERSION=1 |
|---|
| 40 |
|
|---|
| 41 |
# |
|---|
| 42 |
# ASTERISK14_EXTRA_SOUNDS_EN_G729_CONFFILES should be a list of user-editable files |
|---|
| 43 |
#ASTERISK14_EXTRA_SOUNDS_EN_G729_CONFFILES=/opt/etc/asterisk14-extra-sounds-en-g729.conf /opt/etc/init.d/SXXasterisk14-extra-sounds-en-g729 |
|---|
| 44 |
|
|---|
| 45 |
# |
|---|
| 46 |
# ASTERISK14_EXTRA_SOUNDS_EN_G729_PATCHES should list any patches, in the the order in |
|---|
| 47 |
# which they should be applied to the source code. |
|---|
| 48 |
# |
|---|
| 49 |
#ASTERISK14_EXTRA_SOUNDS_EN_G729_PATCHES=$(ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE_DIR)/configure.patch |
|---|
| 50 |
|
|---|
| 51 |
# |
|---|
| 52 |
# If the compilation of the package requires additional |
|---|
| 53 |
# compilation or linking flags, then list them here. |
|---|
| 54 |
# |
|---|
| 55 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_CPPFLAGS= |
|---|
| 56 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_LDFLAGS= |
|---|
| 57 |
|
|---|
| 58 |
# |
|---|
| 59 |
# ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR is the directory in which the build is done. |
|---|
| 60 |
# ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE_DIR is the directory which holds all the |
|---|
| 61 |
# patches and ipkg control files. |
|---|
| 62 |
# ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR is the directory in which the ipk is built. |
|---|
| 63 |
# ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK is the name of the resulting ipk files. |
|---|
| 64 |
# |
|---|
| 65 |
# You should not change any of these variables. |
|---|
| 66 |
# |
|---|
| 67 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR=$(BUILD_DIR)/asterisk14-extra-sounds-en-g729 |
|---|
| 68 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE_DIR=$(SOURCE_DIR)/asterisk14-extra-sounds-en-g729 |
|---|
| 69 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR=$(BUILD_DIR)/asterisk14-extra-sounds-en-g729-$(ASTERISK14_EXTRA_SOUNDS_EN_G729_VERSION)-ipk |
|---|
| 70 |
ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK=$(BUILD_DIR)/asterisk14-extra-sounds-en-g729_$(ASTERISK14_EXTRA_SOUNDS_EN_G729_VERSION)-$(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_VERSION)_$(TARGET_ARCH).ipk |
|---|
| 71 |
|
|---|
| 72 |
.PHONY: asterisk14-extra-sounds-en-g729-source asterisk14-extra-sounds-en-g729-unpack asterisk14-extra-sounds-en-g729 asterisk14-extra-sounds-en-g729-stage asterisk14-extra-sounds-en-g729-ipk asterisk14-extra-sounds-en-g729-clean asterisk14-extra-sounds-en-g729-dirclean asterisk14-extra-sounds-en-g729-check |
|---|
| 73 |
|
|---|
| 74 |
# |
|---|
| 75 |
# This is the dependency on the source code. If the source is missing, |
|---|
| 76 |
# then it will be fetched from the site using wget. |
|---|
| 77 |
# |
|---|
| 78 |
$(DL_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE): |
|---|
| 79 |
$(WGET) -P $(DL_DIR) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_SITE)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE) |
|---|
| 80 |
|
|---|
| 81 |
# |
|---|
| 82 |
# The source code depends on it existing within the download directory. |
|---|
| 83 |
# This target will be called by the top level Makefile to download the |
|---|
| 84 |
# source code's archive (.tar.gz, .bz2, etc.) |
|---|
| 85 |
# |
|---|
| 86 |
#asterisk14-extra-sounds-en-g729-source: $(DL_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_PATCHES) |
|---|
| 87 |
|
|---|
| 88 |
# |
|---|
| 89 |
# This target unpacks the source code in the build directory. |
|---|
| 90 |
# If the source archive is not .tar.gz or .tar.bz2, then you will need |
|---|
| 91 |
# to change the commands here. Patches to the source code are also |
|---|
| 92 |
# applied in this target as required. |
|---|
| 93 |
# |
|---|
| 94 |
# This target also configures the build within the build directory. |
|---|
| 95 |
# Flags such as LDFLAGS and CPPFLAGS should be passed into configure |
|---|
| 96 |
# and NOT $(MAKE) below. Passing it to configure causes configure to |
|---|
| 97 |
# correctly BUILD the Makefile with the right paths, where passing it |
|---|
| 98 |
# to Make causes it to override the default search paths of the compiler. |
|---|
| 99 |
# |
|---|
| 100 |
# If the compilation of the package requires other packages to be staged |
|---|
| 101 |
# first, then do that first (e.g. "$(MAKE) <bar>-stage <baz>-stage"). |
|---|
| 102 |
# |
|---|
| 103 |
# If the package uses GNU libtool, you should invoke $(PATCH_LIBTOOL) as |
|---|
| 104 |
# shown below to make various patches to it. |
|---|
| 105 |
# |
|---|
| 106 |
$(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.configured: $(DL_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_PATCHES) make/asterisk14-extra-sounds-en-g729.mk |
|---|
| 107 |
#$(MAKE) <bar>-stage <baz>-stage |
|---|
| 108 |
rm -rf $(BUILD_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_DIR) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR) |
|---|
| 109 |
mkdir -p $(BUILD_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_DIR); $(ASTERISK14_EXTRA_SOUNDS_EN_G729_UNZIP) $(DL_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE) | tar -C $(BUILD_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_DIR) -xvf - |
|---|
| 110 |
if test -n "$(ASTERISK14_EXTRA_SOUNDS_EN_G729_PATCHES)" ; \ |
|---|
| 111 |
then cat $(ASTERISK14_EXTRA_SOUNDS_EN_G729_PATCHES) | \ |
|---|
| 112 |
patch -d $(BUILD_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_DIR) -p0 ; \ |
|---|
| 113 |
fi |
|---|
| 114 |
if test "$(BUILD_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_DIR)" != "$(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)" ; \ |
|---|
| 115 |
then mv $(BUILD_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_DIR) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR) ; \ |
|---|
| 116 |
fi |
|---|
| 117 |
touch $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.configured |
|---|
| 118 |
|
|---|
| 119 |
asterisk14-extra-sounds-en-g729-unpack: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.configured |
|---|
| 120 |
|
|---|
| 121 |
# |
|---|
| 122 |
# This builds the actual binary. |
|---|
| 123 |
# |
|---|
| 124 |
$(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.built: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.configured |
|---|
| 125 |
rm -f $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.built |
|---|
| 126 |
touch $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.built |
|---|
| 127 |
|
|---|
| 128 |
# |
|---|
| 129 |
# This is the build convenience target. |
|---|
| 130 |
# |
|---|
| 131 |
asterisk14-extra-sounds-en-g729: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.built |
|---|
| 132 |
|
|---|
| 133 |
# |
|---|
| 134 |
# If you are building a library, then you need to stage it too. |
|---|
| 135 |
# |
|---|
| 136 |
$(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.staged: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.built |
|---|
| 137 |
rm -f $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.staged |
|---|
| 138 |
touch $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.staged |
|---|
| 139 |
|
|---|
| 140 |
asterisk14-extra-sounds-en-g729-stage: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.staged |
|---|
| 141 |
|
|---|
| 142 |
# |
|---|
| 143 |
# This rule creates a control file for ipkg. It is no longer |
|---|
| 144 |
# necessary to create a seperate control file under sources/asterisk14-extra-sounds-en-g729 |
|---|
| 145 |
# |
|---|
| 146 |
$(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/CONTROL/control: |
|---|
| 147 |
@install -d $(@D) |
|---|
| 148 |
@rm -f $@ |
|---|
| 149 |
@echo "Package: asterisk14-extra-sounds-en-g729" >>$@ |
|---|
| 150 |
@echo "Architecture: $(TARGET_ARCH)" >>$@ |
|---|
| 151 |
@echo "Priority: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_PRIORITY)" >>$@ |
|---|
| 152 |
@echo "Section: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_SECTION)" >>$@ |
|---|
| 153 |
@echo "Version: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_VERSION)-$(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_VERSION)" >>$@ |
|---|
| 154 |
@echo "Maintainer: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_MAINTAINER)" >>$@ |
|---|
| 155 |
@echo "Source: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_SITE)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_SOURCE)" >>$@ |
|---|
| 156 |
@echo "Description: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_DESCRIPTION)" >>$@ |
|---|
| 157 |
@echo "Depends: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_DEPENDS)" >>$@ |
|---|
| 158 |
@echo "Suggests: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_SUGGESTS)" >>$@ |
|---|
| 159 |
@echo "Conflicts: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_CONFLICTS)" >>$@ |
|---|
| 160 |
|
|---|
| 161 |
# |
|---|
| 162 |
# This builds the IPK file. |
|---|
| 163 |
# |
|---|
| 164 |
# Binaries should be installed into $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/sbin or $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/bin |
|---|
| 165 |
# (use the location in a well-known Linux distro as a guide for choosing sbin or bin). |
|---|
| 166 |
# Libraries and include files should be installed into $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/{lib,include} |
|---|
| 167 |
# Configuration files should be installed in $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/etc/asterisk14-extra-sounds-en-g729/... |
|---|
| 168 |
# Documentation files should be installed in $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/doc/asterisk14-extra-sounds-en-g729/... |
|---|
| 169 |
# Daemon startup scripts should be installed in $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/etc/init.d/S??asterisk14-extra-sounds-en-g729 |
|---|
| 170 |
# |
|---|
| 171 |
# You may need to patch your application to make it use these locations. |
|---|
| 172 |
# |
|---|
| 173 |
$(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK): $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.built |
|---|
| 174 |
rm -rf $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR) $(BUILD_DIR)/asterisk14-extra-sounds-en-g729_*_$(TARGET_ARCH).ipk |
|---|
| 175 |
$(MAKE) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/CONTROL/control |
|---|
| 176 |
install -d $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/var/lib/asterisk/sounds |
|---|
| 177 |
install -m 644 $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/*.g729 $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/var/lib/asterisk/sounds |
|---|
| 178 |
install -d $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/var/lib/asterisk/sounds/ha |
|---|
| 179 |
install -m 644 $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/ha/*.g729 $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/var/lib/asterisk/sounds/ha |
|---|
| 180 |
install -d $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/var/lib/asterisk/sounds/wx |
|---|
| 181 |
install -m 644 $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/wx/*.g729 $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR)/opt/var/lib/asterisk/sounds/wx |
|---|
| 182 |
cd $(BUILD_DIR); $(IPKG_BUILD) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR) |
|---|
| 183 |
|
|---|
| 184 |
# |
|---|
| 185 |
# This is called from the top level makefile to create the IPK file. |
|---|
| 186 |
# |
|---|
| 187 |
asterisk14-extra-sounds-en-g729-ipk: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK) |
|---|
| 188 |
|
|---|
| 189 |
# |
|---|
| 190 |
# This is called from the top level makefile to clean all of the built files. |
|---|
| 191 |
# |
|---|
| 192 |
asterisk14-extra-sounds-en-g729-clean: |
|---|
| 193 |
rm -f $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR)/.built |
|---|
| 194 |
|
|---|
| 195 |
# |
|---|
| 196 |
# This is called from the top level makefile to clean all dynamically created |
|---|
| 197 |
# directories. |
|---|
| 198 |
# |
|---|
| 199 |
asterisk14-extra-sounds-en-g729-dirclean: |
|---|
| 200 |
rm -rf $(BUILD_DIR)/$(ASTERISK14_EXTRA_SOUNDS_EN_G729_DIR) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_BUILD_DIR) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK_DIR) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK) |
|---|
| 201 |
# |
|---|
| 202 |
# |
|---|
| 203 |
# Some sanity check for the package. |
|---|
| 204 |
# |
|---|
| 205 |
asterisk14-extra-sounds-en-g729-check: $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK) |
|---|
| 206 |
perl scripts/optware-check-package.pl --target=$(OPTWARE_TARGET) $(ASTERISK14_EXTRA_SOUNDS_EN_G729_IPK) |
|---|