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