Makefile cleanups, round 5
[packages.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
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libao
22   SECTION:=libs
23   DEPENDS:=+alsa-lib
24   CATEGORY:=Libraries
25   TITLE:=A cross platform audio library
26   URL:=http://www.xiph.org/ao/
27 endef
28
29 define Package/libao/description
30         Libao is a cross-platform audio library that allows programs to 
31         output audio using a simple API on a wide variety of platforms.
32 endef
33
34 define Build/Configure
35         $(call Build/Configure/Default, \
36                 --enable-shared \
37                 --enable-static \
38                 --disable-esd \
39                 --disable-arts \
40                 --disable-nas \
41                 --disable-polyp \
42         )
43 endef
44
45 define Build/Compile
46         $(MAKE) -C $(PKG_BUILD_DIR) \
47                 DESTDIR="$(PKG_INSTALL_DIR)" \
48                 all install
49 endef
50
51 define Build/InstallDev
52         mkdir -p $(1)/usr/include
53         $(CP) $(PKG_INSTALL_DIR)/usr/include/ao $(1)/usr/include/
54         mkdir -p $(1)/usr/lib
55         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.{a,so*} $(1)/usr/lib/
56         mkdir -p $(1)/usr/lib/pkgconfig
57         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ao.pc $(1)/usr/lib/pkgconfig/
58 endef
59
60 define Package/libao/install
61         $(INSTALL_DIR) $(1)/usr/lib
62         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.so.* $(1)/usr/lib/
63 endef
64
65 $(eval $(call BuildPackage,libao))