Add libSDL_sound
[openwrt/svn-archive/archive.git] / libs / libsdl_sound / Makefile
1 #
2 # Copyright (C) 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:=libsdl-sound
11 PKG_VERSION:=1.0.3
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=SDL_sound-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://icculus.org/SDL_sound/downloads/
16 PKG_MD5SUM:=aa09cd52df85d29bee87a664424c94b5
17 PKG_BUILD_DIR:=$(BUILD_DIR)/SDL_sound-$(PKG_VERSION)
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libsdl-sound
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=Simple DirectMedia Layer Sound Decoder
25 URL:=http://icculus.org/SDL_sound/
26 DEPENDS:=+libsdl
27 endef
28
29 define Package/libsdl-sound/description
30 SDL_sound is a library that handles the decoding
31 of several popular sound file formats, such as .WAV and .MP3.
32 endef
33
34 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/SDL
35
36 CONFIGURE_ARGS += \
37 --with-sdl-exec-prefix=$(STAGING_DIR)
38
39 CONFIGURE_VARS += \
40 LIBS="-lSDL -ldirect -ldirectfb -lfusion"
41
42 define Build/Compile
43 rm -rf $(PKG_INSTALL_DIR)
44 $(MAKE) -C $(PKG_BUILD_DIR) \
45 DESTDIR="$(PKG_INSTALL_DIR)" \
46 all install
47 endef
48
49 define Build/InstallDev
50 $(INSTALL_DIR) $(1)/usr/include/SDL $(1)/usr/lib
51 $(CP) \
52 $(PKG_INSTALL_DIR)/usr/include/SDL/SDL_sound.h \
53 $(1)/usr/include/SDL/
54 $(CP) \
55 $(PKG_INSTALL_DIR)/usr/lib/libSDL_sound*.{a,so*} \
56 $(1)/usr/lib/
57 endef
58
59 define Package/libsdl-sound/install
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL_sound*.so.* $(1)/usr/lib/
62 endef
63
64 $(eval $(call BuildPackage,libsdl-sound))