Merge pull request #567 from guidosarducci/master-update-siproxd-0.8.3
[feed/telephony.git] / net / siproxd / Makefile
1 #
2 # Copyright (C) 2014-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:=siproxd
11 PKG_VERSION:=0.8.3
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/siproxd
16 PKG_HASH:=9a6d7a6bb6fff162775b1e1fb7018de9c69642cbf8626185dc6ffceeeba07736
17
18 PKG_FIXUP:=autoreconf
19 PKG_INSTALL:=1
20 PKG_BUILD_PARALLEL:=1
21
22 PKG_LICENSE:=GPL-2.0+
23 PKG_LICENSE_FILES:=COPYING
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/siproxd/Default
28 SECTION:=net
29 CATEGORY:=Network
30 SUBMENU:=Telephony
31 URL:=http://siproxd.sourceforge.net/
32 endef
33
34 define Package/siproxd
35 $(call Package/siproxd/Default)
36 DEPENDS:=+libltdl +libpthread +libosip2
37 TITLE:=SIP (Session Initiation Protocol) proxy
38 MENU:=1
39 endef
40
41 define Package/siproxd/description
42 Siproxd is a proxy/masquerading daemon for the SIP protocol. Refer to https://openwrt.org/docs/guide-user/services/voip/siproxd for configuration details and examples.
43 endef
44
45 define Package/siproxd/conffiles
46 /etc/config/siproxd
47 endef
48
49 CONFIGURE_ARGS+= \
50 --with-libosip-prefix="$(STAGING_DIR)/usr" \
51 --disable-ltdl-convenience \
52 --disable-doc
53
54 MAKE_FLAGS+= \
55 SUBDIRS="src scripts contrib"
56
57 define Package/siproxd/install
58 $(INSTALL_DIR) $(1)/usr/sbin
59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/siproxd $(1)/usr/sbin
60 $(INSTALL_DIR) $(1)/etc/config
61 $(INSTALL_CONF) ./files/siproxd.config $(1)/etc/config/siproxd
62 $(INSTALL_DIR) $(1)/etc/init.d
63 $(INSTALL_BIN) ./files/siproxd.init $(1)/etc/init.d/siproxd
64 endef
65
66 define BuildPlugin
67 define Package/siproxd-mod-$(subst _,-,$(1))
68 $$(call Package/siproxd/Default)
69 TITLE:= siproxd $(1) plugin
70 DEPENDS:=siproxd $(2)
71 endef
72
73 define Package/siproxd-mod-$(subst _,-,$(1))/install
74 $(INSTALL_DIR) $$(1)/usr/lib/siproxd
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/siproxd/plugin_$(1).so $$(1)/usr/lib/siproxd
76 endef
77
78 $$(eval $$(call BuildPackage,siproxd-mod-$(subst _,-,$(1))))
79 endef
80
81 $(eval $(call BuildPackage,siproxd))
82 $(eval $(call BuildPlugin,blacklist,+libsqlite3))
83 $(eval $(call BuildPlugin,codecfilter))
84 $(eval $(call BuildPlugin,defaulttarget))
85 $(eval $(call BuildPlugin,demo))
86 $(eval $(call BuildPlugin,fix_bogus_via))
87 $(eval $(call BuildPlugin,fix_DTAG))
88 $(eval $(call BuildPlugin,fix_fbox_anoncall))
89 $(eval $(call BuildPlugin,logcall))
90 $(eval $(call BuildPlugin,prefix))
91 $(eval $(call BuildPlugin,regex))
92 $(eval $(call BuildPlugin,shortdial))
93 $(eval $(call BuildPlugin,stats))
94 $(eval $(call BuildPlugin,stripheader))
95 $(eval $(call BuildPlugin,stun))
96 $(eval $(call BuildPlugin,siptrunk))