aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 12:02:49 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 12:02:49 +0000
commit15ed6dce477d5abfdb7af27900242682adcecabc (patch)
tree51da61511fa59f29f82cafce5b5ed1951a9f6056 /unmaintained
parent5fc9b66c14b8e02ceab609c76b00d3213f363e66 (diff)
downloadaports-15ed6dce477d5abfdb7af27900242682adcecabc.tar.bz2
aports-15ed6dce477d5abfdb7af27900242682adcecabc.tar.xz
unmaintained/crtmpserver: moved from testing
Diffstat (limited to 'unmaintained')
-rw-r--r--unmaintained/crtmpserver/APKBUILD73
-rw-r--r--unmaintained/crtmpserver/crtmpserver.confd2
-rw-r--r--unmaintained/crtmpserver/crtmpserver.initd38
-rw-r--r--unmaintained/crtmpserver/crtmpserver.pre-install5
4 files changed, 118 insertions, 0 deletions
diff --git a/unmaintained/crtmpserver/APKBUILD b/unmaintained/crtmpserver/APKBUILD
new file mode 100644
index 0000000000..a09646c770
--- /dev/null
+++ b/unmaintained/crtmpserver/APKBUILD
@@ -0,0 +1,73 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=crtmpserver
+pkgver=0_git20131228
+pkgrel=2
+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.bz2
+ $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-0_git$_date.tar.bz2
+ mkdir -p "$srcdir"
+ cd "$srcdir"
+ rm -rf "$pkgname"
+ git clone --depth=1 --bare $_giturl || return 1
+ git --git-dir ${_giturl##*/} archive --format=tar \
+ --prefix=$pkgname-0_git$_date/ HEAD | bzip2 > $_pkg \
+ || return 1
+
+msg "New snapshot: $_pkg"
+ if [ -n "$_upload" ]; then
+ msg "Uploading to $_upload"
+ scp $_pkg $_upload && abump $pkgname-0_git$_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\/crtmpserver\//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
+ cp ../../configs/*.lua "$pkgdir"/etc/$pkgname/
+}
+
+md5sums="63ace36dcbb336463702eb258bfa974d crtmpserver-0_git20131228.tar.bz2
+8c4072f255f72736028cc736081303b8 crtmpserver.initd
+f628656f6fd50204492ed838a7993c38 crtmpserver.confd"
+sha256sums="ca57a270400c492bf9378fabe5e76fa91fe48dcab70d0518271be873558498a1 crtmpserver-0_git20131228.tar.bz2
+db010ea792cd738db98297bc7d24cb86bb5bc360a355a54622fd057197a3aa04 crtmpserver.initd
+5ff47df741664ad9fdcf567e645e569ac9f47a61a46baf15bf920508a35c7811 crtmpserver.confd"
+sha512sums="c6e501bc048989c93bae4b0f8cdfa98ea6ff46574c9a006f42e92096be5fc311ae0252b718dab43c416c41b602e35409e47a5143709789cb9121dc3419bfeba5 crtmpserver-0_git20131228.tar.bz2
+85e2fa5816c9c6afba4f54c7aa780f0e9cfa9a317936de31ad1456d02ed79eb9e3d61a5fc21c3f2891b90f89d9885f3349e4eb6e281ca1c382769e2bb3c6bcbc crtmpserver.initd
+0695f48e644b4cea9c4e8724dfd0f28f859aacf8af2ccb3bf4a2a077202eeef7a8b2a10000eb8c1101dd5dea309d4a9df3479d2084650f9d283468cee7f4fc1a crtmpserver.confd"
diff --git a/unmaintained/crtmpserver/crtmpserver.confd b/unmaintained/crtmpserver/crtmpserver.confd
new file mode 100644
index 0000000000..18a285766e
--- /dev/null
+++ b/unmaintained/crtmpserver/crtmpserver.confd
@@ -0,0 +1,2 @@
+RTMPD_USER="rtmpd"
+CONFFILE="/etc/crtmpserver/crtmpserver.lua"
diff --git a/unmaintained/crtmpserver/crtmpserver.initd b/unmaintained/crtmpserver/crtmpserver.initd
new file mode 100644
index 0000000000..656eb4029d
--- /dev/null
+++ b/unmaintained/crtmpserver/crtmpserver.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright (c) 2011 http://foxpa.ws
+# All rights released
+
+description="Runs C++ RTMP Server on Gentoo"
+
+depend()
+{
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/crtmpserver/crtmpserver.lua ] ; then
+ eerror "You need to create /etc/crtmpserver/crtmpserver.lua first."
+ eerror "An example can be found in /etc/crtmpserver/crtmpserver.lua.sample"
+ return 1
+ fi
+}
+
+
+
+start()
+{
+ checkconfig || return 1
+ ebegin "Starting C++ RTMP Server"
+ start-stop-daemon --start --quiet --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/unmaintained/crtmpserver/crtmpserver.pre-install b/unmaintained/crtmpserver/crtmpserver.pre-install
new file mode 100644
index 0000000000..e8dc1c722b
--- /dev/null
+++ b/unmaintained/crtmpserver/crtmpserver.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+adduser -S -h /var/crtmpserver -s /bin/false -g rtmpd rtmpd 2>/dev/null
+
+exit 0