baresip: add glib2/host build dependency
[feed/telephony.git] / libs / libsrtp / Makefile
1 #
2 # Copyright (C) 2017 OpenWrt.org
3 # Copyright (C) 2017 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 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libsrtp
11 PKG_VERSION:=2.4.2
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=libsrtp-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/cisco/libsrtp/tar.gz/v$(PKG_VERSION)?
16 PKG_HASH:=3b1bcb14ebda572b04b9bdf07574a449c84cb924905414e4d94e62837d22b628
17
18 PKG_LICENSE:=BSD-3-Clause
19 PKG_LICENSE_FILES:=LICENSE
20 PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
21
22 include $(INCLUDE_DIR)/package.mk
23
24 CONFIGURE_ARGS+=--enable-openssl
25
26 define Package/libsrtp2
27 SUBMENU:=Telephony
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE:=Secure RTP (SRTP) library, v$(PKG_VERSION)
31 URL:=https://github.com/cisco/libsrtp
32 DEPENDS:=+libopenssl
33 ABI_VERSION:=1
34 endef
35
36 define Package/libsrtp2/description
37 Open-source implementation of the Secure Real-time Transport
38 Protocol (SRTP) originally authored by Cisco Systems, Inc.
39 It is available under a BSD-style license.
40 endef
41
42 define Build/Install
43 $(call Build/Install/Default,all shared_library install)
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(1)/usr/include
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/srtp2 $(1)/usr/include/
49 $(INSTALL_DIR) $(1)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsrtp2.{a,so*} $(1)/usr/lib/
51 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsrtp2.pc $(1)/usr/lib/pkgconfig/
53 endef
54
55 define Package/libsrtp2/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) \
58 $(PKG_INSTALL_DIR)/usr/lib/libsrtp2.so.$(ABI_VERSION)* \
59 $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,libsrtp2))