ba49fcad3f3bea43426eaae84cc3bab6ef65bb30
[openwrt/svn-archive/archive.git] / libs / alsa-lib / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=alsa-lib
11 PKG_VERSION:=1.0.20
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
16 http://alsa.cybermirror.org/lib/
17
18 PKG_MD5SUM:=6e9080ba1faa5d3739d14dd76c62d8dc
19
20 PKG_FIXUP:=libtool
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 ifeq ($(KERNEL),2.4)
26 DEPENDS_KMOD:=+kmod-alsa
27 else
28 DEPENDS_KMOD:=+kmod-sound-core
29 endif
30
31 define Package/alsa-lib
32 SECTION:=libs
33 CATEGORY:=Libraries
34 TITLE:=ALSA (Advanced Linux Sound Architecture) library
35 URL:=http://www.alsa-project.org/
36 DEPENDS:=@USB_SUPPORT $(DEPENDS_KMOD)
37 endef
38
39 define Package/alsa-lib/description
40 This is the library package for alsa, needed by some userspace programs.
41 You must have enabled the ALSA support in the kernel.
42 endef
43
44 TARGET_CFLAGS += $(FPIC)
45
46 define Build/Configure
47 $(call Build/Configure/Default, \
48 --enable-static \
49 --disable-python \
50 --disable-debug \
51 --without-debug \
52 $(SOFT_FLOAT_CONFIG_OPTION) \
53 --with-versioned=no \
54 )
55 endef
56
57 define Build/InstallDev
58 $(INSTALL_DIR) $(1)/usr/include/
59 $(CP) \
60 $(PKG_INSTALL_DIR)/usr/include/alsa \
61 $(1)/usr/include/
62
63 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
64 $(CP) \
65 $(PKG_INSTALL_DIR)/usr/lib/libasound.{la,a,so*} \
66 $(1)/usr/lib/
67 $(INSTALL_DATA) \
68 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/alsa.pc \
69 $(1)/usr/lib/pkgconfig/
70
71 $(INSTALL_DIR) $(1)/usr/share/aclocal
72 $(INSTALL_DATA) \
73 $(PKG_INSTALL_DIR)/usr/share/aclocal/alsa.m4 \
74 $(1)/usr/share/aclocal/
75 endef
76
77 define Package/alsa-lib/install
78 $(INSTALL_DIR) $(1)/usr/lib
79 $(CP) \
80 $(PKG_INSTALL_DIR)/usr/lib/libasound.so.* \
81 $(1)/usr/lib/
82
83 $(INSTALL_DIR) $(1)/usr/share/alsa/{cards,pcm}
84 $(INSTALL_DATA) \
85 $(PKG_INSTALL_DIR)/usr/share/alsa/alsa.conf \
86 $(1)/usr/share/alsa/
87 $(INSTALL_DATA) \
88 $(PKG_INSTALL_DIR)/usr/share/alsa/pcm/* \
89 $(1)/usr/share/alsa/pcm/
90 $(CP) \
91 $(PKG_INSTALL_DIR)/usr/share/alsa/cards/* \
92 $(1)/usr/share/alsa/cards/
93 endef
94
95 $(eval $(call BuildPackage,alsa-lib))