asterisk-chan-lantiq: add user 'asterisk' to 'vmmc' group
[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 USERID:=asterisk=385::vmmc=386
35 endef
36
37 define Package/$(PKG_NAME)/description
38 An implementation of a Lantiq TAPI channel driver for Asterisk.
39 endef
40
41 define Package/$(PKG_NAME)/conffiles
42 /etc/asterisk/lantiq.conf
43 endef
44
45 define Build/Compile
46 cd $(PKG_BUILD_DIR)/src/channels && \
47 $(TARGET_CC) -o chan_lantiq.o -c chan_lantiq.c -MD -MT chan_lantiq.o \
48 -MF .chan_lantiq.o.d -MP -pthread \
49 $(TARGET_CFLAGS) -DAST_MODULE_SELF_SYM=__internal_chan_lantiq_self \
50 $(TARGET_CPPFLAGS) \
51 -Wall -Wstrict-prototypes -Wmissing-prototypes \
52 -Wmissing-declarations $(FPIC) -DAST_MODULE=\"chan_lantiq\" && \
53 $(TARGET_CC) -o chan_lantiq.so -pthread $(TARGET_LDFLAGS) -shared \
54 -Wl,--version-script,chan_lantiq.exports,--warn-common \
55 chan_lantiq.o
56 endef
57
58 define Package/$(PKG_NAME)/install
59 $(INSTALL_DIR) $(1)/etc/asterisk
60 $(INSTALL_DATA) \
61 $(PKG_BUILD_DIR)/src/configs/samples/lantiq.conf.sample \
62 $(1)/etc/asterisk/lantiq.conf
63 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
64 $(INSTALL_BIN) \
65 $(PKG_BUILD_DIR)/src/channels/chan_lantiq.so \
66 $(1)/usr/lib/asterisk/modules
67 endef
68
69 $(eval $(call BuildPackage,$(PKG_NAME)))