[packages] alsa-utils: add arecord binary (closes: #7155)
[openwrt/svn-archive/archive.git] / utils / alsa-utils / Makefile
index c086879d7ec6e841474df00fc1b35939bf46d2f8..39b71d5b3c9424781264a8099864bc39c16ff47a 100644 (file)
@@ -1,23 +1,21 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-utils
-PKG_VERSION:=1.0.13
-PKG_RELEASE:=1
+PKG_VERSION:=1.0.21
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/
-PKG_MD5SUM:=dfe4bb5d3217f3ec662b172ce8397cf0
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \
+               http://alsa.cybermirror.org/utils/
+PKG_MD5SUM:=3672287c2608040d111ce45495ba7602
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -29,23 +27,43 @@ define Package/alsa-utils
   URL:=http://www.alsa-project.org/
 endef
 
+define Package/alsa-utils-tests
+  $(call Package/alsa-utils/Default)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=ALSA utilities test data (adds ~1.3M to image)
+endef
+
 define Build/Configure
        $(call Build/Configure/Default, \
                --disable-rpath \
+               --disable-alsatest \
+               --disable-xmlto \
        )
 endef
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-endef
-
 define Package/alsa-utils/install
-       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/{s,}bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amixer $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/alsamixer $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aplay $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arecord $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/alsactl $(1)/usr/sbin/
+
+       $(INSTALL_DIR) $(1)/usr/share/alsa/init
+       $(INSTALL_DATA) \
+           $(PKG_INSTALL_DIR)/usr/share/alsa/init/* \
+           $(1)/usr/share/alsa/init/
+endef
+
+define Package/alsa-utils-tests/install
+       $(INSTALL_DIR) $(1)/usr/{s,}bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/speaker-test $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/share/sounds/alsa
+       $(INSTALL_DATA) \
+           $(PKG_INSTALL_DIR)/usr/share/sounds/alsa/* \
+           $(1)/usr/share/sounds/alsa/
 endef
 
 $(eval $(call BuildPackage,alsa-utils))
+$(eval $(call BuildPackage,alsa-utils-tests))