rtpproxy: fix hotplug script file name
[feed/telephony.git] / net / rtpproxy / Makefile
1 #
2 # Copyright (C) 2014 - 2018 OpenWrt.org
3 # Copyright (C) 2017 - 2018 Jiri Slachta <jiri@slachta.eu>
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=rtpproxy
12 PKG_VERSION:=2.1.0-20170914
13 PKG_RELEASE:=4
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=https://github.com/sippy/rtpproxy.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=589cc78cb8698b49aa408c6411c8720a2a0efe3c
19 PKG_MIRROR_HASH:=087b363a7e5f112fe0c601e147ac087f528a500a25340cbccc12d90935876137
20 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
21
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_CHECK_FORMAT_SECURITY:=0
24 PKG_INSTALL:=1
25
26 PKG_FIXUP:=autoreconf
27
28 PKG_LICENSE:=BSD-2-Clause
29 PKG_LICENSE_FILES:=COPYING
30 PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
31
32 include $(INCLUDE_DIR)/package.mk
33
34 define Package/rtpproxy/Default
35 SECTION:=net
36 CATEGORY:=Network
37 SUBMENU:=Telephony
38 URL:=http://www.rtpproxy.org/
39 endef
40
41 define Package/rtpproxy
42 $(call Package/rtpproxy/Default)
43 DEPENDS:=+libpthread +librt
44 TITLE:=RTP (Realtime Transport Protocol) proxy
45 MENU:=1
46 endef
47
48 define Package/rtpproxy/conffiles
49 /etc/init.d/rtpproxy
50 /etc/config/rtpproxy
51 endef
52
53 define Package/rtpproxy-mod-acct-csv
54 $(call Package/rtpproxy/Default)
55 DEPENDS:=rtpproxy
56 TITLE:=RTPproxy accounting module
57 endef
58
59 CONFIGURE_VARS += \
60 ac_cv_lib_bcg729_initBcg729EncoderChannel=no
61
62 # Otherwise OpenWrt's CPPFLAGS are ignored
63 TARGET_CFLAGS+=$(TARGET_CPPFLAGS)
64
65 define Package/rtpproxy/install
66 $(INSTALL_DIR) $(1)/usr/bin
67 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rtpproxy $(1)/usr/bin
68
69 $(INSTALL_DIR) $(1)/etc/init.d
70 $(INSTALL_BIN) ./files/rtpproxy.init $(1)/etc/init.d/rtpproxy
71
72 $(INSTALL_DIR) $(1)/etc/config
73 $(INSTALL_CONF) ./files/rtpproxy.config $(1)/etc/config/rtpproxy
74
75 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
76 $(INSTALL_BIN) ./files/rtpproxy.hotplug $(1)/etc/hotplug.d/iface/90-rtpproxy
77 endef
78
79 define Package/rtpproxy/postinst
80 #!/bin/sh
81 if [ -z "$${IPKG_INSTROOT}" ]; then
82 echo
83 echo "o-------------------------------------------------------------------o"
84 echo "| RTPProxy note |"
85 echo "o-------------------------------------------------------------------o"
86 echo "| Edit /etc/config/rtpproxy to change basic init configuration. |"
87 echo "o-------------------------------------------------------------=^_^=-o"
88 echo
89 fi
90 exit 0
91 endef
92
93 define Package/rtpproxy-mod-acct-csv/install
94 $(INSTALL_DIR) $(1)/usr/lib/rtpproxy
95 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/rtpproxy/rtpp_acct_csv.so \
96 $(1)/usr/lib/rtpproxy
97 endef
98
99 $(eval $(call BuildPackage,rtpproxy))
100 $(eval $(call BuildPackage,rtpproxy-mod-acct-csv))