Add PKG_LICENSE variable to the most of the packages.
[feed/telephony.git] / net / siproxd / Makefile
1 #
2 # Copyright (C) 2014 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.1
12 PKG_RELEASE:=4
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/siproxd
16 PKG_MD5SUM:=1a6f9d13aeb2d650375c9a346ac6cbaf
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.
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-doc
52
53 MAKE_FLAGS+= \
54         SUBDIRS="src scripts contrib" \
55         LIBLTDL="$(STAGING_DIR)/usr/lib/libltdl.la" \
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-$(1)
68     $$(call Package/siproxd/Default)
69     TITLE:= siproxd $(1) plugin
70     DEPENDS:=siproxd
71   endef
72
73   define Package/siproxd-mod-$(1)/install
74         $(INSTALL_DIR) $$(1)/usr/lib/siproxd
75         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/siproxd/plugin_$(1)*.so* $$(1)/usr/lib/siproxd
76   endef
77
78   $$(eval $$(call BuildPackage,siproxd-mod-$(1)))
79 endef
80
81 $(eval $(call BuildPackage,siproxd))
82 $(eval $(call BuildPlugin,defaulttarget))
83 $(eval $(call BuildPlugin,demo))
84 $(eval $(call BuildPlugin,fix_bogus_via))
85 $(eval $(call BuildPlugin,logcall))
86 $(eval $(call BuildPlugin,prefix))
87 $(eval $(call BuildPlugin,regex))
88 $(eval $(call BuildPlugin,shortdial))
89 $(eval $(call BuildPlugin,stun))