2 # Copyright (C) 2014 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
:=http
://downloads.asterisk.org
/pub
/telephony
/dahdi-tools
/releases
/
16 PKG_MD5SUM
:=224c5b86195249d5ce462ca316332087
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
)
34 TITLE
:=DAHDI tools dahdi_cfg and dahdi_scan
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-tool
43 $(call Package
/dahdi-cfg
/Default
)
44 TITLE
:=DAHDI tools dahdi_tool
47 define Package
/dahdi-tools-libtonezone
48 $(call Package
/dahdi-cfg
/Default
)
51 TITLE
:=DAHDI tonezone library
54 TARGET_CFLAGS
+= $(FPIC
)
55 EXTRA_CFLAGS
:= $(TARGET_CPPFLAGS
)
58 --with-dahdi
="$(STAGING_DIR)/usr" \
65 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
66 $(TARGET_CONFIGURE_OPTS
) \
68 CROSS_COMPILE
="$(TARGET_CROSS)" \
69 CFLAGS
="$(TARGET_CFLAGS) -I. -DBUILDING_TONEZONE -I$(STAGING_DIR)/usr/include" \
71 DESTDIR
="$(PKG_INSTALL_DIR)" \
72 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
73 DAHDI_INCLUDE
="$(STAGING_DIR)/usr/include" \
74 CONFIGURE_SILENT
="--silent" \
75 dahdi_cfg dahdi_monitor dahdi_tool dahdi_scan dahdi_speed dahdi_test fxotune libs
78 define Build
/InstallDev
79 $(INSTALL_DIR
) $(1)/usr
/lib
80 $(CP
) $(PKG_BUILD_DIR
)/libtonezone.so
$(1)/usr
/lib
/
81 $(CP
) $(PKG_BUILD_DIR
)/libtonezone.a
$(1)/usr
/lib
/
83 $(INSTALL_DIR
) $(1)/usr
/include/dahdi
84 $(CP
) $(PKG_BUILD_DIR
)/tonezone.h
$(1)/usr
/include/dahdi
/
87 define Package
/dahdi-cfg
/install
88 $(INSTALL_DIR
) $(1)/usr
/sbin
89 $(CP
) $(PKG_BUILD_DIR
)/dahdi_cfg
$(1)/usr
/sbin
/
90 $(CP
) $(PKG_BUILD_DIR
)/dahdi_scan
$(1)/usr
/sbin
/
93 define Package
/dahdi-monitor
/install
94 $(INSTALL_DIR
) $(1)/usr
/sbin
95 $(CP
) $(PKG_BUILD_DIR
)/dahdi_monitor
$(1)/usr
/sbin
/
96 $(CP
) $(PKG_BUILD_DIR
)/dahdi_speed
$(1)/usr
/sbin
/
97 $(CP
) $(PKG_BUILD_DIR
)/dahdi_test
$(1)/usr
/sbin
/
100 define Package
/dahdi-tool
/install
101 $(INSTALL_DIR
) $(1)/usr
/sbin
102 $(CP
) $(PKG_BUILD_DIR
)/dahdi_tool
$(1)/usr
/sbin
/
105 define Package
/dahdi-tools-libtonezone
/install
106 $(INSTALL_DIR
) $(1)/usr
/lib
107 $(CP
) $(PKG_BUILD_DIR
)/libtonezone.so
$(1)/usr
/lib
/
108 cd
$(1)/usr
/lib
/; ln
-s libtonezone.so libtonezone.so
.2.0
111 $(eval
$(call BuildPackage
,dahdi-cfg
))
112 $(eval
$(call BuildPackage
,dahdi-monitor
))
113 $(eval
$(call BuildPackage
,dahdi-tool
))
114 $(eval
$(call BuildPackage
,dahdi-tools-libtonezone
))