move gmp to buildroot-ng (required by isakmpd)
[openwrt/svn-archive/archive.git] / libs / libvorbisidec / 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:=libvorbisidec
12 PKG_VERSION:=1.2.0-dave
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://users.tpg.com.au/davico/openwrt/
18 PKG_MD5SUM:=cb8e51aab92ef164f8e0e8853f7164fa
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libvorbisidec
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=A fixed-point Ogg/Vorbis decoder library
29 DESCRIPTION:=A fixed-point Ogg/Vorbis decoder library.\\\
30 libvorbisidec is "tremor", a fixed-point implementation of libvorbis.\\\
31 It also has libogg built-in. It is suitable as a replacement for \\\
32 libvorbis and libogg in tremor-aware applications.\\\
33 Tremor is a decoder only.
34 URL:=http://http://wiki.xiph.org/index.php/Tremor
35 endef
36
37 define Build/Configure
38 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
39 $(TARGET_CONFIGURE_OPTS) \
40 CFLAGS="$(strip $(TARGET_CFLAGS))" \
41 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
42 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
43 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
44 ./configure \
45 --target=$(GNU_TARGET_NAME) \
46 --host=$(GNU_TARGET_NAME) \
47 --build=$(GNU_HOST_NAME) \
48 --program-prefix="" \
49 --program-suffix="" \
50 --prefix=/usr \
51 --exec-prefix=/usr \
52 --bindir=/usr/bin \
53 --datadir=/usr/share \
54 --includedir=/usr/include \
55 --infodir=/usr/share/info \
56 --libdir=/usr/lib \
57 --libexecdir=/usr/lib \
58 --localstatedir=/var \
59 --mandir=/usr/share/man \
60 --sbindir=/usr/sbin \
61 --sysconfdir=/etc \
62 $(DISABLE_LARGEFILE) \
63 $(DISABLE_NLS) \
64 --enable-shared \
65 --enable-static \
66 --disable-rpath \
67 --with-gnu-ld \
68 );
69 endef
70
71 define Build/Compile
72 rm -rf $(PKG_INSTALL_DIR)
73 mkdir -p $(PKG_INSTALL_DIR)
74 $(MAKE) -C $(PKG_BUILD_DIR) \
75 DESTDIR="$(PKG_INSTALL_DIR)" \
76 all install
77 endef
78
79 define Package/libvorbisidec/install
80 install -m0755 -d $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.so.* $(1)/usr/lib/
82 endef
83
84 define Build/InstallDev
85 mkdir -p $(STAGING_DIR)/usr/include
86 $(CP) $(PKG_INSTALL_DIR)/usr/include/tremor $(STAGING_DIR)/usr/include/
87 mkdir -p $(STAGING_DIR)/usr/lib
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.{a,so*} $(STAGING_DIR)/usr/lib/
89 endef
90
91 define Build/UninstallDev
92 rm -rf \
93 $(STAGING_DIR)/usr/include/tremor \
94 $(STAGING_DIR)/usr/lib/libvorbisidec.{a,so*}
95 endef
96
97 $(eval $(call BuildPackage,libvorbisidec))