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