replace lots of manual install commands with INSTALL_* variables
[openwrt/svn-archive/archive.git] / net / icecast / Makefile
1 #
2 # Copyright (C) 2006 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:=icecast
12 PKG_VERSION:=2.3.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/icecast/
17 PKG_MD5SUM:=35256fbc4a93571662af2ed18fbbfcc5
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/icecast
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libcurl +libvorbisidec +libxml2 +libxslt
29 TITLE:=A streaming media server for Ogg/Vorbis and MP3 audio streams
30 DESCRIPTION:=\
31 Icecast is a streaming media server which currently supports Ogg \\\
32 Vorbis and MP3 audio streams. It can be used to create an Internet \\\
33 radio station or a privately running jukebox and many things in \\\
34 between. It is very versatile in that new formats can be added \\\
35 relatively easily and supports open standards for commuincation and \\\
36 interaction.
37 URL:=http://www.icecast.org/
38 endef
39
40
41 define Build/Configure
42 $(call Build/Configure/Default, \
43 --enable-yp \
44 --with-curl="yes" \
45 --with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \
46 --with-ogg="$(STAGING_DIR)/usr" \
47 --with-speex="no" \
48 --with-theora="no" \
49 --with-vorbis="$(STAGING_DIR)/usr" \
50 --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" \
51 , \
52 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 " \
53 )
54 endef
55
56 define Build/Compile
57 $(MAKE) -C $(PKG_BUILD_DIR) \
58 DESTDIR="$(PKG_INSTALL_DIR)" \
59 all install
60 endef
61
62 define Package/icecast/install
63 $(INSTALL_DIR) $(1)/etc
64 $(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(1)/etc/
65 $(INSTALL_DIR) $(1)/usr/bin
66 $(CP) $(PKG_INSTALL_DIR)/usr/bin/icecast $(1)/usr/bin/
67 $(INSTALL_DIR) $(1)/usr/share/icecast
68 $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/admin $(1)/usr/share/icecast/
69 $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/web $(1)/usr/share/icecast/
70 endef
71
72 $(eval $(call BuildPackage,icecast))