add flac package (thanks to David Collet)
[openwrt.git] / package / libmad / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=libmad
6 PKG_VERSION:=0.15.1b
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=1be543bc30c56fb6bea1d7bf6a64e66c
9
10 PKG_SOURCE_URL:=@SF/mad \
11 ftp://ftp.mars.org/pub/mpeg/
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_CAT:=zcat
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
17
18 include $(TOPDIR)/package/rules.mk
19
20 $(eval $(call PKG_template,LIBMAD,libmad,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21
22 $(PKG_BUILD_DIR)/.configured:
23 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
24 $(TARGET_CONFIGURE_OPTS) \
25 CFLAGS="$(strip $(TARGET_CFLAGS))" \
26 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
27 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
28 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
29 ./configure \
30 --target=$(GNU_TARGET_NAME) \
31 --host=$(GNU_TARGET_NAME) \
32 --build=$(GNU_HOST_NAME) \
33 --program-prefix="" \
34 --program-suffix="" \
35 --prefix=/usr \
36 --exec-prefix=/usr \
37 --bindir=/usr/bin \
38 --datadir=/usr/share \
39 --includedir=/usr/include \
40 --infodir=/usr/share/info \
41 --libdir=/usr/lib \
42 --libexecdir=/usr/lib \
43 --localstatedir=/var \
44 --mandir=/usr/share/man \
45 --sbindir=/usr/sbin \
46 --sysconfdir=/etc \
47 $(DISABLE_LARGEFILE) \
48 $(DISABLE_NLS) \
49 --enable-shared \
50 --enable-static \
51 --disable-rpath \
52 --with-gnu-ld \
53 --enable-fpm=mips \
54 --disable-debugging \
55 --enable-speed \
56 );
57 touch $@
58
59 $(PKG_BUILD_DIR)/.built:
60 rm -rf $(PKG_INSTALL_DIR)
61 mkdir -p $(PKG_INSTALL_DIR)
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 DESTDIR="$(PKG_INSTALL_DIR)" \
64 all install
65 touch $@
66
67 $(IPKG_LIBMAD):
68 install -m0755 -d $(IDIR_LIBMAD)/usr/lib
69 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(IDIR_LIBMAD)/usr/lib/
70 $(RSTRIP) $(IDIR_LIBMAD)
71 $(IPKG_BUILD) $(IDIR_LIBMAD) $(PACKAGE_DIR)
72
73 $(STAGING_DIR)/usr/lib/libmad.so: $(PKG_BUILD_DIR)/.built
74 mkdir -p $(STAGING_DIR)/usr/include
75 cp -fpR $(PKG_INSTALL_DIR)/usr/include/mad.h $(STAGING_DIR)/usr/include/
76 mkdir -p $(STAGING_DIR)/usr/lib
77 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libmad.a $(STAGING_DIR)/usr/lib/
78 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libmad.so* $(STAGING_DIR)/usr/lib/
79 touch $@
80
81 install-dev: $(STAGING_DIR)/usr/lib/libmad.so
82
83 uninstall-dev:
84 rm -rf \
85 $(STAGING_DIR)/usr/include/mad.h \
86 $(STAGING_DIR)/usr/lib/libmad.a \
87 $(STAGING_DIR)/usr/lib/libmad.so* \
88
89 compile: install-dev
90 clean: uninstall-dev
91
92 mostlyclean:
93 -$(MAKE) -C $(PKG_BUILD_DIR) clean
94 rm -f $(PKG_BUILD_DIR)/.built
95
This page took 0.042448 seconds and 5 git commands to generate.