Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #
  2. # Copyright (C) 2006-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:=madplay
  9. PKG_VERSION:=0.15.2b
  10. PKG_RELEASE:=6
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/mad \
  13. ftp://ftp.mars.org/pub/mpeg/
  14. PKG_MD5SUM:=6814b47ceaa99880c754c5195aa1aac1
  15. PKG_LICENSE:=GPL-2.0+
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_MAINTAINER:=Simon Peter <probono@puredarwin.org>
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_FIXUP:=autoreconf
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/madplay/default
  23. SECTION:=sound
  24. CATEGORY:=Sound
  25. DEPENDS:=+libid3tag +libmad $(INTL_DEPENDS) $(2)
  26. TITLE:=MPEG audio player in fixed point - $(1)
  27. VARIANT:=$(1)
  28. URL:=http://sourceforge.net/projects/mad
  29. endef
  30. Package/madplay-alsa=$(call Package/madplay/default,alsa,+alsa-lib)
  31. Package/madplay=$(call Package/madplay/default,oss)
  32. define Package/madplay/description
  33. MAD is an MPEG audio decoder. It currently only supports the MPEG 1
  34. standard, but fully implements all three audio layers (Layer I, Layer II,
  35. and Layer III, the latter often colloquially known as MP3.). There is also
  36. full support for ID3 tags.
  37. endef
  38. define Build/Configure
  39. $(call Build/Configure/Default, \
  40. --enable-shared \
  41. --disable-static \
  42. --disable-debugging \
  43. --disable-profiling \
  44. --disable-experimental \
  45. --without-libiconv-prefix \
  46. --without-libintl-prefix \
  47. --without-esd \
  48. , \
  49. LIBS="-lz" \
  50. )
  51. endef
  52. ifeq ($(BUILD_VARIANT),alsa)
  53. CONFIGURE_ARGS += \
  54. --without-oss \
  55. --with-alsa
  56. endif
  57. ifeq ($(BUILD_VARIANT),oss)
  58. CONFIGURE_ARGS += \
  59. --without-alsa
  60. endif
  61. define Package/madplay/install
  62. $(INSTALL_DIR) $(1)/usr/bin
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/madplay $(1)/usr/bin/
  64. endef
  65. define Package/madplay-alsa/install
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/madplay $(1)/usr/bin/
  68. endef
  69. $(eval $(call BuildPackage,madplay-alsa))
  70. $(eval $(call BuildPackage,madplay))