use Build/Configure/Default macro, Makefile cleanup
[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 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/ao.pc
61 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/ao.pc
62 endef
63
64 define Build/UninstallDev
65 rm -rf \
66 $(STAGING_DIR)/usr/include/ao \
67 $(STAGING_DIR)/usr/lib/libao.{a,so*} \
68 $(STAGING_DIR)/usr/lib/pkgconfig/ao.pc
69 endef
70
71 define Package/libao/install
72 install -d -m0755 $(1)/usr/lib
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.so.* $(1)/usr/lib/
74 endef
75
76 $(eval $(call BuildPackage,libao))