Merge pull request #11353 from kvuorine/fwknop-fixes
[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.3.1
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus
16 PKG_HASH:=65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d
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
28 define Package/libopus
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=OPUS Audio Codec
32 URL:=https://opus-codec.org
33 endef
34
35 define Package/libopus/description
36 Opus is a totally open, royalty-free, highly versatile audio codec. Opus is
37 unmatched for interactive speech and music transmission over the Internet, but
38 is also intended for storage and streaming applications.
39 endef
40
41 CONFIGURE_ARGS+= \
42 --disable-doc \
43 --disable-extra-programs
44
45 ifeq ($(CONFIG_SOFT_FLOAT),y)
46 CONFIGURE_ARGS+= \
47 --enable-fixed-point
48 endif
49
50 ifneq ($(findstring neon,$(CONFIG_CPU_TYPE))$(findstring aarch64,$(CONFIG_ARCH)),)
51 CONFIGURE_ARGS+= \
52 --enable-fixed-point
53 endif
54
55 CPU_ASM_BLACKLIST:=xscale arm926ej-s
56 ifneq ($(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
57 CONFIGURE_ARGS+= --disable-asm
58 endif
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/opus $(1)/usr/include/
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopus.so* $(1)/usr/lib/
65 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opus.pc $(1)/usr/lib/pkgconfig/
67 endef
68
69 define Package/libopus/install
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopus.so.* $(1)/usr/lib/
72 endef
73
74 $(eval $(call BuildPackage,libopus))