2 # Copyright (C) 2014 - 2018 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://downloads.asterisk.org
/pub
/telephony
/dahdi-tools
/releases
16 PKG_HASH
:=53ffeb333f3e44b0c88e5b17475cdbf87d3f652eb81a6422de76250c061e2909
19 PKG_LICENSE_FILES
:=LICENSE
20 PKG_MAINTAINER
:=Vittorio Gambaletta
<openwrt@vittgam.net
>
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/dahdi-cfg
/Default
31 define Package
/dahdi-cfg
32 $(call Package
/dahdi-cfg
/Default
)
33 DEPENDS
+=+libpthread
+dahdi-tools-libtonezone
34 TITLE
:=DAHDI tools dahdi_cfg
, dahdi_scan and fxotune
37 define Package
/dahdi-monitor
38 $(call Package
/dahdi-cfg
/Default
)
39 TITLE
:=DAHDI tools dahdi_monitor
, dahdi_speed and dahdi_test
42 define Package
/dahdi-tools-libtonezone
43 $(call Package
/dahdi-cfg
/Default
)
46 TITLE
:=DAHDI tonezone library
50 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
52 CROSS_COMPILE
="$(TARGET_CROSS)" \
53 CFLAGS
="$(TARGET_CFLAGS)" \
54 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
55 dahdi_cfg dahdi_monitor dahdi_scan dahdi_speed dahdi_test fxotune
58 define Build
/InstallDev
59 $(INSTALL_DIR
) $(1)/usr
/lib
60 $(CP
) $(PKG_BUILD_DIR
)/.libs
/*.so
* $(1)/usr
/lib
/
61 $(CP
) $(PKG_BUILD_DIR
)/.libs
/*.a
$(1)/usr
/lib
/
63 $(INSTALL_DIR
) $(1)/usr
/include/dahdi
64 $(CP
) $(PKG_BUILD_DIR
)/tonezone.h
$(1)/usr
/include/dahdi
/
67 define Package
/dahdi-cfg
/install
68 $(INSTALL_DIR
) $(1)/usr
/sbin
69 $(CP
) $(PKG_BUILD_DIR
)/.libs
/dahdi_cfg
$(1)/usr
/sbin
/
70 $(CP
) $(PKG_BUILD_DIR
)/dahdi_scan
$(1)/usr
/sbin
/
71 $(CP
) $(PKG_BUILD_DIR
)/fxotune
$(1)/usr
/sbin
/
74 define Package
/dahdi-monitor
/install
75 $(INSTALL_DIR
) $(1)/usr
/sbin
76 $(CP
) $(PKG_BUILD_DIR
)/dahdi_monitor
$(1)/usr
/sbin
/
77 $(CP
) $(PKG_BUILD_DIR
)/dahdi_speed
$(1)/usr
/sbin
/
78 $(CP
) $(PKG_BUILD_DIR
)/dahdi_test
$(1)/usr
/sbin
/
81 define Package
/dahdi-tools-libtonezone
/install
82 $(INSTALL_DIR
) $(1)/usr
/lib
83 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libtonezone.so
.2.0.0 $(1)/usr
/lib
/
84 cd
$(1)/usr
/lib
/; ln
-s libtonezone.so
.2.0.0 libtonezone.so
; ln
-s libtonezone.so
.2.0.0 libtonezone.so
.2
87 $(eval
$(call BuildPackage
,dahdi-cfg
))
88 $(eval
$(call BuildPackage
,dahdi-monitor
))
89 $(eval
$(call BuildPackage
,dahdi-tools-libtonezone
))