root/trunk/make/asterisk14-core-sounds-en-gsm.mk

Revision 7646, 11.6 kB (checked in by osas, 2 years ago)

asterisk14-core-sounds-en: 1.4.7 -> 1.4.8

Line 
1 ###########################################################
2 #
3 # asterisk14-core-sounds-en-gsm
4 #
5 ###########################################################
6 #
7 # ASTERISK14_CORE_SOUNDS_EN_GSM_VERSION, ASTERISK14_CORE_SOUNDS_EN_GSM_SITE and ASTERISK14_CORE_SOUNDS_EN_GSM_SOURCE define
8 # the upstream location of the source code for the package.
9 # ASTERISK14_CORE_SOUNDS_EN_GSM_DIR is the directory which is created when the source
10 # archive is unpacked.
11 # ASTERISK14_CORE_SOUNDS_EN_GSM_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_CORE_SOUNDS_EN_GSM_SITE=http://ftp.digium.com/pub/telephony/sounds/releases
24 ASTERISK14_CORE_SOUNDS_EN_GSM_VERSION=1.4.8
25 ASTERISK14_CORE_SOUNDS_EN_GSM_SOURCE=asterisk-core-sounds-en-gsm-$(ASTERISK14_CORE_SOUNDS_EN_GSM_VERSION).tar.gz
26 ASTERISK14_CORE_SOUNDS_EN_GSM_DIR=asterisk-core-sounds-en-gsm-$(ASTERISK14_CORE_SOUNDS_EN_GSM_VERSION)
27 ASTERISK14_CORE_SOUNDS_EN_GSM_UNZIP=zcat
28 ASTERISK14_CORE_SOUNDS_EN_GSM_MAINTAINER=NSLU2 Linux <nslu2-linux@yahoogroups.com>
29 ASTERISK14_CORE_SOUNDS_EN_GSM_DESCRIPTION=asterisk-core-sounds-en-gsm
30 ASTERISK14_CORE_SOUNDS_EN_GSM_SECTION=misc
31 ASTERISK14_CORE_SOUNDS_EN_GSM_PRIORITY=optional
32 ASTERISK14_CORE_SOUNDS_EN_GSM_DEPENDS=
33 ASTERISK14_CORE_SOUNDS_EN_GSM_SUGGESTS=
34 ASTERISK14_CORE_SOUNDS_EN_GSM_CONFLICTS=asterisk-sounds
35
36 #
37 # ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_VERSION should be incremented when the ipk changes.
38 #
39 ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_VERSION=1
40
41 #
42 # ASTERISK14_CORE_SOUNDS_EN_GSM_CONFFILES should be a list of user-editable files
43 #ASTERISK14_CORE_SOUNDS_EN_GSM_CONFFILES=/opt/etc/asterisk14-core-sounds-en-gsm.conf /opt/etc/init.d/SXXasterisk14-core-sounds-en-gsm
44
45 #
46 # ASTERISK14_CORE_SOUNDS_EN_GSM_PATCHES should list any patches, in the the order in
47 # which they should be applied to the source code.
48 #
49 #ASTERISK14_CORE_SOUNDS_EN_GSM_PATCHES=$(ASTERISK14_CORE_SOUNDS_EN_GSM_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_CORE_SOUNDS_EN_GSM_CPPFLAGS=
56 ASTERISK14_CORE_SOUNDS_EN_GSM_LDFLAGS=
57
58 #
59 # ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR is the directory in which the build is done.
60 # ASTERISK14_CORE_SOUNDS_EN_GSM_SOURCE_DIR is the directory which holds all the
61 # patches and ipkg control files.
62 # ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR is the directory in which the ipk is built.
63 # ASTERISK14_CORE_SOUNDS_EN_GSM_IPK is the name of the resulting ipk files.
64 #
65 # You should not change any of these variables.
66 #
67 ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR=$(BUILD_DIR)/asterisk14-core-sounds-en-gsm
68 ASTERISK14_CORE_SOUNDS_EN_GSM_SOURCE_DIR=$(SOURCE_DIR)/asterisk14-core-sounds-en-gsm
69 ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR=$(BUILD_DIR)/asterisk14-core-sounds-en-gsm-$(ASTERISK14_CORE_SOUNDS_EN_GSM_VERSION)-ipk
70 ASTERISK14_CORE_SOUNDS_EN_GSM_IPK=$(BUILD_DIR)/asterisk14-core-sounds-en-gsm_$(ASTERISK14_CORE_SOUNDS_EN_GSM_VERSION)-$(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_VERSION)_$(TARGET_ARCH).ipk
71
72 .PHONY: asterisk14-core-sounds-en-gsm-source asterisk14-core-sounds-en-gsm-unpack asterisk14-core-sounds-en-gsm asterisk14-core-sounds-en-gsm-stage asterisk14-core-sounds-en-gsm-ipk asterisk14-core-sounds-en-gsm-clean asterisk14-core-sounds-en-gsm-dirclean asterisk14-core-sounds-en-gsm-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_CORE_SOUNDS_EN_GSM_SOURCE):
79         $(WGET) -P $(DL_DIR) $(ASTERISK14_CORE_SOUNDS_EN_GSM_SITE)/$(@F) || \
80         $(WGET) -P $(DL_DIR) $(SOURCES_NLO_SITE)/$(@F)
81
82 #
83 # The source code depends on it existing within the download directory.
84 # This target will be called by the top level Makefile to download the
85 # source code's archive (.tar.gz, .bz2, etc.)
86 #
87 #asterisk14-core-sounds-en-gsm-source: $(DL_DIR)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_SOURCE) $(ASTERISK14_CORE_SOUNDS_EN_GSM_PATCHES)
88
89 #
90 # This target unpacks the source code in the build directory.
91 # If the source archive is not .tar.gz or .tar.bz2, then you will need
92 # to change the commands here.  Patches to the source code are also
93 # applied in this target as required.
94 #
95 # This target also configures the build within the build directory.
96 # Flags such as LDFLAGS and CPPFLAGS should be passed into configure
97 # and NOT $(MAKE) below.  Passing it to configure causes configure to
98 # correctly BUILD the Makefile with the right paths, where passing it
99 # to Make causes it to override the default search paths of the compiler.
100 #
101 # If the compilation of the package requires other packages to be staged
102 # first, then do that first (e.g. "$(MAKE) <bar>-stage <baz>-stage").
103 #
104 # If the package uses  GNU libtool, you should invoke $(PATCH_LIBTOOL) as
105 # shown below to make various patches to it.
106 #
107 $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.configured: $(DL_DIR)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_SOURCE) $(ASTERISK14_CORE_SOUNDS_EN_GSM_PATCHES) make/asterisk14-core-sounds-en-gsm.mk
108         #$(MAKE) <bar>-stage <baz>-stage
109         rm -rf $(BUILD_DIR)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_DIR) $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)
110         mkdir -p $(BUILD_DIR)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_DIR); $(ASTERISK14_CORE_SOUNDS_EN_GSM_UNZIP) $(DL_DIR)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_SOURCE) | tar -C $(BUILD_DIR)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_DIR) -xvf -
111         if test -n "$(ASTERISK14_CORE_SOUNDS_EN_GSM_PATCHES)" ; \
112                 then cat $(ASTERISK14_CORE_SOUNDS_EN_GSM_PATCHES) | \
113                 patch -d $(BUILD_DIR)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_DIR) -p0 ; \
114         fi
115         if test "$(BUILD_DIR)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_DIR)" != "$(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)" ; \
116                 then mv $(BUILD_DIR)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_DIR) $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR) ; \
117         fi
118         touch $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.configured
119
120 asterisk14-core-sounds-en-gsm-unpack: $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.configured
121
122 #
123 # This builds the actual binary.
124 #
125 $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.built: $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.configured
126         rm -f $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.built
127         touch $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.built
128
129 #
130 # This is the build convenience target.
131 #
132 asterisk14-core-sounds-en-gsm: $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.built
133
134 #
135 # If you are building a library, then you need to stage it too.
136 #
137 $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.staged: $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.built
138         rm -f $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.staged
139         touch $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.staged
140
141 asterisk14-core-sounds-en-gsm-stage: $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.staged
142
143 #
144 # This rule creates a control file for ipkg.  It is no longer
145 # necessary to create a seperate control file under sources/asterisk14-core-sounds-en-gsm
146 #
147 $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/CONTROL/control:
148         @install -d $(@D)
149         @rm -f $@
150         @echo "Package: asterisk14-core-sounds-en-gsm" >>$@
151         @echo "Architecture: $(TARGET_ARCH)" >>$@
152         @echo "Priority: $(ASTERISK14_CORE_SOUNDS_EN_GSM_PRIORITY)" >>$@
153         @echo "Section: $(ASTERISK14_CORE_SOUNDS_EN_GSM_SECTION)" >>$@
154         @echo "Version: $(ASTERISK14_CORE_SOUNDS_EN_GSM_VERSION)-$(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_VERSION)" >>$@
155         @echo "Maintainer: $(ASTERISK14_CORE_SOUNDS_EN_GSM_MAINTAINER)" >>$@
156         @echo "Source: $(ASTERISK14_CORE_SOUNDS_EN_GSM_SITE)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_SOURCE)" >>$@
157         @echo "Description: $(ASTERISK14_CORE_SOUNDS_EN_GSM_DESCRIPTION)" >>$@
158         @echo "Depends: $(ASTERISK14_CORE_SOUNDS_EN_GSM_DEPENDS)" >>$@
159         @echo "Suggests: $(ASTERISK14_CORE_SOUNDS_EN_GSM_SUGGESTS)" >>$@
160         @echo "Conflicts: $(ASTERISK14_CORE_SOUNDS_EN_GSM_CONFLICTS)" >>$@
161
162 #
163 # This builds the IPK file.
164 #
165 # Binaries should be installed into $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/sbin or $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/bin
166 # (use the location in a well-known Linux distro as a guide for choosing sbin or bin).
167 # Libraries and include files should be installed into $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/{lib,include}
168 # Configuration files should be installed in $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/etc/asterisk14-core-sounds-en-gsm/...
169 # Documentation files should be installed in $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/doc/asterisk14-core-sounds-en-gsm/...
170 # Daemon startup scripts should be installed in $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/etc/init.d/S??asterisk14-core-sounds-en-gsm
171 #
172 # You may need to patch your application to make it use these locations.
173 #
174 $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK): $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.built
175         rm -rf $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR) $(BUILD_DIR)/asterisk14-core-sounds-en-gsm_*_$(TARGET_ARCH).ipk
176         $(MAKE) $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/CONTROL/control
177         install -d $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds
178         install -m 644 $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/*.gsm $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds
179         install -d $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/dictate
180         install -m 644 $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/dictate/*.gsm $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/dictate
181         install -d $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/digits
182         install -m 644 $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/digits/*.gsm $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/digits
183         install -d $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/followme
184         install -m 644 $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/followme/*.gsm $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/followme
185         install -d $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/letters
186         install -m 644 $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/letters/*.gsm $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/letters
187         install -d $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/phonetic
188         install -m 644 $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/phonetic/*.gsm $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/phonetic
189         install -d $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/silence
190         install -m 644 $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/silence/*.gsm $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)/opt/var/lib/asterisk/sounds/silence
191         cd $(BUILD_DIR); $(IPKG_BUILD) $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR)
192
193 #
194 # This is called from the top level makefile to create the IPK file.
195 #
196 asterisk14-core-sounds-en-gsm-ipk: $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK)
197
198 #
199 # This is called from the top level makefile to clean all of the built files.
200 #
201 asterisk14-core-sounds-en-gsm-clean:
202         rm -f $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR)/.built
203
204 #
205 # This is called from the top level makefile to clean all dynamically created
206 # directories.
207 asterisk14-core-sounds-en-gsm-dirclean:
208         rm -rf $(BUILD_DIR)/$(ASTERISK14_CORE_SOUNDS_EN_GSM_DIR) $(ASTERISK14_CORE_SOUNDS_EN_GSM_BUILD_DIR) $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK_DIR) $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK)
209 #
210 #
211 # Some sanity check for the package.
212 #
213 asterisk14-core-sounds-en-gsm-check: $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK)
214         perl scripts/optware-check-package.pl --target=$(OPTWARE_TARGET) $(ASTERISK14_CORE_SOUNDS_EN_GSM_IPK)
Note: See TracBrowser for help on using the browser.