Merge pull request #2874 from dibdot/adblock
[feed/packages.git] / multimedia / icecast / Makefile
1 #
2 # Copyright (C) 2006-2011 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.4.3
12 PKG_RELEASE:=2
13 PKG_LICENSE:=GPL-2.0
14 PKG_MAINTAINER:=André Gaul <andre@gaul.io>
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://downloads.xiph.org/releases/icecast/
18 PKG_MD5SUM:=83d7d34dbe22f0f8fc119d2c9839efc0
19
20 PKG_FIXUP:=autoreconf
21
22 include $(INCLUDE_DIR)/package.mk
23
24 TREMOR_BUILD_DIR=$(PKG_BUILD_DIR)/libvorbisidec-1.2.0-dave
25 TREMOR_DIR=$(TREMOR_BUILD_DIR)/ipkg-install/usr
26
27 define Package/icecast
28 SECTION:=multimedia
29 CATEGORY:=Multimedia
30 DEPENDS:=+libcurl +libxml2 +libxslt +libogg +libopenssl
31 TITLE:=A streaming media server for Ogg/Vorbis and MP3 audio streams
32 USERID:=icecast=87:icecast=87
33 URL:=http://www.icecast.org/
34 endef
35
36 define Package/icecast/description
37 Icecast is a streaming media server which currently supports Ogg
38 Vorbis and MP3 audio streams. It can be used to create an Internet
39 radio station or a privately running jukebox and many things in
40 between. It is very versatile in that new formats can be added
41 relatively easily and supports open standards for commuincation and
42 interaction.
43 endef
44
45 define Build/Prepare
46 $(Build/Prepare/Default)
47 $(SUBMAKE) -f libvorbisidec.mk \
48 BUILD_DIR="$(PKG_BUILD_DIR)" \
49 V=99 \
50 prepare
51 endef
52
53 define Build/Configure
54 $(MAKE) -f libvorbisidec.mk \
55 BUILD_DIR="$(PKG_BUILD_DIR)" \
56 V=99 \
57 compile
58 $(SED) 's,-lvorbis ,$(TREMOR_DIR)/lib/libvorbisidec.a -logg ,g' $(PKG_BUILD_DIR)/configure
59 $(call Build/Configure/Default, \
60 --enable-yp \
61 --with-curl="yes" \
62 --with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \
63 --with-ogg="$(STAGING_DIR)/usr" \
64 --with-speex="no" \
65 --with-theora="no" \
66 --with-vorbis="$(TREMOR_DIR)" \
67 --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" \
68 , \
69 CPPFLAGS="-I$(TREMOR_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 $(TARGET_CPPFLAGS)" \
70 )
71 endef
72
73 define Build/Compile
74 $(MAKE) -C $(PKG_BUILD_DIR) \
75 DESTDIR="$(PKG_INSTALL_DIR)" \
76 INCLUDES="-I$(PKG_BUILD_DIR)/src -I$(TREMOR_DIR)/include" \
77 all install
78 endef
79
80 define Package/icecast/install
81 $(INSTALL_DIR) $(1)/etc
82 $(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(1)/etc/
83 $(INSTALL_DIR) $(1)/etc/init.d
84 $(INSTALL_BIN) ./files/icecast.init $(1)/etc/init.d/icecast
85 $(INSTALL_DIR) $(1)/usr/bin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icecast $(1)/usr/bin/
87 $(INSTALL_DIR) $(1)/usr/share/icecast
88 $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/admin $(1)/usr/share/icecast/
89 $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/web $(1)/usr/share/icecast/
90 endef
91
92 define Package/icecast/conffiles
93 /etc/icecast.xml
94 endef
95
96 $(eval $(call BuildPackage,icecast))