Merge pull request #3556 from thess/libopus-test
[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.1.3
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://downloads.xiph.org/releases/opus/
16 PKG_MD5SUM:=32bbb6b557fe1b6066adc0ae1f08b629
17
18 PKG_LICENSE:=BSD-3-Clause
19 PKG_LICENSE_FILES:=COPYING
20 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
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 CPU_ASM_BLACKLIST:=xscale arm926ej-s
49
50 ifneq ($(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
51 CONFIGURE_ARGS+= --disable-asm
52 endif
53
54 define Build/InstallDev
55 $(INSTALL_DIR) $(1)/usr/include
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/opus $(1)/usr/include/
57 $(INSTALL_DIR) $(1)/usr/lib
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopus.so* $(1)/usr/lib/
59 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opus.pc $(1)/usr/lib/pkgconfig/
61 endef
62
63 define Package/libopus/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopus.so.* $(1)/usr/lib/
66 endef
67
68 $(eval $(call BuildPackage,libopus))