Merge pull request #3980 from amir-sabbaghi/glog
[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.2.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus/
16 PKG_HASH:=cfafd339ccd9c5ef8d6ab15d7e1a412c054bf4cb4ecbbbcc78c12ef2def70732
17
18 PKG_LICENSE:=BSD-3-Clause
19 PKG_LICENSE_FILES:=COPYING
20 PKG_MAINTAINER:=Ted Hess <thess@kitchensync.net>, Ian Leonard <antonlacon@gmail.com>
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libopus
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=OPUS Audio Codec
30 URL:=http://opus-codec.org/
31 endef
32
33 define Package/libopus/description
34 Opus is a totally open, royalty-free, highly versatile audio codec. Opus is
35 unmatched for interactive speech and music transmission over the Internet, but
36 is also intended for storage and streaming applications.
37 endef
38
39 CONFIGURE_ARGS+= \
40 --disable-doc \
41 --disable-extra-programs
42
43 ifeq ($(CONFIG_SOFT_FLOAT),y)
44 CONFIGURE_ARGS+= \
45 --enable-fixed-point
46 endif
47
48 ifneq ($(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),)
49 CONFIGURE_ARGS+= \
50 --enable-fixed-point
51 endif
52
53 CPU_ASM_BLACKLIST:=xscale arm926ej-s
54
55 ifneq ($(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
56 CONFIGURE_ARGS+= --disable-asm
57 endif
58
59 define Build/InstallDev
60 $(INSTALL_DIR) $(1)/usr/include
61 $(CP) $(PKG_INSTALL_DIR)/usr/include/opus $(1)/usr/include/
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopus.so* $(1)/usr/lib/
64 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opus.pc $(1)/usr/lib/pkgconfig/
66 endef
67
68 define Package/libopus/install
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopus.so.* $(1)/usr/lib/
71 endef
72
73 $(eval $(call BuildPackage,libopus))