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