3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=4cc3c1e4a1b12e0e4c748326ad153291
10 PKG_SOURCE_URL
:=http
://www.asterisk.org
/html
/downloads ftp
://ftp.asterisk.org
/pub
/asterisk
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
12 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 include $(TOPDIR
)/package
/rules.mk
16 $(eval
$(call PKG_template
,ASTERISK
,asterisk
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
17 $(eval
$(call PKG_template
,ASTERISK_MYSQL
,asterisk-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
18 $(eval
$(call PKG_template
,ASTERISK_PGSQL
,asterisk-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
19 $(eval
$(call PKG_template
,ASTERISK_VOICEMAIL
,asterisk-voicemail
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
20 $(eval
$(call PKG_template
,ASTERISK_SOUNDS
,asterisk-sounds
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
21 $(eval
$(call PKG_template
,ASTERISK_CODEC_ILBC
,asterisk-codec-ilbc
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
22 $(eval
$(call PKG_template
,ASTERISK_CODEC_LPC10
,asterisk-codec-lpc10
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
23 $(eval
$(call PKG_template
,ASTERISK_CODEC_SPEEX
,asterisk-codec-speex
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
24 $(eval
$(call PKG_template
,ASTERISK_PBX_DUNDI
,asterisk-pbx-dundi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
28 ifneq ($(BR2_PACKAGE_ASTERISK_MYSQL
),)
29 APPS
+= app_sql_mysql.so
32 ifneq ($(BR2_PACKAGE_ASTERISK_PGSQL
),)
33 APPS
+= app_sql_postgres.so
36 ifneq ($(BR2_PACKAGE_ASTERISK_CODEC_SPEEX
),)
40 $(PKG_BUILD_DIR
)/.configured
:
43 $(PKG_BUILD_DIR
)/.built
:
44 $(MAKE
) -C
"$(PKG_BUILD_DIR)/channels" \
47 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
48 CC_FOR_BUILD
="$(HOSTCC)" \
49 $(TARGET_CONFIGURE_OPTS
) \
50 OPTIMIZE
="$(TARGET_CFLAGS)" \
52 CFLAGS_EXTRA
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/speex" \
53 LDFLAGS_EXTRA
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/mysql" \
54 CRYPTO_LIBS
="-L$(STAGING_DIR)/usr/lib -Wl,-Bstatic -lssl -lcrypto -Wl,-Bdynamic" \
55 EXTRA_APPS
="$(APPS)" \
56 EXTRA_MODS
="$(MODS)" \
61 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
62 DESTDIR
="$(IDIR_ASTERISK)" \
64 rm -rf
$(IDIR_ASTERISK
)/usr
/sbin
/astgenkey
65 rm -rf
$(IDIR_ASTERISK
)/usr
/bin
66 rm -rf
$(IDIR_ASTERISK
)/usr
/share
67 rm -rf
$(IDIR_ASTERISK
)/usr
/include
68 rm -rf
$(IDIR_ASTERISK
)/var
69 (cd
$(IDIR_ASTERISK
)/usr
/lib
/asterisk
; \
77 rm -rf
*adsi
* *festival
* *modem
* *meetme
* *oss
* *phone
* *intercom
* \
78 *mp3
* *nbscat
* *mysql
* *postgres
* *pgsql
* *voicemail
* *speex
* \
79 *musiconhold
* *zapateller
* *jpeg
*; \
80 rm -f
{codec
,format
}_ilbc.so
; \
81 rm -f codec_lpc10.so
; \
82 rm -f pbx_dundi.so
; \
84 (cd
$(IDIR_ASTERISK
)/etc
/asterisk
; \
85 rm -f
*odbc
* *mysql
* *postgres
* *pgsql
* *voicemail
* *adsi
* *oss
* *alsa
* \
86 *festival
* *modem
* *meetme
* *phone
* *tds
* *vofr
* *rpt
* *vpb
* \
87 *zapata
* *musiconhold
*; \
90 install -d
-m0755
$(IDIR_ASTERISK
)/etc
/default
91 install -m0644 .
/files
/asterisk.default
$(IDIR_ASTERISK
)/etc
/default
/asterisk
92 install -d
-m0755
$(IDIR_ASTERISK
)/etc
/init.d
93 install -m0755 .
/files
/asterisk.init
$(IDIR_ASTERISK
)/etc
/init.d
/asterisk
94 ln
-sf asterisk
$(IDIR_ASTERISK
)/etc
/init.d
/S60asterisk
95 $(RSTRIP
) $(IDIR_ASTERISK
)
96 $(IPKG_BUILD
) $(IDIR_ASTERISK
) $(PACKAGE_DIR
)
98 $(IPKG_ASTERISK_MYSQL
):
99 install -d
-m0755
$(IDIR_ASTERISK_MYSQL
)/etc
/asterisk
100 install -m0600
$(PKG_BUILD_DIR
)/configs
/cdr_mysql.conf.sample
$(IDIR_ASTERISK_MYSQL
)/etc
/asterisk
/cdr_mysql.conf
101 install -d
-m0755
$(IDIR_ASTERISK_MYSQL
)/usr
/lib
/asterisk
/modules
102 install -m0755
$(PKG_BUILD_DIR
)/apps
/app_sql_mysql.so
$(IDIR_ASTERISK_MYSQL
)/usr
/lib
/asterisk
/modules
/
103 install -m0755
$(PKG_BUILD_DIR
)/cdr
/cdr_mysql.so
$(IDIR_ASTERISK_MYSQL
)/usr
/lib
/asterisk
/modules
/
104 $(RSTRIP
) $(IDIR_ASTERISK_MYSQL
)
105 $(IPKG_BUILD
) $(IDIR_ASTERISK_MYSQL
) $(PACKAGE_DIR
)
107 $(IPKG_ASTERISK_PGSQL
):
108 install -d
-m0755
$(IDIR_ASTERISK_PGSQL
)/etc
/asterisk
109 install -m0600
$(PKG_BUILD_DIR
)/configs
/cdr_pgsql.conf.sample
$(IDIR_ASTERISK_PGSQL
)/etc
/asterisk
/cdr_pgsql.conf
110 install -d
-m0755
$(IDIR_ASTERISK_PGSQL
)/usr
/lib
/asterisk
/modules
111 install -m0755
$(PKG_BUILD_DIR
)/apps
/app_sql_postgres.so
$(IDIR_ASTERISK_PGSQL
)/usr
/lib
/asterisk
/modules
/
112 install -m0755
$(PKG_BUILD_DIR
)/cdr
/cdr_pgsql.so
$(IDIR_ASTERISK_PGSQL
)/usr
/lib
/asterisk
/modules
/
113 $(RSTRIP
) $(IDIR_ASTERISK_PGSQL
)
114 $(IPKG_BUILD
) $(IDIR_ASTERISK_PGSQL
) $(PACKAGE_DIR
)
116 $(IPKG_ASTERISK_SOUNDS
):
117 install -d
-m0755
$(IDIR_ASTERISK_SOUNDS
)/usr
/lib
/asterisk
/sounds
118 cp
-fpR
$(PKG_BUILD_DIR
)/sounds
/* $(IDIR_ASTERISK_SOUNDS
)/usr
/lib
/asterisk
/sounds
/
119 rm -f
$(IDIR_ASTERISK_SOUNDS
)/usr
/lib
/asterisk
/sounds
/*.mp3
120 rm -f
$(IDIR_ASTERISK_SOUNDS
)/usr
/lib
/asterisk
/sounds
/vm-
*
121 $(IPKG_BUILD
) $(IDIR_ASTERISK_SOUNDS
) $(PACKAGE_DIR
)
123 $(IPKG_ASTERISK_VOICEMAIL
):
124 install -d
-m0755
$(IDIR_ASTERISK_VOICEMAIL
)/etc
/asterisk
125 install -m0644
$(PKG_BUILD_DIR
)/configs
/voicemail.conf.sample
$(IDIR_ASTERISK_VOICEMAIL
)/etc
/asterisk
/voicemail.conf
126 install -d
-m0755
$(IDIR_ASTERISK_VOICEMAIL
)/usr
/lib
/asterisk
/modules
127 install -m0755
$(PKG_BUILD_DIR
)/apps
/*voicemail.so
$(IDIR_ASTERISK_VOICEMAIL
)/usr
/lib
/asterisk
/modules
/
128 $(RSTRIP
) $(IDIR_ASTERISK_VOICEMAIL
)
129 $(IPKG_BUILD
) $(IDIR_ASTERISK_VOICEMAIL
) $(PACKAGE_DIR
)
131 $(IPKG_ASTERISK_CODEC_ILBC
):
132 install -d
-m0755
$(IDIR_ASTERISK_CODEC_ILBC
)/usr
/lib
/asterisk
/modules
133 install -m0755
$(PKG_BUILD_DIR
)/codecs
/codec_ilbc.so
$(IDIR_ASTERISK_CODEC_ILBC
)/usr
/lib
/asterisk
/modules
/
134 install -m0755
$(PKG_BUILD_DIR
)/formats
/format_ilbc.so
$(IDIR_ASTERISK_CODEC_ILBC
)/usr
/lib
/asterisk
/modules
/
135 $(RSTRIP
) $(IDIR_ASTERISK_CODEC_ILBC
)
136 $(IPKG_BUILD
) $(IDIR_ASTERISK_CODEC_ILBC
) $(PACKAGE_DIR
)
138 $(IPKG_ASTERISK_CODEC_LPC10
):
139 install -d
-m0755
$(IDIR_ASTERISK_CODEC_LPC10
)/usr
/lib
/asterisk
/modules
140 install -m0755
$(PKG_BUILD_DIR
)/codecs
/codec_lpc10.so
$(IDIR_ASTERISK_CODEC_LPC10
)/usr
/lib
/asterisk
/modules
/
141 $(RSTRIP
) $(IDIR_ASTERISK_CODEC_LPC10
)
142 $(IPKG_BUILD
) $(IDIR_ASTERISK_CODEC_LPC10
) $(PACKAGE_DIR
)
144 $(IPKG_ASTERISK_CODEC_SPEEX
):
145 install -d
-m0755
$(IDIR_ASTERISK_CODEC_SPEEX
)/usr
/lib
/asterisk
/modules
146 install -m0755
$(PKG_BUILD_DIR
)/codecs
/codec_speex.so
$(IDIR_ASTERISK_CODEC_SPEEX
)/usr
/lib
/asterisk
/modules
/
147 $(RSTRIP
) $(IDIR_ASTERISK_CODEC_SPEEX
)
148 $(IPKG_BUILD
) $(IDIR_ASTERISK_CODEC_SPEEX
) $(PACKAGE_DIR
)
150 $(IPKG_ASTERISK_PBX_DUNDI
):
151 install -d
-m0755
$(IDIR_ASTERISK_PBX_DUNDI
)/etc
/asterisk
152 install -m0644
$(PKG_BUILD_DIR
)/configs
/dundi.conf.sample
$(IDIR_ASTERISK_PBX_DUNDI
)/etc
/asterisk
/dundi.conf
153 install -d
-m0755
$(IDIR_ASTERISK_PBX_DUNDI
)/usr
/lib
/asterisk
/modules
154 install -m0755
$(PKG_BUILD_DIR
)/pbx
/pbx_dundi.so
$(IDIR_ASTERISK_PBX_DUNDI
)/usr
/lib
/asterisk
/modules
/
155 $(RSTRIP
) $(IDIR_ASTERISK_PBX_DUNDI
)
156 $(IPKG_BUILD
) $(IDIR_ASTERISK_PBX_DUNDI
) $(PACKAGE_DIR
)