aboutsummaryrefslogtreecommitdiffstats
path: root/testing/crtmpserver/APKBUILD
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2012-12-03 09:10:01 +0000
committerFrancesco Colista <francesco.colista@gmail.com>2012-12-13 08:46:26 +0000
commit34cba518184ea553d3184da7de8b502854f5d583 (patch)
tree158b12338627adecd585c7f82557ca3f1e3616d2 /testing/crtmpserver/APKBUILD
parent1f76fbff04e512d04537262b41cfb2cc98b3518a (diff)
downloadaports-34cba518184ea553d3184da7de8b502854f5d583.tar.bz2
aports-34cba518184ea553d3184da7de8b502854f5d583.tar.xz
testing/crtmpserver: new aport
Diffstat (limited to 'testing/crtmpserver/APKBUILD')
-rw-r--r--testing/crtmpserver/APKBUILD64
1 files changed, 64 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"