clean up, replace old libtool fixup calls with PKG_FIXUP
[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
19 PKG_FIXUP = libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 ifeq ($(KERNEL),2.4)
24 DEPENDS_KMOD:=+kmod-alsa
25 else
26 DEPENDS_KMOD:=+kmod-sound-core
27 endif
28
29 define Package/alsa-lib
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=ALSA (Advanced Linux Sound Architecture) library
33 URL:=http://www.alsa-project.org/
34 DEPENDS:=@USB_SUPPORT $(DEPENDS_KMOD)
35 endef
36
37 define Package/alsa-lib/description
38 This is the library package for alsa, needed by some userspace programs.
39 You must have enabled the ALSA support in the kernel.
40 endef
41
42 CONFIGURE_ARGS += \
43 --enable-shared \
44 --enable-static \
45 --disable-debugging \
46 --disable-profiling \
47 --with-softfloat \
48 --with-versioned=no \
49
50 define Build/Compile
51 # override AM_CFLAGS holding inappropriate optimization flags
52 $(MAKE) -C $(PKG_BUILD_DIR) AM_CFLAGS="" all
53 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
54 endef
55
56 define Build/InstallDev
57 mkdir -p $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/alsa $(1)/usr/include/
59 mkdir -p $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasound.{la,a,so*} $(1)/usr/lib/
61 mkdir -p $(1)/usr/lib/pkgconfig
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/alsa.pc $(1)/usr/lib/pkgconfig/
63 endef
64
65 define Package/alsa-lib/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasound.so.* $(1)/usr/lib/
68 $(INSTALL_DIR) $(1)/usr/share/alsa/
69 $(CP) $(PKG_INSTALL_DIR)/usr/share/alsa/alsa.conf $(1)/usr/share/alsa/
70 endef
71
72 $(eval $(call BuildPackage,alsa-lib))