diff options
Diffstat (limited to 'testing/crtmpserver')
-rw-r--r-- | testing/crtmpserver/APKBUILD | 64 | ||||
-rw-r--r-- | testing/crtmpserver/crtmpserver.confd | 2 | ||||
-rw-r--r-- | testing/crtmpserver/crtmpserver.initd | 26 | ||||
-rw-r--r-- | testing/crtmpserver/crtmpserver.pre-install | 3 |
4 files changed, 95 insertions, 0 deletions
diff --git a/testing/crtmpserver/APKBUILD b/testing/crtmpserver/APKBUILD new file mode 100644 index 0000000000..15b366aa9a --- /dev/null +++ b/testing/crtmpserver/APKBUILD @@ -0,0 +1,64 @@ +# Contributor: Francesco Colista <francesco.colista@gmail.com> +# Maintainer: +pkgname=crtmpserver +pkgver=20121120 +pkgrel=0 +pkgdesc="high performance streaming server" +url="http://www.rtmpd.com/" +arch="all" +license="GPL" +depends="" +depends_dev="openssl-dev lua-dev cmake" +makedepends="$depends_dev" +install="$pkgname.pre-install" +subpackages="" +pkgusers="rtmpd" +source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz + $pkgname.initd + $pkgname.confd" + +_giturl="git://github.com/j0sh/crtmpserver.git" +_upload=dev.alpinelinux.org:/archive/$pkgname/ +_builddir="$srcdir"/$pkgname-$pkgver + +snapshot() { + local _date=$(date +%Y%m%d) + local _pkg=$pkgname-$_date.tar.gz + mkdir -p "$srcdir" + cd "$srcdir" + rm -rf "$pkgname" + git clone --depth=1 --bare $_giturl || return 1 + git --git-dir ${_giturl##*/} archive -o $_pkg \ + --prefix=$pkgname-$_date/ HEAD \ + || return 1 + msg "New snapshot: $_pkg" + if [ -n "$_upload" ]; then + msg "Uploading to $_upload" + scp $_pkg $_upload && abump $pkgname-$_date || return 1 + fi +} + +build() { + cd "$_builddir" + cd builders/cmake + cmake -DCRTMPSERVER_INSTALL_PREFIX=/usr + cd $pkgname + sed -i -e "46s/\${CMAKE_INSTALL_PREFIX}\/etc/\/etc/g" cmake_install.cmake + make +} + +package() { + cd "$_builddir" + cd builders/cmake + make DESTDIR="$pkgdir" install + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m755 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + mkdir -p "$pkgdir"/var/log/crtmpserver + chown rtmpd "$pkgdir"/var/log/crtmpserver + mkdir -p "$pkgdir"/var/crtmpserver + chown rtmpd "$pkgdir"/var/crtmpserver -R +} + +md5sums="266f7cf124eba03aa62b506af2e2a4fa crtmpserver-20121120.tar.gz +b8e5437128e18ea3d7ca4b892f1664d1 crtmpserver.initd +599eae04d8a7e49162dc9b89df66faa9 crtmpserver.confd" diff --git a/testing/crtmpserver/crtmpserver.confd b/testing/crtmpserver/crtmpserver.confd new file mode 100644 index 0000000000..d8e0c25e72 --- /dev/null +++ b/testing/crtmpserver/crtmpserver.confd @@ -0,0 +1,2 @@ +RTMPD_USER="rtmpd" +CONFFILE="/etc/crtmpserver.lua" diff --git a/testing/crtmpserver/crtmpserver.initd b/testing/crtmpserver/crtmpserver.initd new file mode 100644 index 0000000000..aa967b3d99 --- /dev/null +++ b/testing/crtmpserver/crtmpserver.initd @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright (c) 2011 http://foxpa.ws +# All rights released + +description="Runs C++ RTMP Server on Gentoo" + +depend() +{ + need net +} + +start() +{ + ebegin "Starting C++ RTMP Server" + start-stop-daemon --start --quit \ + --exec /usr/sbin/crtmpserver --daemon --uid=${RTMPD_USER} --pid=/var/run/crtmpserver.pid ${CONFFILE} + eend ${?} +} + +stop() +{ + ebegin "Stopping C++ RTMP Server" + start-stop-daemon --stop --quiet \ + --exec /usr/sbin/crtmpserver --pid=/var/run/crtmpserver.pid + eend ${?} +} diff --git a/testing/crtmpserver/crtmpserver.pre-install b/testing/crtmpserver/crtmpserver.pre-install new file mode 100644 index 0000000000..025170a2f2 --- /dev/null +++ b/testing/crtmpserver/crtmpserver.pre-install @@ -0,0 +1,3 @@ +#!/bin/sh +adduser -S -h /var/crtmpserver -s /bin/false rtmpd 2>/dev/null +exit 0 |