[packages] Use default templates instead of custom reimplementations where applicable
[packages.git] / multimedia / peercast / Makefile
1 #
2 # Copyright (C) 2006-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:=peercast
11 PKG_VERSION:=0.1214
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.cti.ecp.fr/~beauxir5/peercast
16 PKG_MD5SUM:=4e8449cde7135ad97f788e67e1bd64ee
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/peercast
23   SECTION:=multimedia
24   CATEGORY:=Multimedia
25   DEPENDS:=+libpthread +uclibcxx
26   TITLE:=P2P audio and video streaming server
27   URL:=http://www.peercast.org/
28 endef
29
30 define Package/peercast/conffiles
31 /etc/peercast.ini
32 endef
33
34 define Package/peercast/description
35  PeerCast is a fresh new P2P streaming server. It can stream music and 
36  video from a broad variety of formats. Many audio players can listen to 
37  peercast streams, as it's been built to remain compatible with Nullsoft 
38  Shoutcast.
39 endef
40
41 CONFIGURE_ARGS += \
42         --enable-staticbin \
43
44 CONFIGURE_VARS += \
45         CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
46         CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
47         LIBS="-nodefaultlibs -luClibc++ -lpthread" \
48
49 define Package/peercast/install
50         $(INSTALL_DIR) $(1)/usr/sbin
51         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/peercast $(1)/usr/sbin/
52         $(INSTALL_DIR) $(1)/usr/share/peercast/html
53         $(CP) $(PKG_INSTALL_DIR)/usr/share/peercast/html/en $(1)/usr/share/peercast/html/
54         $(INSTALL_DIR) $(1)/etc
55         $(INSTALL_DATA) ./files/peercast.ini $(1)/etc/
56         $(INSTALL_DIR) $(1)/etc/init.d
57         $(INSTALL_BIN) ./files/peercast.init $(1)/etc/init.d/peercast
58 endef
59
60 $(eval $(call BuildPackage,peercast))