START/STOP values must be specified in the init script
[packages.git] / multimedia / peercast / 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:=peercast
12 PKG_VERSION:=0.1214
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.cti.ecp.fr/~beauxir5/peercast
17 PKG_MD5SUM:=4e8449cde7135ad97f788e67e1bd64ee
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/peercast
26   SECTION:=multimedia
27   CATEGORY:=Multimedia
28   DEPENDS:=+libpthread +uclibcxx
29   TITLE:=P2P audio and video streaming server
30   DESCRIPTION:=\
31         PeerCast is a fresh new P2P streaming server. It can stream music \\\
32         and video from a broad variety of formats. Many audio players can \\\
33         listen to peercast streams, as it's been built to remain compatible \\\
34         with Nullsoft Shoutcast.
35   URL:=http://www.peercast.org/
36 endef
37
38 define Package/peercast/conffiles
39 /etc/peercast.ini
40 endef
41
42 define Build/Configure
43         $(call Build/Configure/Default, \
44                 --enable-staticbin \
45                 , \
46                 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
47                 LIBS="-nodefaultlibs -luClibc++ -lpthread -lc -lm" \
48         )
49 endef
50
51 define Build/Compile
52         $(MAKE) -C $(PKG_BUILD_DIR) \
53                 DESTDIR="$(PKG_INSTALL_DIR)" \
54                 all install
55 endef
56
57 define Package/peercast/install 
58         $(INSTALL_DIR) $(1)/usr/sbin
59         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/peercast $(1)/usr/sbin/
60         $(INSTALL_DIR) $(1)/usr/share/peercast/html
61         $(CP) $(PKG_INSTALL_DIR)/usr/share/peercast/html/en $(1)/usr/share/peercast/html/
62         $(INSTALL_DIR) $(1)/etc
63         $(INSTALL_DATA) ./files/peercast.ini $(1)/etc/
64         $(INSTALL_DIR) $(1)/etc/init.d
65         $(INSTALL_BIN) ./files/peercast.init $(1)/etc/init.d/peercast
66 endef
67
68 $(eval $(call BuildPackage,peercast))