Makefile 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= asterisk
  5. PKG_VERSION:= 12.3.0
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 4a5bdeb8e4ab6633a5e1a3c0efbf158c
  8. PKG_DESCR:= open source pbx
  9. PKG_SECTION:= net/voip
  10. PKG_DEPENDS:= libncurses libpthread libopenssl libcurl libstdcxx
  11. PKG_DEPENDS+= libsqlite
  12. PKG_BUILDDEP:= ncurses openssl zlib curl popt libjansson sqlite
  13. PKG_URL:= http://www.asterisk.org/
  14. PKG_SITES:= http://downloads.asterisk.org/pub/telephony/asterisk/releases/
  15. PKG_LIBC_DEPENDS:= glibc
  16. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
  17. PKG_SUBPKGS:= ASTERISK ASTERISK_PGSQL ASTERISK_VOICEMAIL ASTERISK_SOUNDS
  18. PKG_SUBPKGS+= ASTERISK_CHAN_SKINNY ASTERISK_CHAN_IAX2 ASTERISK_CODEC_SPEEX ASTERISK_CODEC_GSM
  19. PKG_SUBPKGS+= ASTERISK_PBX_DUNDI ASTERISK_RES_AGI
  20. PKGSD_ASTERISK_VOICEMAIL:= voicemail support
  21. PKGSN_ASTERISK_VOICEMAIL:= asterisk
  22. PKGSD_ASTERISK_CODEC_GSM:= GSM codec support
  23. PKGSN_ASTERISK_CODEC_GSM:= asterisk
  24. PKGSD_ASTERISK_PBX_DUNDI:= PBX dundi support
  25. PKGSN_ASTERISK_PBX_DUNDI:= asterisk
  26. PKGSD_ASTERISK_RES_AGI:= res agi support
  27. PKGSN_ASTERISK_RES_AGI:= asterisk
  28. PKGSD_ASTERISK_PGSQL:= postgresql support
  29. PKGSB_ASTERISK_PGSQL:= postgresql
  30. PKGSN_ASTERISK_PGSQL:= asterisk
  31. PKGSD_ASTERISK_CHAN_MGCP:= Media Gateway Control Protocol implementation
  32. PKGSN_ASTERISK_CHAN_MGCP:= asterisk
  33. PKGSD_ASTERISK_CHAN_SKINNY:= skinny client control protocol implementation
  34. PKGSN_ASTERISK_CHAN_SKINNY:= asterisk
  35. PKGSD_ASTERISK_CHAN_IAX2:= support for the Inter Asterisk Protocol
  36. PKGSN_ASTERISK_CHAN_IAX2:= asterisk
  37. PKGSD_ASTERISK_CODEC_SPEEX:= speex/PCM16 Codec translator
  38. PKGSB_ASTERISK_CODEC_SPEEX:= speex
  39. PKGSN_ASTERISK_CODEC_SPEEX:= asterisk
  40. PKGSD_ASTERISK_SOUNDS:= various soundfiles in GSM format
  41. PKGSN_ASTERISK_SOUNDS:= asterisk
  42. PKGSS_ASTERISK_SOUNDS:= asterisk-codec-gsm
  43. include $(ADK_TOPDIR)/mk/package.mk
  44. $(eval $(call PKG_template,ASTERISK,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  45. $(eval $(call PKG_template,ASTERISK_PGSQL,asterisk-pgsql,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ASTERISK_PGSQL},${PKG_SECTION}))
  46. $(eval $(call PKG_template,ASTERISK_VOICEMAIL,asterisk-voicemail,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ASTERISK_VOICEMAIL},${PKG_SECTION}))
  47. $(eval $(call PKG_template,ASTERISK_SOUNDS,asterisk-sounds,$(PKG_VERSION)-${PKG_RELEASE},${PKGSS_ASTERISK_SOUNDS},${PKGSD_ASTERISK_SOUNDS},${PKG_SECTION}))
  48. #$(eval $(call PKG_template,ASTERISK_CHAN_MGCP,asterisk-chan-mgcp,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ASTERISK_CHAN_MGCP},${PKG_SECTION}))
  49. $(eval $(call PKG_template,ASTERISK_CHAN_SKINNY,asterisk-chan-skinny,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ASTERISK_CHAN_SKINNY},${PKG_SECTION}))
  50. $(eval $(call PKG_template,ASTERISK_CHAN_IAX2,asterisk-chan-iax2,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ASTERISK_CHAN_IAX2},${PKG_SECTION}))
  51. $(eval $(call PKG_template,ASTERISK_CODEC_SPEEX,asterisk-codec-speex,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ASTERISK_CODEC_SPEEX},${PKG_SECTION}))
  52. $(eval $(call PKG_template,ASTERISK_CODEC_GSM,asterisk-codec-gsm,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ASTERISK_CODEC_GSM},${PKG_SECTION}))
  53. $(eval $(call PKG_template,ASTERISK_PBX_DUNDI,asterisk-pbx-dundi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ASTERISK_PBX_DUNDI},${PKG_SECTION}))
  54. $(eval $(call PKG_template,ASTERISK_RES_AGI,asterisk-res-agi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ASTERISK_RES_AGI},${PKG_SECTION}))
  55. AUTOTOOL_STYLE:= bootstrap
  56. CONFIGURE_ARGS= --with-z=${STAGING_TARGET_DIR}/usr \
  57. --with-ncurses=${STAGING_TARGET_DIR}/usr \
  58. --with-ssl=${STAGING_TARGET_DIR}/usr \
  59. --disable-xmldoc \
  60. --without-tonezone \
  61. --without-asound \
  62. --without-curses \
  63. --without-gtk2 \
  64. --without-h323 \
  65. --without-iksemel \
  66. --without-imap \
  67. --without-nbs \
  68. --without-netsnmp \
  69. --without-newt \
  70. --without-osptk \
  71. --without-oss \
  72. --without-popt \
  73. --without-pri \
  74. --without-pwlib \
  75. --without-tds \
  76. --without-termcap \
  77. --without-vpb \
  78. --without-misdn \
  79. --without-isdnnet \
  80. --without-suppserv
  81. ifneq (${ADK_PACKAGE_ASTERISK_CODEC_GSM},)
  82. CONFIGURE_ARGS+= --with-gsm=internal
  83. else
  84. CONFIGURE_ARGS+= --without-gsm
  85. endif
  86. ifneq (${ADK_PACKAGE_ASTERISK_CODEC_SPEEX},)
  87. CONFIGURE_ARGS+= --with-speex=${STAGING_TARGET_DIR}/usr
  88. EXTRA_CFLAGS+= -I$(STAGING_TARGET_DIR)/usr/include/speex
  89. endif
  90. ifneq (${ADK_PACKAGE_ASTERISK_FORMAT_VORBIS},)
  91. CONFIGURE_ARGS+= --with-ogg=${STAGING_TARGET_DIR}/usr \
  92. --with-vorbis=${STAGING_TARGET_DIR}/usr
  93. TARGET_LDFLAGS+= -logg
  94. endif
  95. ifneq (${ADK_PACKAGE_ASTERISK_CURL},)
  96. CONFIGURE_ARGS+= --with-libcurl=${STAGING_TARGET_DIR}/usr
  97. else
  98. CONFIGURE_ARGS+= --without-libcurl
  99. endif
  100. ifneq (${ADK_PACKAGE_ASTERISK_PGSQL},)
  101. CONFIGURE_ARGS+= --with-postgres=${STAGING_TARGET_DIR}/usr
  102. else
  103. CONFIGURE_ARGS+= --without-postgres
  104. endif
  105. MAKE_FLAGS+= NOISY_BUILD=1
  106. post-build:
  107. cd ${WRKBUILD}/sounds ; \
  108. tar xzf asterisk-core-sounds-en-gsm-1.4.25.tar.gz; \
  109. rm asterisk-core-sounds-en-gsm-1.4.25.tar.gz
  110. asterisk-pgsql-install:
  111. ${INSTALL_DIR} $(IDIR_ASTERISK_PGSQL)/usr/lib/asterisk/modules
  112. ${INSTALL_BIN} $(WRKINST)/usr/lib/asterisk/modules/cdr_pgsql.so \
  113. $(IDIR_ASTERISK_PGSQL)/usr/lib/asterisk/modules/
  114. asterisk-sounds-install:
  115. ${INSTALL_DIR} $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds
  116. $(CP) $(WRKBUILD)/sounds/* \
  117. $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/
  118. (cd $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds; \
  119. rm -f *.mp3 vm-*; \
  120. rm -f CHANGES* CREDITS* LICENSE* *.txt ; \
  121. rm -f *.tar.gz Makefile ; \
  122. )
  123. asterisk-voicemail-install:
  124. ${INSTALL_DIR} $(IDIR_ASTERISK_VOICEMAIL)/etc/asterisk
  125. ${INSTALL_DIR} $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules
  126. ${INSTALL_DATA} $(WRKBUILD)/configs/voicemail.conf.sample \
  127. $(IDIR_ASTERISK_VOICEMAIL)/etc/asterisk/voicemail.conf
  128. ${CP} $(WRKBUILD)/apps/*voicemail.so \
  129. $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules/
  130. ${INSTALL_BIN} $(WRKBUILD)/res/res_adsi.so \
  131. $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules/
  132. ${INSTALL_DIR} $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds
  133. $(CP) $(WRKBUILD)/sounds/vm-*.gsm \
  134. $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds/
  135. asterisk-chan-mgcp-install:
  136. ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_MGCP)/etc/asterisk
  137. ${INSTALL_DATA} $(WRKBUILD)/configs/mgcp.conf.sample \
  138. $(IDIR_ASTERISK_CHAN_MGCP)/etc/asterisk/mgcp.conf
  139. ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_MGCP)/usr/lib/asterisk/modules
  140. ${INSTALL_BIN} $(WRKBUILD)/channels/chan_mgcp.so \
  141. $(IDIR_ASTERISK_CHAN_MGCP)/usr/lib/asterisk/modules/
  142. asterisk-chan-skinny-install:
  143. ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_SKINNY)/etc/asterisk
  144. ${INSTALL_DATA} $(WRKBUILD)/configs/skinny.conf.sample \
  145. $(IDIR_ASTERISK_CHAN_SKINNY)/etc/asterisk/skinny.conf
  146. ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_SKINNY)/usr/lib/asterisk/modules
  147. ${INSTALL_BIN} $(WRKBUILD)/channels/chan_skinny.so \
  148. $(IDIR_ASTERISK_CHAN_SKINNY)/usr/lib/asterisk/modules/
  149. asterisk-chan-iax2-install:
  150. ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_IAX2)/etc/asterisk
  151. ${INSTALL_DIR} $(IDIR_ASTERISK_CHAN_IAX2)/usr/lib/asterisk/modules
  152. ${INSTALL_DATA} $(WRKBUILD)/configs/iax.conf.sample \
  153. $(IDIR_ASTERISK_CHAN_IAX2)/etc/asterisk/iax.conf
  154. ${INSTALL_DATA} $(WRKBUILD)/configs/iaxprov.conf.sample \
  155. $(IDIR_ASTERISK_CHAN_IAX2)/etc/asterisk/iaxprov.conf
  156. ${INSTALL_BIN} $(WRKBUILD)/channels/chan_iax2.so \
  157. $(IDIR_ASTERISK_CHAN_IAX2)/usr/lib/asterisk/modules/
  158. asterisk-codec-speex-install:
  159. ${INSTALL_DIR} $(IDIR_ASTERISK_CODEC_SPEEX)/usr/lib/asterisk/modules
  160. ${INSTALL_BIN} $(WRKBUILD)/codecs/codec_speex.so \
  161. $(IDIR_ASTERISK_CODEC_SPEEX)/usr/lib/asterisk/modules/
  162. asterisk-codec-gsm-install:
  163. ${INSTALL_DIR} $(IDIR_ASTERISK_CODEC_GSM)/usr/lib/asterisk/modules/
  164. ${INSTALL_BIN} $(WRKBUILD)/codecs/codec_gsm.so \
  165. $(IDIR_ASTERISK_CODEC_GSM)/usr/lib/asterisk/modules/
  166. asterisk-pbx-dundi-install:
  167. ${INSTALL_DIR} $(IDIR_ASTERISK_PBX_DUNDI)/etc/asterisk
  168. ${INSTALL_DATA} $(WRKBUILD)/configs/dundi.conf.sample \
  169. $(IDIR_ASTERISK_PBX_DUNDI)/etc/asterisk/dundi.conf
  170. ${INSTALL_DIR} $(IDIR_ASTERISK_PBX_DUNDI)/usr/lib/asterisk/modules
  171. ${INSTALL_BIN} $(WRKBUILD)/pbx/pbx_dundi.so \
  172. $(IDIR_ASTERISK_PBX_DUNDI)/usr/lib/asterisk/modules/
  173. asterisk-res-agi-install:
  174. ${INSTALL_DIR} $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/agi-bin
  175. ${INSTALL_DIR} $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/modules
  176. ${INSTALL_BIN} $(WRKBUILD)/res/res_agi.so \
  177. $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/modules/
  178. asterisk-meetme-install:
  179. ${INSTALL_DIR} ${IDIR_ASTERISK_MEETME}/etc/asterisk/
  180. ${INSTALL_DIR} ${IDIR_ASTERISK_MEETME}/usr/lib/asterisk/modules
  181. ${INSTALL_DATA} ${WRKBUILD}/configs/meetme.conf.sample \
  182. ${IDIR_ASTERISK_MEETME}/etc/asterisk/meetme.conf
  183. ${INSTALL_BIN} ${WRKBUILD}/apps/app_meetme.so \
  184. ${IDIR_ASTERISK_MEETME}/usr/lib/asterisk/modules
  185. include ${ADK_TOPDIR}/mk/pkg-bottom.mk