rename glib package from liblib1 to glib1 and fix dependencies on it
[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, BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \
46 $(TARGET_CONFIGURE_OPTS) \
47 CFLAGS="$(TARGET_CFLAGS)" \
48 CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -nostdinc++ -nodefaultlibs" \
49 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
50 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
51 LIBS="-nodefaultlibs -luClibc++ -lpthread")
52 endef
53
54 define Build/Compile
55 rm -rf $(PKG_INSTALL_DIR)
56 mkdir -p $(PKG_INSTALL_DIR)
57 $(MAKE) -C $(PKG_BUILD_DIR) \
58 DESTDIR="$(PKG_INSTALL_DIR)" \
59 all install
60 endef
61
62 define Package/peercast/install
63 install -m0755 -d $(1)/usr/sbin
64 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/peercast $(1)/usr/sbin/
65 install -m0755 -d $(1)/usr/share/peercast/html
66 $(CP) $(PKG_INSTALL_DIR)/usr/share/peercast/html/en $(1)/usr/share/peercast/html/
67 install -m0755 -d $(1)/etc
68 install -m0644 ./files/peercast.ini $(1)/etc/
69 install -m0755 -d $(1)/etc/init.d
70 install -m0755 ./files/peercast.init $(1)/etc/init.d/peercast
71 ln -sf peercast $(1)/etc/init.d/S60peercast
72 endef
73
74 $(eval $(call BuildPackage,peercast))