You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.7 KiB

  1. #
  2. # Copyright (C) 2006-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:=flac
  9. PKG_VERSION:=1.3.4
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://downloads.xiph.org/releases/flac/
  13. PKG_HASH:=8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737
  14. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  15. PKG_LICENSE:=GFDL-1.2 GPL-2 LGPL-2.1 BSD-3-Clause
  16. PKG_LICENSE_FILES:=README COPYING.FDL COPYING.GPL COPYING.LGPL COPYING.Xiph
  17. PKG_CPE_ID:=cpe:/a:flac_project:flac
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/libflac
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=Free Lossless Audio Codec library
  24. URL:=https://xiph.org/flac
  25. endef
  26. CMAKE_OPTIONS += \
  27. -DBUILD_SHARED_LIBS=ON \
  28. -DBUILD_CXXLIBS=OFF \
  29. -DBUILD_PROGRAMS=OFF \
  30. -DBUILD_EXAMPLES=OFF \
  31. -DBUILD_DOCS=OFF \
  32. -DINSTALL_MANPAGES=OFF \
  33. -DINSTALL_CMAKE_CONFIG_MODULE=OFF \
  34. -DINSTALL_PKGCONFIG_MODULES=ON \
  35. -DWITH_OGG=OFF \
  36. -DWITH_STACK_PROTECTOR=OFF
  37. define Build/InstallDev
  38. $(INSTALL_DIR) $(1)/usr/include
  39. $(CP) \
  40. $(PKG_INSTALL_DIR)/usr/include/FLAC \
  41. $(1)/usr/include/
  42. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  43. $(CP) \
  44. $(PKG_INSTALL_DIR)/usr/lib/libFLAC.so* \
  45. $(1)/usr/lib/
  46. $(INSTALL_DATA) \
  47. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
  48. $(1)/usr/lib/pkgconfig/
  49. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/flac.pc
  50. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/flac.pc
  51. endef
  52. define Package/libflac/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libFLAC.so* $(1)/usr/lib/
  55. endef
  56. $(eval $(call BuildPackage,libflac))