cleanups and fixes for libsamplerate and libsndfile
[openwrt/svn-archive/archive.git] / libs / libsamplerate / Makefile
1 #
2 # Copyright (C) 2007 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:=libsamplerate
12 PKG_VERSION:=0.1.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.mega-nerd.com/SRC/
17 PKG_MD5SUM:=6861c2c6b8e5273c9b80cf736b9fd0e
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libsamplerate
25 SECTION:=libs
26 CATEGORY:=Libraries
27 DEPENDS:=+libsndfile
28 TITLE:=Sample Rate Converter
29 URL:=http://www.mega-nerd.com/SRC/index.html
30 endef
31
32 define Package/libsamplerate/description
33 Secret Rabbit Code (aka libsamplerate) is a Sample Rate Converter for audio
34 endef
35
36 define Build/Configure
37 $(call Build/Configure/Default, \
38 --disable-fftw \
39 )
40 $(call libtool_disable_rpath)
41 endef
42
43 define Build/Compile
44 $(MAKE) -C $(PKG_BUILD_DIR) all
45 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
46 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
47 endef
48
49 define Build/InstallDev
50 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
51 endef
52
53 define Build/UninstallDev
54 rm -rf \
55 $(STAGING_DIR)/usr/include/ao/ \
56 $(STAGING_DIR)/usr/lib/libao.{a,so*,la}
57 endef
58
59 define Package/libsamplerate/install
60 $(INSTALL_DIR) $(1)/usr/bin
61 $(CP) $(PKG_INSTALL_DIR)/usr/* $(1)/usr/bin/
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsamplerate.* $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,libsamplerate))