Makefile 1.8 KB

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