summaryrefslogtreecommitdiffstats
path: root/package/multimedia/madplay/madplay.mk
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-11-15 21:33:07 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2008-11-15 21:33:07 +0000
commite7df5afeb9634a0d95499049efb5c4887069290d (patch)
tree307e4abcfc17552130058735e2d9dbd8e1f64784 /package/multimedia/madplay/madplay.mk
parent4190cc1c4166160a2802efb1c090dd42ff2e7d6e (diff)
downloadbuildroot-novena-e7df5afeb9634a0d95499049efb5c4887069290d.tar.gz
buildroot-novena-e7df5afeb9634a0d95499049efb5c4887069290d.zip
package/audio: rename audio category to multimedia
Prepare for the merge of audio and video packages. Many packages cannot properly be assigned to either audio or video, because they have support for both (libogg, mplayer, vlc). Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Diffstat (limited to 'package/multimedia/madplay/madplay.mk')
-rw-r--r--package/multimedia/madplay/madplay.mk73
1 files changed, 73 insertions, 0 deletions
diff --git a/package/multimedia/madplay/madplay.mk b/package/multimedia/madplay/madplay.mk
new file mode 100644
index 000000000..e81154541
--- /dev/null
+++ b/package/multimedia/madplay/madplay.mk
@@ -0,0 +1,73 @@
+#############################################################
+#
+# madplay
+#
+#############################################################
+MADPLAY_VERSION:=0.15.2b
+MADPLAY_SOURCE:=madplay-$(MADPLAY_VERSION).tar.gz
+MADPLAY_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/mad
+MADPLAY_CAT:=$(ZCAT)
+MADPLAY_DIR:=$(BUILD_DIR)/madplay-$(MADPLAY_VERSION)
+MADPLAY_BIN:=madplay
+MADPLAY_TARGET_BIN:=usr/bin/$(MADPLAY_BIN)
+
+# Check if ALSA is built, then we should configure after alsa-lib so
+# ./configure can find alsa-lib.
+ifeq ($(strip $(BR2_PACKAGE_MADPLAY_ALSA)),y)
+MADPLAY_USE_ALSA:=--with-alsa
+MADPLAY_ALSA_DEP:=alsa-lib
+endif
+
+$(DL_DIR)/$(MADPLAY_SOURCE):
+ $(WGET) -P $(DL_DIR) $(MADPLAY_SITE)/$(MADPLAY_SOURCE)
+
+$(MADPLAY_DIR)/.unpacked: $(DL_DIR)/$(MADPLAY_SOURCE)
+ $(MADPLAY_CAT) $(DL_DIR)/$(MADPLAY_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(MADPLAY_DIR) package/multimedia/madplay madplay\*.patch\*
+ $(CONFIG_UPDATE) $(MADPLAY_DIR)
+ touch $@
+
+$(MADPLAY_DIR)/.configured: $(MADPLAY_DIR)/.unpacked
+ (cd $(MADPLAY_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_ARGS) \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS) $(BR2_MADPLAY_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ ./configure \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ --host=$(REAL_GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ $(MADPLAY_USE_ALSA) \
+ $(DISABLE_NLS) \
+ $(DISABLE_LARGEFILE) \
+ )
+ touch $@
+
+$(MADPLAY_DIR)/$(MADPLAY_BIN): $(MADPLAY_DIR)/.configured
+ $(MAKE) -C $(MADPLAY_DIR)
+
+$(TARGET_DIR)/$(MADPLAY_TARGET_BIN): $(MADPLAY_DIR)/$(MADPLAY_BIN)
+ $(INSTALL) -D $(MADPLAY_DIR)/$(MADPLAY_BIN) $(TARGET_DIR)/$(MADPLAY_TARGET_BIN)
+ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(MADPLAY_TARGET_BIN)
+
+madplay: uclibc $(MADPLAY_ALSA_DEP) libmad libid3tag $(TARGET_DIR)/$(MADPLAY_TARGET_BIN)
+
+madplay-clean:
+ rm -f $(TARGET_DIR)/$(MADPLAY_TARGET_BIN)
+ -$(MAKE) -C $(MADPLAY_DIR) clean
+
+madplay-dirclean:
+ rm -rf $(MADPLAY_DIR)
+
+madplay-source: $(DL_DIR)/$(MADPLAY_SOURCE)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_MADPLAY)),y)
+TARGETS+=madplay
+endif