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.

134 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.10
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/mpg123
  13. PKG_HASH:=6c1337aee2e4bf993299851c70b7db11faec785303cfca3a5c3eb5f329ba7023
  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_CPE_ID:=cpe:/a:mpg123:mpg123
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/mpg123/Default
  22. URL:=http://www.mpg123.de
  23. endef
  24. define Package/libmpg123
  25. $(call Package/mpg123/Default)
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE:=fast console mpeg audio decoder library
  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. DEPENDS:=+libltdl
  37. endef
  38. define Package/mpg123
  39. $(call Package/mpg123/Default)
  40. SECTION:=sound
  41. CATEGORY:=Sound
  42. TITLE:=fast console mpeg audio player
  43. DEPENDS+=+libmpg123 +alsa-lib +libout123
  44. endef
  45. TARGET_CFLAGS += -D_GNU_SOURCE
  46. CONFIGURE_ARGS+= \
  47. --enable-shared \
  48. --enable-static \
  49. --with-audio=alsa \
  50. --with-default-audio=alsa \
  51. ifeq ($(CONFIG_SOFT_FLOAT),y)
  52. CONFIGURE_ARGS+= \
  53. --with-cpu=generic_nofpu \
  54. --enable-int-quality=yes
  55. else
  56. CONFIGURE_ARGS+= \
  57. --with-cpu=generic_fpu
  58. endif
  59. ifneq ($(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),)
  60. CONFIGURE_ARGS+= \
  61. --with-cpu=arm_fpu
  62. endif
  63. define Build/InstallDev
  64. $(INSTALL_DIR) $(1)/usr/include
  65. $(INSTALL_DATA) \
  66. $(PKG_INSTALL_DIR)/usr/include/mpg123.h \
  67. $(PKG_INSTALL_DIR)/usr/include/out123.h \
  68. $(PKG_INSTALL_DIR)/usr/include/fmt123.h \
  69. $(1)/usr/include/
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(CP) \
  72. $(PKG_INSTALL_DIR)/usr/lib/libmpg123.{la,a,so*} \
  73. $(PKG_INSTALL_DIR)/usr/lib/libout123.{la,a,so*} \
  74. $(1)/usr/lib/
  75. $(INSTALL_DIR) $(1)/usr/lib/mpg123
  76. $(CP) \
  77. $(PKG_INSTALL_DIR)/usr/lib/mpg123/* \
  78. $(1)/usr/lib/mpg123
  79. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  80. $(CP) \
  81. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmpg123.pc \
  82. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libout123.pc \
  83. $(1)/usr/lib/pkgconfig
  84. endef
  85. define Package/libmpg123/install
  86. $(INSTALL_DIR) $(1)/usr/lib
  87. $(CP) \
  88. $(PKG_INSTALL_DIR)/usr/lib/libmpg123.so* \
  89. $(1)/usr/lib/
  90. endef
  91. define Package/libout123/install
  92. $(INSTALL_DIR) $(1)/usr/lib
  93. $(CP) \
  94. $(PKG_INSTALL_DIR)/usr/lib/libout123.so* \
  95. $(1)/usr/lib/
  96. endef
  97. define Package/mpg123/install
  98. $(INSTALL_DIR) $(1)/usr/bin
  99. $(INSTALL_BIN) \
  100. $(PKG_INSTALL_DIR)/usr/bin/mpg123{,-id3dump,-strip} \
  101. $(PKG_INSTALL_DIR)/usr/bin/out123 \
  102. $(1)/usr/bin
  103. $(INSTALL_DIR) $(1)/usr/lib/mpg123
  104. $(CP) \
  105. $(PKG_INSTALL_DIR)/usr/lib/mpg123/* \
  106. $(1)/usr/lib/mpg123
  107. endef
  108. $(eval $(call BuildPackage,libmpg123))
  109. $(eval $(call BuildPackage,libout123))
  110. $(eval $(call BuildPackage,mpg123))