[packages] massive change: replace occurences of -I$(STAGING_DIR)/{include,usr/includ...
[openwrt/svn-archive/archive.git] / net / icecast / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=icecast
11 PKG_VERSION:=2.3.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/icecast/
16 PKG_MD5SUM:=ff516b3ccd2bcc31e68f460cd316093f
17
18 include $(INCLUDE_DIR)/package.mk
19
20 TREMOR_BUILD_DIR=$(PKG_BUILD_DIR)/libvorbisidec-1.2.0-dave
21 TREMOR_DIR=$(TREMOR_BUILD_DIR)/ipkg-install/usr
22
23 define Package/icecast
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=+libcurl +libxml2 +libxslt +libogg
27 TITLE:=A streaming media server for Ogg/Vorbis and MP3 audio streams
28 URL:=http://www.icecast.org/
29 SUBMENU:=multimedia
30 endef
31
32 define Package/icecast/description
33 Icecast is a streaming media server which currently supports Ogg
34 Vorbis and MP3 audio streams. It can be used to create an Internet
35 radio station or a privately running jukebox and many things in
36 between. It is very versatile in that new formats can be added
37 relatively easily and supports open standards for commuincation and
38 interaction.
39 endef
40
41 define Build/Prepare
42 $(Build/Prepare/Default)
43 $(SUBMAKE) -f libvorbisidec.mk \
44 BUILD_DIR="$(PKG_BUILD_DIR)" \
45 V=99 \
46 prepare
47 endef
48
49 define Build/Configure
50 $(MAKE) -f libvorbisidec.mk \
51 BUILD_DIR="$(PKG_BUILD_DIR)" \
52 V=99 \
53 compile
54 $(SED) 's,-lvorbisidec,$(TREMOR_DIR)/lib/libvorbisidec.a,g' $(PKG_BUILD_DIR)/configure
55 $(call Build/Configure/Default, \
56 --enable-yp \
57 --with-curl="yes" \
58 --with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \
59 --with-ogg="$(TREMOR_DIR)" \
60 --with-speex="no" \
61 --with-theora="no" \
62 --with-vorbis="$(TREMOR_DIR)" \
63 --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" \
64 , \
65 CPPFLAGS="-I$(TREMOR_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 $(TARGET_CPPFLAGS)" \
66 )
67 endef
68
69 define Build/Compile
70 $(MAKE) -C $(PKG_BUILD_DIR) \
71 DESTDIR="$(PKG_INSTALL_DIR)" \
72 INCLUDES="-I$(PKG_BUILD_DIR)/src -I$(TREMOR_DIR)/include" \
73 all install
74 endef
75
76 define Package/icecast/install
77 $(INSTALL_DIR) $(1)/etc
78 $(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(1)/etc/
79 $(INSTALL_DIR) $(1)/usr/bin
80 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icecast $(1)/usr/bin/
81 $(INSTALL_DIR) $(1)/usr/share/icecast
82 $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/admin $(1)/usr/share/icecast/
83 $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/web $(1)/usr/share/icecast/
84 endef
85
86 $(eval $(call BuildPackage,icecast))