91e20e482f1588c1bc6ed6cc366deb51ca56e7b2
[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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=alsa-lib
12 PKG_VERSION:=1.0.13
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/
17 PKG_MD5SUM:=d55a9d7d2a79d738a1b7a511cffda4b6
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/alsa-lib
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+kmod-alsa
29 TITLE:=ALSA (Advanced Linux Sound Architecture) library
30 DESCRIPTION:=\
31 This is the library package for alsa, needed by some userspace programs. You must \\\
32 have enabled the ALSA support in the kernel.
33 URL:=http://www.alsa-project.org/
34 endef
35
36 define Build/Configure
37 $(call Build/Configure/Default,\
38 --enable-shared \
39 --enable-static \
40 --disable-debugging \
41 --disable-profiling \
42 --with-softfloat \
43 --with-versioned=no \
44 )
45 endef
46
47 define Build/Compile
48 # override AM_CFLAGS holding inappropriate optimization flags
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 AM_CFLAGS="" \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 all install
53 endef
54
55 define Build/InstallDev
56 mkdir -p $(STAGING_DIR)/usr/include
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/alsa $(STAGING_DIR)/usr/include/
58 mkdir -p $(STAGING_DIR)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasound.{a,so}* $(STAGING_DIR)/usr/lib/
60 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/alsa.pc $(STAGING_DIR)/usr/lib/pkgconfig/
62 $(SED) 's,-I$$$${includedir}/alsa,,g' $(STAGING_DIR)/usr/lib/pkgconfig/alsa.pc
63 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/alsa.pc
64 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/alsa.pc
65 endef
66
67 define Build/UninstallDev
68 rm -rf \
69 $(STAGING_DIR)/usr/include/alsa \
70 $(STAGING_DIR)/usr/lib/libasound.{a,so}* \
71 $(STAGING_DIR)/usr/lib/pkgconfig/alsa.pc
72 endef
73
74 define Package/alsa-lib/install
75 install -d -m0755 $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasound.so.* $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,alsa-lib))