crtmpserver: import from packages, add myself as the maintainer
[feed/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:=811
12 PKG_VERSION:=r$(PKG_REV)
13 PKG_RELEASE:=1
14 PKG_BUILD_PARALLEL:=2
15 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
16 PKG_LICENSE:=GPL-3.0
17
18
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
20 PKG_SOURCE_URL:=--username=anonymous --password= https://svn.rtmpd.com/crtmpserver/branches/1.0
21 PKG_SOURCE_SUBDIR:=crtmpserver-$(PKG_VERSION)
22 PKG_SOURCE_VERSION:=$(PKG_REV)
23 PKG_SOURCE_PROTO:=svn
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/crtmpserver
28 SECTION:=multimedia
29 CATEGORY:=Multimedia
30 DEPENDS:=+libopenssl +libstdcpp +liblua
31 TITLE:=C++ RTMP Server
32 URL:=http://www.rtmpd.com/
33 endef
34
35 define Package/crtmpserver/description
36 C++ RTMP Server it is a high performance streaming server able to
37 stream (live or recorded) in the following technologies:
38 * To and from Flash (RTMP,RTMPE, RTMPS, RTMPT, RTMPTE)
39 * To and from embedded devices: iPhone, Android
40 * From surveillance cameras
41 * IP-TV using MPEG-TS and RTSP/RTCP/RTP protocols
42
43 Also, crtmpserver can be used as a high performance rendes-vous
44 server. For example, it enables you to do:
45 * Audio/Video conferencing
46 * Online gaming
47 * Online collaboration
48 * Simple/complex chat applications
49 endef
50
51 define Package/crtmpserver/conffiles
52 /etc/crtmpserver.lua
53 endef
54
55 # XXX: this hack handles the usr/bin vs bin difference of backfire and trunk
56 TS_BASE:=$(wildcard $(TOOLCHAIN_DIR)/bin/$(TARGET_CC))
57 TS_BASE:=$(dir $(if $(TS_BASE),$(TS_BASE),$(wildcard $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CC))))
58
59 define Build/Configure
60 (cd $(PKG_BUILD_DIR)/builders/make; \
61 cp linux.mk linux-openwrt-uclibc.mk; \
62 $(SED) 's,^TOOLCHAIN_BASE[[:space:]]*=.*,TOOLCHAIN_BASE=$(TS_BASE),' \
63 -e 's,^TOOLCHAIN_PREFIX[[:space:]]*=.*,TOOLCHAIN_PREFIX=$(TARGET_CROSS),' \
64 -e 's,^CCOMPILER[[:space:]]*=.*,CCOMPILER=$(TARGET_CC),' \
65 -e 's,^CXXCOMPILER[[:space:]]*=.*,CXXCOMPILER=$(TARGET_CXX),' \
66 -e 's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \
67 -e 's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \
68 linux-openwrt-uclibc.mk)
69 endef
70
71 define Build/Compile
72 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/builders/make \
73 PLATFORM=linux-openwrt-uclibc -Wno-error -j6
74 endef
75
76 define Package/crtmpserver/install
77 $(INSTALL_DIR) $(1)/usr/bin
78 $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver $(1)/usr/bin/
79 $(INSTALL_DIR) $(1)/usr/lib/crtmpserver
80 $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/
81 $(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \
82 $(INSTALL_DIR) $(1)/usr/lib/crtmpserver/$(app); \
83 $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \
84 $(1)/usr/lib/crtmpserver/$(app)/; \
85 )
86 $(INSTALL_DIR) $(1)/etc
87 $(INSTALL_CONF) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver.lua $(1)/etc/
88 $(INSTALL_DIR) $(1)/usr/share/crtmpserver/appselector
89 $(INSTALL_DIR) $(1)/usr/share/crtmpserver/media
90 $(INSTALL_DIR) $(1)/etc/init.d
91 $(INSTALL_BIN) ./files/crtmpserver.init $(1)/etc/init.d/crtmpserver
92 endef
93
94 $(eval $(call BuildPackage,crtmpserver))
95