2 # Copyright (C) 2017 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 LANTIQ_AST13_VERSION
:=5adf3d7774a75c88835f2f3daf824e2cda2c6e67
17 PKG_MAINTAINER
:=Jiri Slachta
<jiri@slachta.eu
>
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 include $(INCLUDE_DIR
)/package.mk
23 define Download
/github
24 define Download
/$(PKG_NAME
)
27 FILE
:=$(BUILD_VARIANT
)-$(PKG_NAME
)-$(PKG_VERSION
)-$(1).
tar.xz
28 URL
:=https
://github.com
/kochstefan
/asterisk_channel_lantiq.git
31 $$(eval
$$(call Download
,chan-lantiq
))
34 define Package
/$(PKG_NAME
)/Default
38 TITLE
:=Lantiq channel driver
39 URL
:=https
://github.com
/kochstefan
/asterisk_channel_lantiq
40 DEPENDS
:=+kmod-ltq-vmmc
43 define Package
/asterisk13-
$(PKG_NAME
)
44 $(call Package
/$(PKG_NAME
)/Default
)
49 define Package
/description
/Default
50 An implementation of a Lantiq TAPI channel driver for Asterisk.
53 Package
/asterisk13-
$(PKG_NAME
)/description
= $(Package
/description
/Default
)
55 define Package
/conffiles
/Default
56 /etc
/asterisk
/lantiq.conf
59 Package
/asterisk13-
$(PKG_NAME
)/conffiles
= $(Package
/conffiles
/Default
)
61 define Package
/Install
/Default
62 $(INSTALL_DIR
) $(1)/etc
/asterisk
64 $(PKG_BUILD_DIR
)/$(PKG_NAME
)/src
/configs
/samples
/lantiq.conf.sample \
65 $(1)/etc
/asterisk
/lantiq.conf
66 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
68 $(PKG_BUILD_DIR
)/$(PKG_NAME
)/src
/channels
/chan_lantiq.so \
69 $(1)/usr
/lib
/asterisk
/modules
72 Package
/asterisk13-
$(PKG_NAME
)/install = $(Package
/Install
/Default
)
74 ifeq ($(BUILD_VARIANT
),asterisk13
)
75 CHAN_LANTIQ_AST_INCLUDES
:=-I
$(STAGING_DIR
)/usr
/include/asterisk-13
/include
76 CHAN_LANTIQ_VERSION
:=$(LANTIQ_AST13_VERSION
)
80 $(eval
$(call Download
/github
,$(CHAN_LANTIQ_VERSION
)))
81 $(TAR
) --extract
--no-same-owner
--no-same-permissions
--xz \
82 --file
=$(DL_DIR
)/$(BUILD_VARIANT
)-$(PKG_NAME
)-$(PKG_VERSION
)-$(CHAN_LANTIQ_VERSION
).
tar.xz \
83 --directory
=$(PKG_BUILD_DIR
)
84 $(CP
) .
/files
/default.exports \
85 $(PKG_BUILD_DIR
)/$(PKG_NAME
)/src
/channels
/chan_lantiq.exports
88 define Build
/Configure
92 cd
$(PKG_BUILD_DIR
)/$(PKG_NAME
)/src
/channels
&& \
93 $(TARGET_CC
) -o chan_lantiq.o
-c chan_lantiq.c
-MD
-MT chan_lantiq.o \
94 -MF .chan_lantiq.o.d
-MP
-pthread \
96 $(CHAN_LANTIQ_AST_INCLUDES
) \
98 -Wall
-Wstrict-prototypes
-Wmissing-prototypes \
99 -Wmissing-declarations
$(FPIC
) -DAST_MODULE
=\"chan_lantiq
\" && \
100 $(TARGET_CC
) -o chan_lantiq.so
-pthread
$(TARGET_LDFLAGS
) -shared \
101 -Wl
,--version-script
,chan_lantiq.exports
,--warn-common \
105 $(eval
$(call BuildPackage
,asterisk13-
$(PKG_NAME
)))