e23ee9ae86ec886220dcc9af7c7b44a0467b8a3f
[openwrt/svn-archive/archive.git] / libs / libao / 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:=libao
12 PKG_VERSION:=0.8.6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ao/
17 PKG_MD5SUM:=12e136a4c0995068ff134997c84421ed
18 PKG_CAT:=zcat
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/libao
26 SECTION:=libs
27 DEPENDS:=+alsa-lib
28 CATEGORY:=Libraries
29 TITLE:=A cross platform audio library
30 DESCRIPTION:=\
31 Libao is a cross-platform audio library that allows programs to \\\
32 output audio using a simple API on a wide variety of platforms.
33 URL:=http://www.xiph.org/ao/
34 endef
35
36 define Build/Configure
37 $(call Build/Configure/Default, \
38 --enable-shared \
39 --enable-static \
40 --disable-esd \
41 --disable-arts \
42 --disable-nas \
43 --disable-polyp \
44 )
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 all install
51 endef
52
53 define Build/InstallDev
54 mkdir -p $(STAGING_DIR)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/ao $(STAGING_DIR)/usr/include/
56 mkdir -p $(STAGING_DIR)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.{a,so*} $(STAGING_DIR)/usr/lib/
58 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ao.pc $(STAGING_DIR)/usr/lib/pkgconfig/
60 endef
61
62 define Build/UninstallDev
63 rm -rf \
64 $(STAGING_DIR)/usr/include/ao \
65 $(STAGING_DIR)/usr/lib/libao.{a,so*} \
66 $(STAGING_DIR)/usr/lib/pkgconfig/ao.pc
67 endef
68
69 define Package/libao/install
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.so.* $(1)/usr/lib/
72 endef
73
74 $(eval $(call BuildPackage,libao))