Retain symlinks. $(INSTALL_*) copys the contens of a file, so if we want to keep
[packages.git] / libs / libaudiofile / Makefile
1 #
2 # Copyright (C) 2006-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:=libaudiofile
12 PKG_VERSION:=0.2.6
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.cti.ecp.fr/~beauxir5/peercast
17 PKG_MD5SUM:=460f848ce5f4a33ae66b15a4fb7720ec
18 PKG_FIXUP:=libtool
19
20 include $(INCLUDE_DIR)/package.mk
21
22 PKG_INSTALL=1
23
24 define Package/libaudiofile
25   SECTION:=libs
26   CATEGORY:=Libraries
27   TITLE:=Audio File library
28   URL:=http://www.68k.org/~michael/audiofile/
29 endef
30
31 define Package/libaudiofile/description
32         The audiofile library allows the processing of audio data to and from audio 
33         files of many common formats (currently AIFF, AIFF-C, WAVE, NeXT/Sun, BICS, 
34         and raw data).
35 endef
36
37 TARGET_CFLAGS += $(FPIC)
38
39 define Build/Configure
40         $(call Build/Configure/Default, \
41                 --enable-shared \
42                 --enable-static \
43                 --with-build-cc="$(HOSTCC)" \
44         )
45 endef
46
47 define Build/InstallDev
48         $(INSTALL_DIR) $(2)/bin
49         $(INSTALL_BIN) \
50                 $(PKG_INSTALL_DIR)/usr/bin/audiofile-config \
51                 $(2)/bin/
52         $(SED) \
53                 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
54                 $(2)/bin/audiofile-config
55
56         $(INSTALL_DIR) $(1)/usr/include
57         $(INSTALL_DATA) \
58                 $(PKG_INSTALL_DIR)/usr/include/{af_vfs,audiofile,aupvlist}.h \
59                 $(1)/usr/include/
60
61         $(INSTALL_DIR) $(1)/usr/lib
62         $(CP) \
63                 $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.{la,a,so*} \
64                 $(1)/usr/lib/
65
66         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
67         $(INSTALL_DATA) \
68                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/audiofile.pc \
69                 $(1)/usr/lib/pkgconfig/
70 endef
71
72 define Package/libaudiofile/install
73         $(INSTALL_DIR) $(1)/usr/lib
74         $(CP) \
75                 $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.so.* \
76                 $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,libaudiofile))