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.

157 lines
3.7 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.29.0
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/mpg123
  13. PKG_HASH:=135e0172dfb6c7937a81f1188c27f9a47b0a337f7637680039ff3ee5fea3ce7d
  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/libsyn123
  40. $(call Package/mpg123/Default)
  41. SECTION:=libs
  42. CATEGORY:=Libraries
  43. TITLE:=Library for signal generation and format conversion
  44. LICENSE:=LGPL-2.1-or-later
  45. DEPENDS:=+libltdl
  46. endef
  47. define Package/mpg123
  48. $(call Package/mpg123/Default)
  49. SECTION:=sound
  50. CATEGORY:=Sound
  51. TITLE:=fast console mpeg audio player
  52. LICENSE:=GPL-2.0-or-later
  53. DEPENDS+=+libmpg123 +alsa-lib +libout123 +libsyn123
  54. endef
  55. CONFIGURE_ARGS += \
  56. --enable-shared \
  57. --enable-static \
  58. --with-audio=alsa \
  59. --with-default-audio=alsa
  60. ifeq ($(CONFIG_SOFT_FLOAT),y)
  61. CONFIGURE_ARGS += \
  62. --with-cpu=generic_nofpu \
  63. --enable-int-quality=yes
  64. else ifneq ($(findstring 464fp,$(CONFIG_CPU_TYPE)),)
  65. CONFIGURE_ARGS += \
  66. --with-cpu=altivec
  67. else ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
  68. CONFIGURE_ARGS += \
  69. --with-cpu=arm_fpu
  70. else ifneq ($(findstring aarch64,$(CONFIG_ARCH)),)
  71. CONFIGURE_ARGS += \
  72. --with-cpu=aarch64
  73. else
  74. CONFIGURE_ARGS += \
  75. --with-cpu=generic_fpu
  76. endif
  77. define Build/InstallDev
  78. $(INSTALL_DIR) $(1)/usr/include
  79. $(INSTALL_DATA) \
  80. $(PKG_INSTALL_DIR)/usr/include/fmt123.h \
  81. $(PKG_INSTALL_DIR)/usr/include/mpg123.h \
  82. $(PKG_INSTALL_DIR)/usr/include/out123.h \
  83. $(PKG_INSTALL_DIR)/usr/include/syn123.h \
  84. $(1)/usr/include/
  85. $(INSTALL_DIR) $(1)/usr/lib
  86. $(CP) \
  87. $(PKG_INSTALL_DIR)/usr/lib/libmpg123.{la,a,so*} \
  88. $(PKG_INSTALL_DIR)/usr/lib/libout123.{la,a,so*} \
  89. $(PKG_INSTALL_DIR)/usr/lib/libsyn123.{la,a,so*} \
  90. $(1)/usr/lib/
  91. $(INSTALL_DIR) $(1)/usr/lib/mpg123
  92. $(CP) \
  93. $(PKG_INSTALL_DIR)/usr/lib/mpg123/output* \
  94. $(1)/usr/lib/mpg123
  95. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  96. $(CP) \
  97. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmpg123.pc \
  98. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libout123.pc \
  99. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsyn123.pc \
  100. $(1)/usr/lib/pkgconfig
  101. endef
  102. define Package/libmpg123/install
  103. $(INSTALL_DIR) $(1)/usr/lib
  104. $(CP) \
  105. $(PKG_INSTALL_DIR)/usr/lib/libmpg123.so.* \
  106. $(1)/usr/lib/
  107. endef
  108. define Package/libout123/install
  109. $(INSTALL_DIR) $(1)/usr/lib
  110. $(CP) \
  111. $(PKG_INSTALL_DIR)/usr/lib/libout123.so.* \
  112. $(1)/usr/lib/
  113. endef
  114. define Package/libsyn123/install
  115. $(INSTALL_DIR) $(1)/usr/lib
  116. $(CP) \
  117. $(PKG_INSTALL_DIR)/usr/lib/libsyn123.so.* \
  118. $(1)/usr/lib/
  119. endef
  120. define Package/mpg123/install
  121. $(INSTALL_DIR) $(1)/usr/bin
  122. $(INSTALL_BIN) \
  123. $(PKG_INSTALL_DIR)/usr/bin/mpg123{,-id3dump,-strip} \
  124. $(PKG_INSTALL_DIR)/usr/bin/out123 \
  125. $(1)/usr/bin
  126. $(INSTALL_DIR) $(1)/usr/lib/mpg123
  127. $(CP) \
  128. $(PKG_INSTALL_DIR)/usr/lib/mpg123/output_*.so \
  129. $(1)/usr/lib/mpg123
  130. endef
  131. $(eval $(call BuildPackage,libmpg123))
  132. $(eval $(call BuildPackage,libout123))
  133. $(eval $(call BuildPackage,libsyn123))
  134. $(eval $(call BuildPackage,mpg123))