fix conflicting libnet versions mess
[openwrt/svn-archive/archive.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 PKG_MD5SUM:=4e8449cde7135ad97f788e67e1bd64ee
15
16 PKG_SOURCE_URL:=http://www.cti.ecp.fr/~beauxir5/peercast
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
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:=PeerCast is a fresh new P2P streaming server. It can stream music\\\
31 and video from a broad variety of formats. Many audio players can\\\
32 listen to peercast streams, as it's been built to remain compatible\\\
33 with Nullsoft Shoutcast.\\\
34 URL:=http://www.peercast.org/
35 endef
36
37 define Package/peercast/conffiles
38 /etc/peercast.ini
39 endef
40
41 define Build/Configure
42 $(call Build/Configure/Default,--enable-shared \
43 --disable-static \
44 --with-gnu-ld \
45 --enable-staticbin, \
46 $(TARGET_CONFIGURE_OPTS) \
47 BUILD_CC="$(TARGET_CC)" HOSTCC="$(HOSTCC)" \
48 CFLAGS="$(TARGET_CFLAGS)" \
49 CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -nostdinc++ -nodefaultlibs" \
50 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
51 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
52 LIBS="-nodefaultlibs -luClibc++ -lpthread")
53 endef
54
55 define Build/Compile
56 $(call Build/Compile/Default,DESTDIR="$(PKG_INSTALL_DIR)" all install)
57 endef
58
59 define Package/peercast/install
60 install -m0755 -d $(1)/usr/sbin
61 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/peercast $(1)/usr/sbin/
62 install -m0755 -d $(1)/usr/share/peercast/html
63 $(CP) $(PKG_INSTALL_DIR)/usr/share/peercast/html/en $(1)/usr/share/peercast/html/
64 install -m0755 -d $(1)/etc
65 install -m0644 ./files/peercast.ini $(1)/etc/
66 install -m0755 -d $(1)/etc/init.d
67 install -m0755 ./files/peercast.init $(1)/etc/init.d/peercast
68 ln -sf peercast $(1)/etc/init.d/S60peercast
69 endef
70
71 $(eval $(call BuildPackage,peercast))