2 # Copyright (C) 2016 - 2017 OpenWrt.org
3 # Copyright (C) 2016 Cesnet, z.s.p.o.
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
12 PKG_VERSION
:=v4.3
.0-20171123
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
:=ed272e974897f075573a358d169e5c77889f5905
19 PKG_MIRROR_HASH
:=b2fa296e532154b864164a9bc8d64a40dddef2940902b61c3726c77f56b4e74e
25 PKG_LICENSE_FILES
:=COPYING LICENSE
26 PKG_MAINTAINER
:=Jiri Slachta
<jiri@slachta.eu
>
30 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
32 include $(INCLUDE_DIR
)/package.mk
34 # musl and glibc include their own iconv, but uclibc does not
35 ifneq ($(CONFIG_USE_UCLIBC
),)
37 -I
$(STAGING_DIR
)/usr
/lib
/libiconv-full
/include
39 -L
$(STAGING_DIR
)/usr
/lib
/libiconv-full
/lib
-liconv
42 define Package
/chan-sccp
/Default
46 TITLE
:=SCCP channel support
47 URL
:=https
://github.com
/chan-sccp
/chan-sccp
48 DEPENDS
:=+USE_UCLIBC
:libiconv-full
+libltdl
49 PKG_BUILD_DEPENDS
:=libiconv
52 define Package
/asterisk13-chan-sccp
53 $(call Package
/chan-sccp
/Default
)
56 CONFLICTS
:=asterisk13-chan-skinny
59 define Package
/asterisk15-chan-sccp
60 $(call Package
/chan-sccp
/Default
)
63 CONFLICTS
:=asterisk15-chan-skinny
66 define Package
/description
/Default
67 Replacement for the SCCP channel driver
(chan_skinny
) in Asterisk.
68 Extended features
include shared lines
, presence
/ BLF
, customizable
69 feature buttons and custom device state.
72 Package
/asterisk13-chan-sccp
/description
= $(Package
/description
/Default
)
73 Package
/asterisk15-chan-sccp
/description
= $(Package
/description
/Default
)
77 --enable-advanced-functions \
81 ifeq ($(BUILD_VARIANT
),asterisk13
)
82 CONFIGURE_ARGS
+= --with-asterisk
=$(STAGING_DIR
)/usr
/include/asterisk-13
85 ifeq ($(BUILD_VARIANT
),asterisk15
)
86 CONFIGURE_ARGS
+= --with-asterisk
=$(STAGING_DIR
)/usr
/include/asterisk-15
89 define Package
/conffiles
/Default
90 /etc
/asterisk
/sccp.conf
93 Package
/asterisk13-chan-sccp
/conffiles
= $(Package
/conffiles
/Default
)
94 Package
/asterisk15-chan-sccp
/conffiles
= $(Package
/conffiles
/Default
)
96 # Asterisk 13 gets mistaken for Asterisk 15 because it was patched to include
97 # iostream support. To get it detected correctly make it impossible for the
98 # build system to find the iostream header.
100 $(call Build
/Prepare
/Default
)
101 ifeq ($(BUILD_VARIANT
),asterisk13
)
102 $(SED
) 's|asterisk/iostream.h|asterisk/iostream.404|' \
103 $(PKG_BUILD_DIR
)/autoconf
/asterisk.m4
107 define Package
/Install
/Default
108 $(INSTALL_DIR
) $(1)/etc
/asterisk
109 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/sccp.conf
$(1)/etc
/asterisk
110 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
111 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/chan_sccp.so
$(1)/usr
/lib
/asterisk
/modules
/
114 Package
/asterisk13-chan-sccp
/install = $(Package
/Install
/Default
)
115 Package
/asterisk15-chan-sccp
/install = $(Package
/Install
/Default
)
117 $(eval
$(call BuildPackage
,asterisk13-chan-sccp
))
118 $(eval
$(call BuildPackage
,asterisk15-chan-sccp
))