/
Makefile
69 lines (56 loc) · 1.92 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# Copyright (C) 2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk-chan-lantiq
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/kochstefan/asterisk_channel_lantiq.git
PKG_SOURCE_VERSION:=2f029ec8778420538c8151c6aceba0f7b44b07c9
PKG_SOURCE_DATE:=2021-09-11
PKG_MIRROR_HASH:=0c57aeb33dc7efb0078e77907e0bc616f1714251e64d647a59faffe5af8bac73
PKG_SOURCE_PROTO:=git
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SUBMENU:=Telephony Lantiq
SECTION:=net
CATEGORY:=Network
TITLE:=Lantiq channel driver
URL:=https://github.com/kochstefan/asterisk_channel_lantiq
DEPENDS:=+asterisk +kmod-ltq-vmmc
USERID:=asterisk=385::vmmc=386
endef
define Package/$(PKG_NAME)/description
An implementation of a Lantiq TAPI channel driver for Asterisk.
endef
define Package/$(PKG_NAME)/conffiles
/etc/asterisk/lantiq.conf
endef
define Build/Compile
cd $(PKG_BUILD_DIR)/src/channels && \
$(TARGET_CC) -o chan_lantiq.o -c chan_lantiq.c -MD -MT chan_lantiq.o \
-MF .chan_lantiq.o.d -MP -pthread \
$(TARGET_CFLAGS) -DAST_MODULE_SELF_SYM=__internal_chan_lantiq_self \
$(TARGET_CPPFLAGS) \
-Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations $(FPIC) -DAST_MODULE=\"chan_lantiq\" && \
$(TARGET_CC) -o chan_lantiq.so -pthread $(TARGET_LDFLAGS) -shared \
-Wl,--version-script,chan_lantiq.exports,--warn-common \
chan_lantiq.o
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/src/configs/samples/lantiq.conf.sample \
$(1)/etc/asterisk/lantiq.conf
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/src/channels/chan_lantiq.so \
$(1)/usr/lib/asterisk/modules
endef
$(eval $(call BuildPackage,$(PKG_NAME)))