[packages] add crtmpserver - a high performance C++ RTMP streaming server
[openwrt/svn-archive/archive.git] / multimedia / crtmpserver / Makefile
1 #
2 # Copyright (C) 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:=crtmpserver
11 PKG_REV:=346
12 PKG_VERSION:=r$(PKG_REV)
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=--username=anonymous --password= https://svn.rtmpd.com/crtmpserver/trunk
17 PKG_SOURCE_SUBDIR:=crtmpserver-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_PROTO:=svn
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/crtmpserver
24 SECTION:=multimedia
25 CATEGORY:=Multimedia
26 DEPENDS:=+libopenssl +libstdcpp
27 TITLE:=C++ RTMP Server
28 URL:=http://www.rtmpd.com/
29 endef
30
31 define Package/crtmpserver/description
32 C++ RTMP Server it is a high performance streaming server able to
33 stream (live or recorded) in the following technologies:
34 * To and from Flash (RTMP,RTMPE, RTMPS, RTMPT, RTMPTE)
35 * To and from embedded devices: iPhone, Android
36 * From surveillance cameras
37 * IP-TV using MPEG-TS and RTSP/RTCP/RTP protocols
38
39 Also, crtmpserver can be used as a high performance rendes-vous
40 server. For example, it enables you to do:
41 * Audio/Video conferencing
42 * Online gaming
43 * Online collaboration
44 * Simple/complex chat applications
45 endef
46
47 define Build/Configure
48 (cd $(PKG_BUILD_DIR)/builders/make; \
49 cp linux.mk linux-openwrt-uclibc.mk; \
50 $(SED) 's,^TOOLCHAIN_BASE[[:space:]]*=.*,TOOLCHAIN_BASE=$(TOOLCHAIN_DIR)/bin/,' \
51 -e 's,^TOOLCHAIN_PREFIX[[:space:]]*=.*,TOOLCHAIN_PREFIX=$(TARGET_CROSS),' \
52 -e 's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \
53 -e 's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \
54 linux-openwrt-uclibc.mk)
55 endef
56
57 define Build/Compile
58 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/builders/make \
59 PLATFORM=linux-openwrt-uclibc
60 endef
61
62 define Package/crtmpserver/install
63 $(INSTALL_DIR) $(1)/usr/bin
64 $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/rtmpserver $(1)/usr/bin/
65 $(INSTALL_DIR) $(1)/usr/lib/rtmpserver
66 $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/rtmpserver/
67 $(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \
68 $(INSTALL_DIR) $(1)/usr/lib/rtmpserver/$(app); \
69 $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \
70 $(1)/usr/lib/rtmpserver/$(app)/; \
71 )
72 $(INSTALL_DIR) $(1)/etc
73 $(INSTALL_DATA) $(PKG_BUILD_DIR)/builders/make/output/dynamic/rtmpserver.lua $(1)/etc/
74 $(INSTALL_DIR) $(1)/usr/share/rtmpserver/appselector
75 $(INSTALL_DIR) $(1)/usr/share/rtmpserver/media
76 endef
77
78 $(eval $(call BuildPackage,crtmpserver))
79