[packages] licensing: Licensing metadata added to many packages
[openwrt/svn-archive/archive.git] / libs / alsa-lib / Makefile
index 44e2f28d8aa2d4264730c7489a74b629c1b9e606..97540c38941d0c7497dc39760afe1542e586a23a 100644 (file)
@@ -1,81 +1,91 @@
-# 
-# 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-lib
-PKG_VERSION:=1.0.13
+PKG_VERSION:=1.0.24.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/
-PKG_MD5SUM:=d55a9d7d2a79d738a1b7a511cffda4b6
-PKG_CAT:=bzcat
+PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
+               http://alsa.cybermirror.org/lib/
+PKG_MD5SUM:=7cc05f25e1d5b65da8fb3fdcd540f226
+
+PKG_LICENSE:=LGPLv2.1 GPLv2
+PKG_LICENSE_FILE:=COPYING aserver/COPYING
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/alsa-lib
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+kmod-alsa @USB_SUPPORT
   TITLE:=ALSA (Advanced Linux Sound Architecture) library
-  DESCRIPTION:=\
-       This is the library package for alsa, needed by some userspace programs. You must \\\
-       have enabled the ALSA support in the kernel.
   URL:=http://www.alsa-project.org/
+  DEPENDS:=@AUDIO_SUPPORT +kmod-sound-core +libpthread +librt
 endef
 
+define Package/alsa-lib/description
+ This is the library package for alsa, needed by some userspace programs.
+ You must have enabled the ALSA support in the kernel.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
 define Build/Configure
-       $(call Build/Configure/Default,\
-               --enable-shared \
+       $(call Build/Configure/Default, \
                --enable-static \
-               --disable-debugging \
-               --disable-profiling \
-               --with-softfloat \
+               --disable-python \
+               --disable-debug \
+               --without-debug \
+               $(SOFT_FLOAT_CONFIG_OPTION) \
                --with-versioned=no \
        )
 endef
 
-define Build/Compile
-       # override AM_CFLAGS holding inappropriate optimization flags
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               AM_CFLAGS="" \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-endef
-
 define Build/InstallDev
-       mkdir -p $(STAGING_DIR)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/alsa $(STAGING_DIR)/usr/include/
-       mkdir -p $(STAGING_DIR)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasound.{a,so}* $(STAGING_DIR)/usr/lib/
-       mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/alsa.pc $(STAGING_DIR)/usr/lib/pkgconfig/
-       $(SED) 's,-I$$$${includedir}/alsa,,g' $(STAGING_DIR)/usr/lib/pkgconfig/alsa.pc
-       $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/alsa.pc
-       $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/alsa.pc
-endef
+       $(INSTALL_DIR) $(1)/usr/include/
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/include/alsa \
+               $(1)/usr/include/
 
-define Build/UninstallDev
-       rm -rf \
-               $(STAGING_DIR)/usr/include/alsa \
-               $(STAGING_DIR)/usr/lib/libasound.{a,so}* \
-               $(STAGING_DIR)/usr/lib/pkgconfig/alsa.pc
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libasound.{la,a,so*} \
+               $(1)/usr/lib/
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/alsa.pc \
+               $(1)/usr/lib/pkgconfig/
+
+       $(INSTALL_DIR) $(1)/usr/share/aclocal
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/share/aclocal/alsa.m4 \
+               $(1)/usr/share/aclocal/
 endef
 
 define Package/alsa-lib/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasound.so.* $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/share/alsa/
-       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/share/alsa/alsa.conf $(1)/usr/share/alsa/
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libasound.so.* \
+               $(1)/usr/lib/
+
+       $(INSTALL_DIR) $(1)/usr/share/alsa/{cards,pcm}
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/share/alsa/alsa.conf \
+               $(1)/usr/share/alsa/
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/share/alsa/pcm/* \
+               $(1)/usr/share/alsa/pcm/
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/share/alsa/cards/* \
+               $(1)/usr/share/alsa/cards/
 endef
 
 $(eval $(call BuildPackage,alsa-lib))