blob: cba4512b0cac54467d84b24673ed59e0f9e89f38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=crtmpserver
pkgver=0_git20121213
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.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/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="ef55f9048d7dee7c259d12b837004731 crtmpserver-0_git20121213.tar.bz2
b8e5437128e18ea3d7ca4b892f1664d1 crtmpserver.initd
599eae04d8a7e49162dc9b89df66faa9 crtmpserver.confd"
|