18357ad67fe6700e0b72e8bf3de353c2b891f045
[feed/telephony.git] / net / asterisk-chan-sccp / Makefile
1 #
2 # Copyright (C) 2016 OpenWrt.org
3 # Copyright (C) 2016 Cesnet, z.s.p.o.
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=chan-sccp
12 PKG_VERSION:=v4.3.1-20181225
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_URL:=https://github.com/chan-sccp/chan-sccp.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=614fc3e7514c56b233431f92b87e6cf211f5d925
19 PKG_MIRROR_HASH:=9c56a5b9d0768bd79e5c2cc1c4704ffbbbe9c6d2a2f8d994ff145143d4814fda
20 PKG_SOURCE_PROTO:=git
21
22 PKG_FIXUP:=autoreconf
23
24 PKG_LICENSE:=GPL-1.0
25 PKG_LICENSE_FILES:=COPYING LICENSE
26 PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
27
28 PKG_INSTALL:=1
29
30 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
31
32 include $(INCLUDE_DIR)/package.mk
33 # chan-sccp needs iconv
34 include $(INCLUDE_DIR)/nls.mk
35
36 define Package/chan-sccp/Default
37 SUBMENU:=Telephony
38 SECTION:=net
39 CATEGORY:=Network
40 TITLE:=SCCP channel support
41 URL:=https://github.com/chan-sccp/chan-sccp
42 DEPENDS:=$(ICONV_DEPENDS) +libltdl
43 endef
44
45 define Package/asterisk13-chan-sccp
46 $(call Package/chan-sccp/Default)
47 DEPENDS+=asterisk13
48 VARIANT:=asterisk13
49 CONFLICTS:=asterisk13-chan-skinny
50 endef
51
52 define Package/asterisk15-chan-sccp
53 $(call Package/chan-sccp/Default)
54 DEPENDS+=asterisk15
55 VARIANT:=asterisk15
56 CONFLICTS:=asterisk15-chan-skinny
57 endef
58
59 define Package/description/Default
60 Replacement for the SCCP channel driver (chan_skinny) in Asterisk.
61 Extended features include shared lines, presence / BLF, customizable
62 feature buttons and custom device state.
63 endef
64
65 Package/asterisk13-chan-sccp/description = $(Package/description/Default)
66 Package/asterisk15-chan-sccp/description = $(Package/description/Default)
67
68 CONFIGURE_ARGS += \
69 --disable-debug \
70 --enable-advanced-functions \
71 --enable-conference \
72 --enable-video
73
74 ifeq ($(BUILD_VARIANT),asterisk13)
75 CONFIGURE_ARGS += --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-13
76 endif
77
78 ifeq ($(BUILD_VARIANT),asterisk15)
79 CONFIGURE_ARGS += --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-15
80 endif
81
82 define Package/conffiles/Default
83 /etc/asterisk/sccp.conf
84 endef
85
86 Package/asterisk13-chan-sccp/conffiles = $(Package/conffiles/Default)
87 Package/asterisk15-chan-sccp/conffiles = $(Package/conffiles/Default)
88
89 define Package/Install/Default
90 $(INSTALL_DIR) $(1)/etc/asterisk
91 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/asterisk/sccp.conf $(1)/etc/asterisk
92 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
93 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_sccp.so $(1)/usr/lib/asterisk/modules/
94 endef
95
96 Package/asterisk13-chan-sccp/install = $(Package/Install/Default)
97 Package/asterisk15-chan-sccp/install = $(Package/Install/Default)
98
99 $(eval $(call BuildPackage,asterisk13-chan-sccp))
100 $(eval $(call BuildPackage,asterisk15-chan-sccp))