Merge pull request #868 from neheb/4
[feed/telephony.git] / libs / dahdi-tools / Makefile
1 #
2 # Copyright (C) 2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=dahdi-tools
11 PKG_VERSION:=3.1.0
12 PKG_RELEASE:=3
13
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:=ea852ebd274ee1cc90ff5e4ac84261b0b787b1a74e8b76ad659bc9ec4f77e67e
17
18 PKG_LICENSE:=GPL-2.0
19 PKG_LICENSE_FILES:=LICENSE
20 PKG_MAINTAINER:=Vittorio Gambaletta <openwrt@vittgam.net>
21
22 PKG_BUILD_PARALLEL:=1
23
24 PKG_FIXUP:=autoreconf
25
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/dahdi-cfg/Default
31 SECTION:=utils
32 CATEGORY:=Utilities
33 SUBMENU:=Telephony
34 DEPENDS=+kmod-dahdi
35 endef
36
37 define Package/dahdi-cfg
38 $(call Package/dahdi-cfg/Default)
39 DEPENDS+=+libpthread +dahdi-tools-libtonezone
40 TITLE:=DAHDI tools dahdi_cfg, dahdi_scan and fxotune
41 endef
42
43 define Package/dahdi-monitor
44 $(call Package/dahdi-cfg/Default)
45 TITLE:=DAHDI tools dahdi_monitor, dahdi_speed and dahdi_test
46 endef
47
48 define Package/dahdi-tools-libtonezone
49 $(call Package/dahdi-cfg/Default)
50 SECTION:=libs
51 CATEGORY:=Libraries
52 TITLE:=DAHDI tonezone library
53 endef
54
55 CONFIGURE_ARGS += \
56 --disable-silent-rules \
57 --with-perllib="" \
58 --without-libusb \
59 --without-libusbx \
60 --without-newt \
61 --without-pcap \
62 --without-ppp \
63 --without-selinux \
64 --without-usb
65
66 # https://issues.asterisk.org/jira/browse/DAHTOOL-85
67 TARGET_CFLAGS+=-fcommon
68
69 define Build/InstallDev
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.{a,so*} \
72 $(1)/usr/lib/
73 $(INSTALL_DIR) $(1)/usr/include/dahdi
74 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/dahdi/tonezone.h \
75 $(1)/usr/include/dahdi/
76 endef
77
78 define Package/dahdi-cfg/install
79 $(INSTALL_DIR) $(1)/usr/sbin
80 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{dahdi_cfg,dahdi_scan,fxotune} \
81 $(1)/usr/sbin/
82 endef
83
84 define Package/dahdi-monitor/install
85 $(INSTALL_DIR) $(1)/usr/sbin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{dahdi_monitor,dahdi_speed,dahdi_test} \
87 $(1)/usr/sbin/
88 endef
89
90 define Package/dahdi-tools-libtonezone/install
91 $(INSTALL_DIR) $(1)/usr/lib
92 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so* $(1)/usr/lib/
93 endef
94
95 $(eval $(call BuildPackage,dahdi-cfg))
96 $(eval $(call BuildPackage,dahdi-monitor))
97 $(eval $(call BuildPackage,dahdi-tools-libtonezone))