opus: update to 1.5.1
[feed/packages.git] / libs / opus / Makefile
1 #
2 # Copyright (C) 2014-2016 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:=opus
11 PKG_VERSION:=1.5.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://downloads.xiph.org/releases/opus
16 PKG_HASH:=b84610959b8d417b611aa12a22565e0a3732097c6389d19098d844543e340f85
17
18 PKG_MAINTAINER:=Ted Hess <thess@kitchensync.net>, Ian Leonard <antonlacon@gmail.com>
19 PKG_LICENSE:=BSD-3-Clause
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:opus-codec:opus
22
23 PKG_BUILD_PARALLEL:=1
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/meson.mk
28
29 define Package/libopus
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=OPUS Audio Codec
33 URL:=https://opus-codec.org
34 endef
35
36 define Package/libopus/description
37 Opus is a totally open, royalty-free, highly versatile audio codec. Opus is
38 unmatched for interactive speech and music transmission over the Internet, but
39 is also intended for storage and streaming applications.
40 endef
41
42 MESON_ARGS+= \
43 -Ddocs=disabled \
44 -Dextra-programs=disabled
45
46 ifeq ($(CONFIG_SOFT_FLOAT),y)
47 MESON_ARGS+= \
48 -Dfixed-point=true
49 endif
50
51 ifneq ($(findstring neon,$(CONFIG_CPU_TYPE))$(findstring aarch64,$(CONFIG_ARCH)),)
52 MESON_ARGS+= \
53 -Dfixed-point=true
54 endif
55
56 CPU_ASM_BLACKLIST:=xscale arm926ej-s
57 ifneq ($(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
58 MESON_ARGS+= -Dasm=disabled
59 endif
60
61 define Build/InstallDev
62 $(INSTALL_DIR) $(1)/usr/include
63 $(CP) $(PKG_INSTALL_DIR)/usr/include/opus $(1)/usr/include/
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopus.so* $(1)/usr/lib/
66 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opus.pc $(1)/usr/lib/pkgconfig/
68 endef
69
70 define Package/libopus/install
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopus.so.* $(1)/usr/lib/
73 endef
74
75 $(eval $(call BuildPackage,libopus))