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.

135 lines
3.0 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:=1
  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
  58. CONFIGURE_ARGS+= \
  59. --with-cpu=generic_fpu
  60. endif
  61. ifneq ($(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),)
  62. CONFIGURE_ARGS+= \
  63. --with-cpu=arm_fpu
  64. endif
  65. define Build/InstallDev
  66. $(INSTALL_DIR) $(1)/usr/include
  67. $(INSTALL_DATA) \
  68. $(PKG_INSTALL_DIR)/usr/include/mpg123.h \
  69. $(PKG_INSTALL_DIR)/usr/include/out123.h \
  70. $(PKG_INSTALL_DIR)/usr/include/fmt123.h \
  71. $(1)/usr/include/
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) \
  74. $(PKG_INSTALL_DIR)/usr/lib/libmpg123.{la,a,so*} \
  75. $(PKG_INSTALL_DIR)/usr/lib/libout123.{la,a,so*} \
  76. $(1)/usr/lib/
  77. $(INSTALL_DIR) $(1)/usr/lib/mpg123
  78. $(CP) \
  79. $(PKG_INSTALL_DIR)/usr/lib/mpg123/* \
  80. $(1)/usr/lib/mpg123
  81. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  82. $(CP) \
  83. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmpg123.pc \
  84. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libout123.pc \
  85. $(1)/usr/lib/pkgconfig
  86. endef
  87. define Package/libmpg123/install
  88. $(INSTALL_DIR) $(1)/usr/lib
  89. $(CP) \
  90. $(PKG_INSTALL_DIR)/usr/lib/libmpg123.so* \
  91. $(1)/usr/lib/
  92. endef
  93. define Package/libout123/install
  94. $(INSTALL_DIR) $(1)/usr/lib
  95. $(CP) \
  96. $(PKG_INSTALL_DIR)/usr/lib/libout123.so* \
  97. $(1)/usr/lib/
  98. endef
  99. define Package/mpg123/install
  100. $(INSTALL_DIR) $(1)/usr/bin
  101. $(INSTALL_BIN) \
  102. $(PKG_INSTALL_DIR)/usr/bin/mpg123{,-id3dump,-strip} \
  103. $(PKG_INSTALL_DIR)/usr/bin/out123 \
  104. $(1)/usr/bin
  105. $(INSTALL_DIR) $(1)/usr/lib/mpg123
  106. $(CP) \
  107. $(PKG_INSTALL_DIR)/usr/lib/mpg123/* \
  108. $(1)/usr/lib/mpg123
  109. endef
  110. $(eval $(call BuildPackage,libmpg123))
  111. $(eval $(call BuildPackage,libout123))
  112. $(eval $(call BuildPackage,mpg123))