lcd4linux fixes:
[packages.git] / libs / faad2 / Makefile
1 #
2 # Copyright (C) 2008 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:=faad2
12 PKG_VERSION:=2.6.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/faac
17 PKG_MD5SUM:=74e92df40c270f216a8305fc87603c8a
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
20
21 PKG_FIXUP = libtool
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/faad2/Default
26   URL:=http://www.audiocoding.com/faad2.html
27   TITLE:=Freeware Advanced Audio Decoder
28 endef
29
30 define Package/faad2/Default/description
31         FAAD2 is the fastest ISO AAC audio decoder available.
32         FAAD2 correctly decodes all MPEG-4 and MPEG-2 MAIN,
33         LOW, LTP, LD and ER object type AAC files.
34 endef
35
36 define Package/faad2
37 $(call Package/faad2/Default)
38   SECTION:=sound
39   CATEGORY:=Sound
40   TITLE+=player
41   DEPENDS:=+libfaad2
42 endef
43
44 define Package/faad2/description
45 $(call Package/faad2/Default/description)
46   This package contains a binary to play AAC or MP4 files.
47 endef
48
49 define Package/libfaad2
50 $(call Package/faad2/Default)
51   SECTION:=libs
52   CATEGORY:=Libraries
53   TITLE+=library
54 endef
55
56 define Package/libfaad2/description
57 $(call Package/faad2/Default/description)
58   This package contains the library.
59 endef
60
61 define Build/Configure
62         (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
63                 autoreconf -vif \
64         );
65         $(call Build/Configure/Default, \
66                 --with-mp4v2 \
67                 --without-xmms \
68                 , \
69                 FAAD2_CPPFLAGS="-fno-builtin-cos -fno-builtin-sin -fno-builtin-log" \
70         )
71 endef
72
73 MAKE_FLAGS += \
74         DESTDIR="$(PKG_INSTALL_DIR)" \
75         all install \
76
77 define Build/InstallDev
78         mkdir -p $(1)/usr/include
79         $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
80         mkdir -p $(1)/usr/lib
81         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.{a,so*} $(1)/usr/lib/
82 endef
83
84 define Package/faad2/install
85         $(INSTALL_DIR) $(1)/usr/bin
86         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/faad $(1)/usr/bin/
87 endef
88
89 define Package/libfaad2/install
90         $(INSTALL_DIR) $(1)/usr/lib
91         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.so.* $(1)/usr/lib/
92 endef
93
94 $(eval $(call BuildPackage,faad2))
95 $(eval $(call BuildPackage,libfaad2))
96
97 $(eval $(call RequireCommand,autoconf, \
98         $(PKG_NAME) requires GNU autoconf. \
99 ))