f3efb0e0d2b01a71dd514a2c5d69688c0919ed40
[packages.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:=726
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 +liblua
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 # XXX: this hack handles the usr/bin vs bin difference of backfire and trunk
48 TS_BASE:=$(wildcard $(TOOLCHAIN_DIR)/bin/$(TARGET_CC))
49 TS_BASE:=$(dir $(if $(TS_BASE),$(TS_BASE),$(wildcard $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CC))))
50
51 define Build/Configure
52         (cd $(PKG_BUILD_DIR)/builders/make; \
53                 cp linux.mk linux-openwrt-uclibc.mk; \
54                 $(SED) 's,^TOOLCHAIN_BASE[[:space:]]*=.*,TOOLCHAIN_BASE=$(TS_BASE),' \
55                         -e 's,^TOOLCHAIN_PREFIX[[:space:]]*=.*,TOOLCHAIN_PREFIX=$(TARGET_CROSS),' \
56                         -e 's,^CCOMPILER[[:space:]]*=.*,CCOMPILER=$(TARGET_CC),' \
57                         -e 's,^CXXCOMPILER[[:space:]]*=.*,CXXCOMPILER=$(TARGET_CXX),' \
58                         -e 's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \
59                         -e 's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \
60                         linux-openwrt-uclibc.mk)
61 endef
62
63 define Build/Compile
64         $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/builders/make \
65                 PLATFORM=linux-openwrt-uclibc
66 endef
67
68 define Package/crtmpserver/install
69         $(INSTALL_DIR) $(1)/usr/bin
70         $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver $(1)/usr/bin/
71         $(INSTALL_DIR) $(1)/usr/lib/crtmpserver
72         $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/
73         $(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \
74                 $(INSTALL_DIR) $(1)/usr/lib/crtmpserver/$(app); \
75                 $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \
76                         $(1)/usr/lib/crtmpserver/$(app)/; \
77         )
78         $(INSTALL_DIR) $(1)/etc
79         $(INSTALL_DATA) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver.lua $(1)/etc/
80         $(INSTALL_DIR) $(1)/usr/share/crtmpserver/appselector
81         $(INSTALL_DIR) $(1)/usr/share/crtmpserver/media
82 endef
83
84 $(eval $(call BuildPackage,crtmpserver))
85