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.

136 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2007-2015 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:=mpg123
  9. PKG_VERSION:=1.25.13
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/mpg123
  13. PKG_HASH:=90306848359c793fd43b9906e52201df18775742dc3c81c06ab67a806509890a
  14. PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_CPE_ID:=cpe:/a:mpg123:mpg123
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/mpg123/Default
  21. URL:=http://www.mpg123.de
  22. endef
  23. define Package/libmpg123
  24. $(call Package/mpg123/Default)
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=fast console mpeg audio decoder library
  28. LICENSE:=LGPL-2.1-or-later
  29. DEPENDS:=+libltdl
  30. endef
  31. define Package/libout123
  32. $(call Package/mpg123/Default)
  33. SECTION:=libs
  34. CATEGORY:=Libraries
  35. TITLE:=Library for continuous playback of audio streams via various platform-specific output methods
  36. LICENSE:=LGPL-2.1-or-later
  37. DEPENDS:=+libltdl
  38. endef
  39. define Package/mpg123
  40. $(call Package/mpg123/Default)
  41. SECTION:=sound
  42. CATEGORY:=Sound
  43. TITLE:=fast console mpeg audio player
  44. LICENSE:=GPL-2.0-or-later
  45. DEPENDS+=+libmpg123 +alsa-lib +libout123
  46. endef
  47. TARGET_CFLAGS += -D_GNU_SOURCE
  48. CONFIGURE_ARGS+= \
  49. --enable-shared \
  50. --enable-static \
  51. --with-audio=alsa \
  52. --with-default-audio=alsa \
  53. ifeq ($(CONFIG_SOFT_FLOAT),y)
  54. CONFIGURE_ARGS+= \
  55. --with-cpu=generic_nofpu \
  56. --enable-int-quality=yes
  57. else ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
  58. CONFIGURE_ARGS+= \
  59. --with-cpu=arm_fpu
  60. else ifneq ($(findstring aarch64,$(CONFIG_ARCH)),)
  61. CONFIGURE_ARGS+= \
  62. --with-cpu=aarch64
  63. else
  64. CONFIGURE_ARGS+= \
  65. --with-cpu=generic_fpu
  66. endif
  67. define Build/InstallDev
  68. $(INSTALL_DIR) $(1)/usr/include
  69. $(INSTALL_DATA) \
  70. $(PKG_INSTALL_DIR)/usr/include/mpg123.h \
  71. $(PKG_INSTALL_DIR)/usr/include/out123.h \
  72. $(PKG_INSTALL_DIR)/usr/include/fmt123.h \
  73. $(1)/usr/include/
  74. $(INSTALL_DIR) $(1)/usr/lib
  75. $(CP) \
  76. $(PKG_INSTALL_DIR)/usr/lib/libmpg123.{la,a,so*} \
  77. $(PKG_INSTALL_DIR)/usr/lib/libout123.{la,a,so*} \
  78. $(1)/usr/lib/
  79. $(INSTALL_DIR) $(1)/usr/lib/mpg123
  80. $(CP) \
  81. $(PKG_INSTALL_DIR)/usr/lib/mpg123/* \
  82. $(1)/usr/lib/mpg123
  83. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  84. $(CP) \
  85. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmpg123.pc \
  86. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libout123.pc \
  87. $(1)/usr/lib/pkgconfig
  88. endef
  89. define Package/libmpg123/install
  90. $(INSTALL_DIR) $(1)/usr/lib
  91. $(CP) \
  92. $(PKG_INSTALL_DIR)/usr/lib/libmpg123.so* \
  93. $(1)/usr/lib/
  94. endef
  95. define Package/libout123/install
  96. $(INSTALL_DIR) $(1)/usr/lib
  97. $(CP) \
  98. $(PKG_INSTALL_DIR)/usr/lib/libout123.so* \
  99. $(1)/usr/lib/
  100. endef
  101. define Package/mpg123/install
  102. $(INSTALL_DIR) $(1)/usr/bin
  103. $(INSTALL_BIN) \
  104. $(PKG_INSTALL_DIR)/usr/bin/mpg123{,-id3dump,-strip} \
  105. $(PKG_INSTALL_DIR)/usr/bin/out123 \
  106. $(1)/usr/bin
  107. $(INSTALL_DIR) $(1)/usr/lib/mpg123
  108. $(CP) \
  109. $(PKG_INSTALL_DIR)/usr/lib/mpg123/* \
  110. $(1)/usr/lib/mpg123
  111. endef
  112. $(eval $(call BuildPackage,libmpg123))
  113. $(eval $(call BuildPackage,libout123))
  114. $(eval $(call BuildPackage,mpg123))