[SCM] crtmpserver/master: Imported Debian patch 0.0+svn395-1

jet-guest at users.alioth.debian.org jet-guest at users.alioth.debian.org
Thu Mar 17 16:51:02 UTC 2011


The following commit has been merged in the master branch:
commit d1333f9be42c7378f128778640d110ecfd3e080b
Author: Andriy Beregovenko <jet at jet.kiev.ua>
Date:   Thu Mar 17 17:59:57 2011 +0200

    Imported Debian patch 0.0+svn395-1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a6b45ec
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+crtmpserver (0.0+svn395-1) unstable; urgency=low
+
+  * Initial release (Closes: #617641)
+
+ -- Andriy Beregovenko <jet at jet.kiev.ua>  Thu, 17 Mar 2011 17:59:57 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..e0c2959
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,26 @@
+Source: crtmpserver
+Section: utils
+Priority: optional
+Maintainer: Andriy Beregovenko <jet at jet.kiev.ua>
+Build-Depends: quilt, debhelper (>= 7.0.50~), cmake, libssl-dev, liblua5.1-0-dev
+Standards-Version: 3.9.1
+Homepage: http://www.rtmpd.com
+
+Package: crtmpserver
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, openssl, liblua5.1-0
+Pre-Depends: adduser
+Description: High performance RTMP/RTSP streaming server
+ crtmpserver is a high performance streaming server able to stream
+ (live or recorded) in the following technologies:
+  - To and from Flash (RTMP,RTMPE, RTMPS, RTMPT, RTMPTE)
+  - To and from embedded devices: iPhone, Android
+  - From surveillance cameras
+  - IP-TV using MPEG-TS and RTSP/RTCP/RTP protocols
+ .
+ Also, crtmpserver can be used as a high performance rendes-vous server.
+ For example, it enables you to do:
+  - Audio/Video conferencing
+  - Online gaming
+  - Online collaboration
+  - Simple/complex chat applications
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..9a3d5ce
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,94 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: crtmpserver
+Source: http://www.rtmpd.com
+
+Files: *
+Copyright: 2010-2011 Gavriloaie Eugen-Andrei (shiretu at gmail.com) 
+License: GPL-3.0+ with OpenSSL exception
+
+Files: debian/*
+Copyright: 2011 Andriy Beregovenko <jet at jet.kiev.ua>
+License: GPL-3.0+
+
+Files: common/src/utils/tinyxml/* common/include/utils/tinyxml/*
+Copyright: 2000-2006 Lee Thomason
+License: zlib
+
+Files: common/src/platform/solaris/timegm.cpp common/src/platform/windows/strncasecmp.cpp common/src/platform/windows/timegm.cpp common/src/platform/windows/strptime.cpp common/src/platform/android/timegm.cpp
+Copyright: Kungliga Tekniska Högskolan
+License: BSD
+
+
+License: GPL-3.0+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+
+License: GPL-3.0+ with OpenSSL exception
+ In addition, as a special exception, Gavriloaie Eugen-Andrei gives permission
+ to link the code of  its release of  CRTMPSERVER  with the  OpenSSL project's
+ "OpenSSL" library (or with  modified versions of it that use the same license
+ as the "OpenSSL" library), and distribute linked  executables. You must  obey
+ the GNU General Public License in all respects for all of the code used other
+ than "OpenSSL".If you modify file(s) with this exception, you may extend this
+ exception to your version of the file(s), but you are not obligated to do so.
+ If you do not wish to do so,delete this exception statement from your version.
+ If you delete this exception  statement from all source files in the program,
+ then also delete it here.
+
+License: BSD
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+    derived from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: zlib
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any
+ damages arising from the use of this software.
+ .
+ Permission is granted to anyone to use this software for any
+ purpose, including commercial applications, and to alter it and
+ redistribute it freely, subject to the following restrictions:
+ .
+ 1. The origin of this software must not be misrepresented; you must
+ not claim that you wrote the original software. If you use this
+ software in a product, an acknowledgment in the product documentation
+ would be appreciated but is not required.
+ .
+ 2. Altered source versions must be plainly marked as such, and
+ must not be misrepresented as being the original software.
+ .
+ 3. This notice may not be removed or altered from any source
+ distribution.
+
+
diff --git a/debian/crtmpserver.1 b/debian/crtmpserver.1
new file mode 100644
index 0000000..22b9368
--- /dev/null
+++ b/debian/crtmpserver.1
@@ -0,0 +1,79 @@
+.TH CRTMPSERVER 1 "February 11, 2011" Linux
+.SH NAME
+crtmpserver \- is a high performance streaming platform written on C++
+.SH SYNOPSIS
+.B crtmpserver
+.RI [ options ]
+.RI <configuration>
+.br
+.SH DESCRIPTION
+.PP
+\fBcrtmpserver\fP it is a high performance streaming server able to stream (live or recorded) in the following technologies:
+.RS
+- To and from Flash (RTMP, RTMPE, RTMPS, RTMPT, RTMPTE)
+.br
+- To and from embedded devices: iPhone, Android
+.br
+- From surveillance cameras
+.br
+- IP-TV using MPEG-TS and RTSP/RTCP/RTP protocols
+.RE
+.PP
+Also, \fBcrtmpserver\fP can be used as a high performance rendes-vous server.
+.br
+For example, it enables you to do:
+.RS
+.br
+- Audio/Video conferencing
+.br
+- Online gaming
+.br
+- Online collaboration
+.br
+- Simple/complex chat applications
+.RE
+.SH OPTIONS
+.TP
+.B \-\-help
+Show summary of options.
+.TP
+.B \-\-version
+Show version of program.
+.TP
+.B \-\-use-implicit-console-appender
+Adds a console log appender.
+.br
+Particulary useful when the server starts and stops immediatly.
+.br
+Allows you to see if something is wrong with the config file.
+.TP
+.B \-\-daemon
+Overrides the daemon setting inside the config file
+and forces the server to start in daemon mode.
+.TP
+.B \-\-uid=<uid>
+Run the process with the specified user id.
+.TP
+.B \-\-gid=<gid>
+Run the process with the specified group id.
+.SH FILES
+.TP
+.B /usr/sbin/crtmpserver
+Main daemon execution file
+.TP
+.B /etc/crtmpserver/crtmpserver.lua
+Main daemon configuration file
+.TP
+.B /var/log/crtmpserver/crtmpserver.log
+Default log file. May be changed in configuration.
+.SH SEE ALSO
+The crtmpserver homepage: \fBhttp://www.rtmpd.com/\fP
+.br
+Full documentation on \fBcrtmpserver\fP, including guides and FAQs, is available at \fBhttp://wiki.rtmpd.com/\fP
+.PP
+Report bugs at \fBhttp://trac.rtmpd.com/report\fP
+.SH AUTHOR
+crtmpserver was written by Gavriloaie Eugen-Andrei <crtmpserver at gmail.com>.
+.PP
+This manual page was written by Andriy Beregovenko <jet at jet.kiev.ua>,
+for the Debian project (and may be used by others).
diff --git a/debian/crtmpserver.default b/debian/crtmpserver.default
new file mode 100644
index 0000000..33e30f9
--- /dev/null
+++ b/debian/crtmpserver.default
@@ -0,0 +1,8 @@
+# Defaults for rtmpd initscript
+# sourced by /etc/init.d/rtmpd
+
+# Additional options that are passed to the Daemon.
+ENABLED=yes
+DAEMON_CONF=" /etc/crtmpserver/crtmpserver.lua "
+DAEMON_OPTS=" --daemon "
+DAEMON_USER=crtmpserver
diff --git a/debian/crtmpserver.init b/debian/crtmpserver.init
new file mode 100644
index 0000000..04904f1
--- /dev/null
+++ b/debian/crtmpserver.init
@@ -0,0 +1,113 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          crtmpserver
+# Required-Start:    $network $local_fs $remote_fs
+# Required-Stop:     $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: C++ RTMP/RTSP streaming server
+# Description:       High performance RTMP/RTSP/MPEG-TS streaming server
+### END INIT INFO
+
+# Author: Andriy Beregovenko <jet at jet.kiev.ua>
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="C++ RTMP Server"
+NAME=crtmpserver
+DAEMON=/usr/sbin/crtmpserver
+DAEMON_ARGS=" --daemon "
+DAEMON_CONF="/etc/crtmpserver/crtmpserver.lua"
+DAEMON_USER=crtmpserver
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+ENABLED=no
+
+[ -x $DAEMON ] || exit 0
+
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+. /lib/init/vars.sh
+. /lib/lsb/init-functions
+
+UID=$(getent passwd ${DAEMON_USER} | cut -d":" -f3)
+UID_ARG=" --uid=$UID "
+
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS $UID_ARG $DAEMON_CONF \
+		|| return 2
+}
+
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+
+	start-stop-daemon --stop --quiet --oknodo --retry=INT/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+case "$1" in
+  start)
+    log_daemon_msg "Starting $DESC " "$NAME"
+    do_start
+    case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+  ;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+	;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  restart)
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  force-reload)
+	restart
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2
+	exit 3
+	;;
+esac
+
+:
diff --git a/debian/crtmpserver.install b/debian/crtmpserver.install
new file mode 100644
index 0000000..e5fa050
--- /dev/null
+++ b/debian/crtmpserver.install
@@ -0,0 +1 @@
+crtmpserver/crtmpserver.lua etc/crtmpserver
diff --git a/debian/crtmpserver.logrotate b/debian/crtmpserver.logrotate
new file mode 100644
index 0000000..819fdda
--- /dev/null
+++ b/debian/crtmpserver.logrotate
@@ -0,0 +1,13 @@
+/var/log/crtmpserver/*.log {
+	daily
+	missingok
+	rotate 52
+	compress
+	delaycompress
+	notifempty
+	create 640 crtmpserver adm
+	sharedscripts
+	postrotate
+		[ ! -f /var/run/crtmpserver.pid ] || kill -USR1 `cat /var/run/crtmpserver.pid`
+	endscript
+}
diff --git a/debian/crtmpserver.manpages b/debian/crtmpserver.manpages
new file mode 100644
index 0000000..3a3df7c
--- /dev/null
+++ b/debian/crtmpserver.manpages
@@ -0,0 +1 @@
+debian/crtmpserver.1
diff --git a/debian/crtmpserver.postinst b/debian/crtmpserver.postinst
new file mode 100644
index 0000000..d2c14d6
--- /dev/null
+++ b/debian/crtmpserver.postinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+USER="crtmpserver"
+GROUP="adm"
+
+chown $USER:$GROUP /var/lib/crtmpserver
+chown $USER:$GROUP /var/log/crtmpserver
+
+#DEBHELPER#
+
diff --git a/debian/crtmpserver.postrm b/debian/crtmpserver.postrm
new file mode 100644
index 0000000..1fd1166
--- /dev/null
+++ b/debian/crtmpserver.postrm
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
\ No newline at end of file
diff --git a/debian/crtmpserver.preinst b/debian/crtmpserver.preinst
new file mode 100644
index 0000000..9db3c4f
--- /dev/null
+++ b/debian/crtmpserver.preinst
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+USER="crtmpserver"
+GROUP="adm"
+HOME="/var/lib/crtmpserver"
+
+if ! getent group $GROUP >/dev/null
+then
+    addgroup --system $GROUP >/dev/null
+fi
+
+if ! getent passwd $USER >/dev/null
+then
+    adduser \
+    --system \
+    --disabled-login \
+    --ingroup $GROUP \
+    --home $HOME \
+    --gecos "$USER" \
+    --shell /bin/false \
+    $USER  >/dev/null
+fi
+
+#DEBHELPER#
diff --git a/debian/crtmpserver.prerm b/debian/crtmpserver.prerm
new file mode 100644
index 0000000..1f6866c
--- /dev/null
+++ b/debian/crtmpserver.prerm
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..6854a47
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,3 @@
+usr/sbin
+etc/crtmpserver
+var/log/crtmpserver
\ No newline at end of file
diff --git a/debian/patches/10_disable_vm_tests_vmtests.diff b/debian/patches/10_disable_vm_tests_vmtests.diff
new file mode 100644
index 0000000..740ce30
--- /dev/null
+++ b/debian/patches/10_disable_vm_tests_vmtests.diff
@@ -0,0 +1,15 @@
+Description: disable vm, tests and vmtests.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -160,7 +160,7 @@
+ #ADD_SUBDIRECTORY(androidapplestreaming androidapplestreaming)
+ 
+ ADD_DEFINITIONS(-DVM_LUA)
+-ADD_SUBDIRECTORY(vm vm)
+-ADD_SUBDIRECTORY(vmtests vmtests)
+-ADD_SUBDIRECTORY(tests)
++#ADD_SUBDIRECTORY(vm vm)
++#ADD_SUBDIRECTORY(vmtests vmtests)
++#ADD_SUBDIRECTORY(tests)
+ 
diff --git a/debian/patches/11_change_log_location.diff b/debian/patches/11_change_log_location.diff
new file mode 100644
index 0000000..afaadaf
--- /dev/null
+++ b/debian/patches/11_change_log_location.diff
@@ -0,0 +1,22 @@
+Description: change log file default location.
+
+--- a/crtmpserver/crtmpserver.lua
++++ b/crtmpserver/crtmpserver.lua
+@@ -49,7 +49,7 @@
+ 			type="file",
+ 			level=6,
+ 			-- the file where the log messages are going to land
+-			fileName="/tmp/crtmpserver.log"
++			fileName="/var/log/crtmpserver/crtmpserver.log"
+ 		}
+ 	},
+ 	
+@@ -58,7 +58,7 @@
+ 	{
+ 		-- this is the root directory of all applications
+ 		-- usually this is relative to the binary execuable
+-		rootDirectory="applications",
++		rootDirectory="/usr/lib/crtmpserver/applications",
+ 		
+ 		
+ 		--this is where the applications array starts
diff --git a/debian/patches/13_disable_lua_config_install.diff b/debian/patches/13_disable_lua_config_install.diff
new file mode 100644
index 0000000..fcea20d
--- /dev/null
+++ b/debian/patches/13_disable_lua_config_install.diff
@@ -0,0 +1,11 @@
+Description: disable default install for lua config
+
+--- a/crtmpserver/CMakeLists.txt
++++ b/crtmpserver/CMakeLists.txt
+@@ -17,5 +17,5 @@
+ TARGET_LINK_LIBRARIES(crtmpserver thelib ${OPENSSL_LIBRARY_PATH} ${CRYPTO_LIBRARY_PATH})
+ ADD_PRECOMPILED_HEADER(${PROJECT_NAME} "${CRTMPSERVER_SOURCES_ROOT}/common/include/common.h")
+ INSTALL(TARGETS crtmpserver RUNTIME DESTINATION sbin)
+-INSTALL(FILES crtmpserver.lua DESTINATION etc)
++#INSTALL(FILES crtmpserver.lua DESTINATION etc)
+ 
diff --git a/debian/patches/15_use_system_lua.diff b/debian/patches/15_use_system_lua.diff
new file mode 100644
index 0000000..91e30d6
--- /dev/null
+++ b/debian/patches/15_use_system_lua.diff
@@ -0,0 +1,21 @@
+Description: use system lua(lua 5.1)
+
+--- a/cmake_find_modules/Find_lua.cmake
++++ b/cmake_find_modules/Find_lua.cmake
+@@ -3,6 +3,7 @@
+ 	NAMES
+ 		lualib.h
+ 	PATHS
++		/usr/include/lua5.1
+ 		/usr/include
+ 		/usr/local/include
+ 		/usr/local/include/lua51
+@@ -12,7 +13,7 @@
+ 
+ FIND_LIBRARY(LUA_LIBRARY_PATH_
+ 	NAMES
+-		lua
++		lua5.1
+ 	PATHS
+ 		/usr/lib64
+ 		/usr/lib
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4f88da6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+10_disable_vm_tests_vmtests.diff
+11_change_log_location.diff
+13_disable_lua_config_install.diff
+15_use_system_lua.diff
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..81f7c22
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,18 @@
+#!/usr/bin/make -f
+
+#export DH_VERBOSE=1
+
+DEB_BUILDDIR = obj-$(DEB_BUILD_GNU_TYPE)
+
+%:
+	dh $@ 
+
+override_dh_auto_configure:
+	mkdir -p $(DEB_BUILDDIR)
+	cd $(DEB_BUILDDIR) && cmake ..	-DCRTMPSERVER_INSTALL_PREFIX=/usr \
+					-DCMAKE_VERBOSE_MAKEFILE=OFF \
+					-DTEMP_FRAMEWORK_VER=${SVER} \
+					-DCRTMPSERVER_SOURCES_ROOT=${DEBPATH} \
+					-DCRTMPSERVER_3RDPARTY_ROOT=${DEBPATH}
+
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)

-- 
crtmpserver packaging



More information about the pkg-multimedia-commits mailing list