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.

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