summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjgmdev2015-11-22 02:50:15 -0400
committerjgmdev2015-11-22 02:50:15 -0400
commitcdcb6d7111bf263c76d3045178a849fef35e246b (patch)
tree6158a1586a16df0f36bad387de9eab217be7e377
downloadaur-cdcb6d7111bf263c76d3045178a849fef35e246b.tar.gz
Initial commit.
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD82
-rw-r--r--crtmpserver-conf.zipbin0 -> 7196 bytes
-rw-r--r--crtmpserver-git.install4
-rw-r--r--crtmpserver.service10
6 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..7e15aa01502
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = crtmpserver-git
+ pkgdesc = High performance rtmp streaming server
+ pkgver = b6fdcdb
+ pkgrel = 1
+ url = http://www.rtmpd.com/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = cmake
+ depends = openssl
+ provides = crtmpserver
+ conflicts = crtmpserver
+ conflicts = crtmpserver-svn
+ source = git://github.com/j0sh/crtmpserver
+ md5sums = SKIP
+
+pkgname = crtmpserver-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..decec84ea46
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+crtmpserver/
+src/
+pkg/
+*.pkg.tar.xz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d721564b37e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,82 @@
+# Maintainer: Jefferson Gonzalez <jgmdev@gmail.com>
+
+pkgname=crtmpserver-git
+_gitname=crtmpserver
+pkgdesc="High performance rtmp streaming server"
+pkgver=b6fdcdb
+pkgrel=1
+arch=('i686' 'x86_64')
+url="http://www.rtmpd.com/"
+install=crtmpserver-git.install
+license=('GPL')
+depends=('openssl')
+makedepends=('git' 'cmake')
+provides=('crtmpserver')
+conflicts=('crtmpserver' 'crtmpserver-svn')
+source=(
+ 'git://github.com/j0sh/crtmpserver'
+ 'crtmpserver-conf.zip'
+)
+#source=('git://github.com/mich181189/crtmpserver')
+md5sums=(
+ 'SKIP'
+ 'ed069404b4172e71df48d3d256f0be12'
+)
+
+pkgver() {
+ cd "${srcdir}/${_gitname}"
+ git log | head -n 1 | cut -d" " -f2 | awk '{print substr($0,0,7)}'
+}
+
+prepare() {
+ cd "${srcdir}/${_gitname}"
+ #git checkout improved
+ #patch -p1 < ../../fixes.patch
+
+ cd "${srcdir}/${_gitname}/builders/cmake"
+
+ # disable tests and errors
+ #sed -i 's/SET(GENERIC_FLAGS "-Wall -Werror")/SET(GENERIC_FLAGS "-Wall")/g' CMakeLists.txt
+ sed -i 's/ADD_SUBDIRECTORY(tests)/#ADD_SUBDIRECTORY(tests)/g' CMakeLists.txt
+
+ # change log and applications location
+ sed -i 's/fileName="\/tmp\/crtmpserver",/fileName="\/var\/log\/crtmpserver\/main.log",/g' crtmpserver/crtmpserver.lua
+ sed -i 's/rootDirectory="applications",/rootDirectory="\/usr\/lib\/crtmpserver\/applications",/g' crtmpserver/crtmpserver.lua
+}
+
+build() {
+ cd "${srcdir}/${_gitname}/builders/cmake"
+
+ cmake -DCRTMPSERVER_INSTALL_PREFIX=/usr
+
+ make -j1
+}
+
+package(){
+ cd "$srcdir/${_gitname}"/builders/cmake
+ make DESTDIR="$pkgdir" install
+
+ # move sbin to bin directory
+ mv "$pkgdir"/usr/sbin "$pkgdir"/usr/bin
+
+ # move man page to proper directory
+ install -dm755 "$pkgdir"/usr/share
+ mv "$pkgdir"/usr/man "$pkgdir"/usr/share/
+
+ # move etc to proper directory
+ rm -rf "$pkgdir"/usr/etc
+ install -dm755 "$pkgdir"/etc/crtmpserver
+ cp -r "$srcdir/"crtmpserver-conf/* "$pkgdir"/etc/crtmpserver/
+
+ # add development files
+ install -dm644 "$pkgdir"/usr/include/crtmpserver/common
+ install -dm644 "$pkgdir"/usr/include/crtmpserver/thelib
+ cp -r "$srcdir/${_gitname}"/sources/common/include/* "$pkgdir"/usr/include/crtmpserver/common/
+ cp -r "$srcdir/${_gitname}"/sources/thelib/include/* "$pkgdir"/usr/include/crtmpserver/thelib/
+
+ # add systemd service file
+ install -Dm644 "$srcdir"/../crtmpserver.service "$pkgdir"/usr/lib/systemd/system/crtmpserver.service
+
+ # create log directory
+ install -dm644 "$pkgdir"/var/log/crtmpserver
+}
diff --git a/crtmpserver-conf.zip b/crtmpserver-conf.zip
new file mode 100644
index 00000000000..cecff0e1067
--- /dev/null
+++ b/crtmpserver-conf.zip
Binary files differ
diff --git a/crtmpserver-git.install b/crtmpserver-git.install
new file mode 100644
index 00000000000..03cd2f78778
--- /dev/null
+++ b/crtmpserver-git.install
@@ -0,0 +1,4 @@
+pre_remove() {
+ systemctl stop crtmpserver
+ systemctl disable crtmpserver
+}
diff --git a/crtmpserver.service b/crtmpserver.service
new file mode 100644
index 00000000000..72cb81d9567
--- /dev/null
+++ b/crtmpserver.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=High performance RTMP streaming server
+After=network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/crtmpserver --uid=root /etc/crtmpserver/crtmpserver.lua
+
+[Install]
+WantedBy=multi-user.target