[packages] normalize PKG_FIXUP - the "libtool" fixup is merely an alias for "autoreco...
[packages.git] / libs / libmad / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libmad
11 PKG_VERSION:=0.15.1b
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/mad \
16         ftp://ftp.mars.org/pub/mpeg/
17 PKG_MD5SUM:=1be543bc30c56fb6bea1d7bf6a64e66c
18
19 PKG_FIXUP:=autoreconf
20
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 FPM:=default
26 ifeq ($(ARCH),armeb)
27   FPM:=arm
28 endif
29 ifeq ($(ARCH),i386)
30   FPM:=intel
31 endif
32 ifeq ($(ARCH),mipsel)
33   FPM:=mips
34 endif
35
36 define Package/libmad
37   SECTION:=libs
38   CATEGORY:=Libraries
39   TITLE:=An high-quality MPEG audio decoding library
40   URL:=http://www.underbit.com/products/mad/
41   DEPENDS:=@BUILD_PATENTED
42 endef
43
44 define Package/libmad/description
45         MAD is a high-quality MPEG audio decoder. It currently supports 
46         MPEG-1 and the MPEG-2 extension to lower sampling frequencies, 
47         as well as the de facto MPEG 2.5 format. All three audio layers - 
48         Layer I, Layer II, and Layer III (i.e. MP3) - are fully implemented.
49 endef
50
51 TARGET_CFLAGS += $(FPIC)
52
53 CONFIGURE_ARGS+= \
54         --enable-shared \
55         --enable-static \
56         --enable-fpm="$(FPM)" \
57         --disable-debugging \
58         --enable-speed \
59
60 # XXX: configure is parsing and "optimizing" CFLAGS, adding unsupported 
61 # XXX: compiler args to it (like -fforce-mem)
62 # XXX: so pass an empty one to configure
63 CONFIGURE_VARS+= \
64         CFLAGS="" \
65
66 # XXX: and pass our own to make
67 MAKE_FLAGS+= \
68         CFLAGS="$(TARGET_CFLAGS)" \
69
70 define Build/InstallDev
71         $(INSTALL_DIR) $(1)/usr/include
72         $(CP) $(PKG_INSTALL_DIR)/usr/include/mad.h $(1)/usr/include/
73         $(INSTALL_DIR) $(1)/usr/lib
74         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.{a,so*} $(1)/usr/lib/
75 endef
76
77 define Package/libmad/install
78         $(INSTALL_DIR) $(1)/usr/lib
79         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(1)/usr/lib/
80 endef
81
82 $(eval $(call BuildPackage,libmad))