2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/
17 PKG_MD5SUM:=d55a9d7d2a79d738a1b7a511cffda4b6
19 include $(INCLUDE_DIR)/package.mk
22 DEPENDS_KMOD:=+kmod-alsa
24 DEPENDS_KMOD:=+kmod-sound-core
27 define Package/alsa-lib
30 TITLE:=ALSA (Advanced Linux Sound Architecture) library
31 URL:=http://www.alsa-project.org/
32 DEPENDS:=@USB_SUPPORT $(DEPENDS_KMOD)
35 define Package/alsa-lib/description
36 This is the library package for alsa, needed by some userspace programs.
37 You must have enabled the ALSA support in the kernel.
48 define Build/Configure
49 $(call Build/Configure/Default)
50 $(call libtool_disable_rpath)
54 # override AM_CFLAGS holding inappropriate optimization flags
55 $(MAKE) -C $(PKG_BUILD_DIR) AM_CFLAGS="" all
56 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
57 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
60 define Build/InstallDev
61 mkdir -p $(STAGING_DIR)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/alsa $(STAGING_DIR)/usr/include/
63 mkdir -p $(STAGING_DIR)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasound.{a,so*} $(STAGING_DIR)/usr/lib/
65 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/alsa.pc $(STAGING_DIR)/usr/lib/pkgconfig/
69 define Build/UninstallDev
70 rm -rf $(STAGING_DIR)/usr/include/alsa \
71 $(STAGING_DIR)/usr/lib/libasound.{a,so*} \
72 $(STAGING_DIR)/usr/lib/pkgconfig/alsa.pc
75 define Package/alsa-lib/install
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasound.so.* $(1)/usr/lib/
78 $(INSTALL_DIR) $(1)/usr/share/alsa/
79 $(CP) $(PKG_INSTALL_DIR)/usr/share/alsa/alsa.conf $(1)/usr/share/alsa/
82 $(eval $(call BuildPackage,alsa-lib))