summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO34
-rwxr-xr-xPKGBUILD44
-rwxr-xr-xemby-server3
-rwxr-xr-xemby-server.conf4
-rwxr-xr-xemby-server.install54
-rwxr-xr-xemby-server.service16
6 files changed, 155 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..74551260f5e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+pkgbase = emby-server-beta
+ pkgdesc = Emby Server is a home media server built using other popular open source technologies.
+ pkgver = 3.0.5641.4
+ pkgrel = 1
+ url = http://emby.media
+ install = emby-server.install
+ arch = i686
+ arch = x86_64
+ arch = armv6h
+ license = GPL
+ makedepends = imagemagick
+ depends = mono
+ depends = libmediainfo
+ depends = sqlite
+ depends = ffmpeg
+ depends = imagemagick
+ provides = emby-server
+ conflicts = emby-server
+ conflicts = emby-server-git
+ conflicts = mediabrowser-server
+ conflicts = mediabrowser-server-beta
+ conflicts = mediabrowser-server-git
+ backup = etc/conf.d/emby-server
+ source = https://github.com/MediaBrowser/MediaBrowser/archive/f35263111847d9f8b7679104fd52e34db00f542a.tar.gz
+ source = emby-server.service
+ source = emby-server
+ source = emby-server.conf
+ md5sums = bd049dd1d1b965fdc449a7e919c358ea
+ md5sums = 07948b362480a371c4be50c3b9854eeb
+ md5sums = 69d0ebc1fff9c8ac2f5ff4a6db20ce42
+ md5sums = 184f023f2a407be2fdd60b236e9f792e
+
+pkgname = emby-server-beta
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 00000000000..527ebbafb53
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Daniel Seymour <dannyseeless at gmail dot com>
+
+pkgname=emby-server-beta
+pkgver=3.0.5641.4
+_commit=f35263111847d9f8b7679104fd52e34db00f542a
+pkgrel=1
+pkgdesc="Emby Server is a home media server built using other popular open source technologies."
+arch=('i686' 'x86_64' 'armv6h')
+url="http://emby.media"
+license=('GPL')
+groups=()
+depends=('mono' 'libmediainfo' 'sqlite' 'ffmpeg' 'imagemagick')
+makedepends=('imagemagick')
+optdepends=()
+conflicts=('emby-server' 'emby-server-git' 'mediabrowser-server'
+ 'mediabrowser-server-beta' 'mediabrowser-server-git')
+provides=('emby-server')
+install=emby-server.install
+source=("https://github.com/MediaBrowser/MediaBrowser/archive/$_commit.tar.gz"
+ "emby-server.service" "emby-server"
+ "emby-server.conf")
+backup=('etc/conf.d/emby-server')
+md5sums=('bd049dd1d1b965fdc449a7e919c358ea'
+ '07948b362480a371c4be50c3b9854eeb'
+ '69d0ebc1fff9c8ac2f5ff4a6db20ce42'
+ '184f023f2a407be2fdd60b236e9f792e')
+
+prepare() {
+ MAGICKWAND=$(ldconfig -p | grep MagickWand.*.so$ | cut -d" " -f4)
+ sed -i "s/libMagickWand-6.Q8.so/${MAGICKWAND##*/}/" ${srcdir}/MediaBrowser-$_commit/MediaBrowser.Server.Mono/ImageMagickSharp.dll.config
+}
+
+build(){
+ cd ${srcdir}/MediaBrowser-$_commit
+ xbuild /p:Configuration="Release Mono" /p:Platform="Any CPU" /p:OutputPath="${srcdir}/usr/lib/emby-server" /t:build MediaBrowser.Mono.sln
+ rm -rf ${srcdir}/MediaBrowser-$_commit
+}
+
+package() {
+ install -Dm644 ${srcdir}/emby-server.conf ${pkgdir}/etc/conf.d/emby-server
+ install -Dm755 ${srcdir}/emby-server ${pkgdir}/usr/bin/emby-server
+ install -Dm644 ${srcdir}/emby-server.service ${pkgdir}/usr/lib/systemd/system/emby-server.service
+ cp -r ${srcdir}/usr/lib/emby-server ${pkgdir}/usr/lib
+}
diff --git a/emby-server b/emby-server
new file mode 100755
index 00000000000..cba1b431a03
--- /dev/null
+++ b/emby-server
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+$MONO_EXECUTABLE /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata $PROGRAM_DATA -ffmpeg $FFMPEG -ffprobe $FFPROBE
diff --git a/emby-server.conf b/emby-server.conf
new file mode 100755
index 00000000000..5ca0372af81
--- /dev/null
+++ b/emby-server.conf
@@ -0,0 +1,4 @@
+MONO_EXECUTABLE=/usr/bin/mono
+PROGRAM_DATA=/var/lib/emby-server
+FFMPEG=/usr/bin/ffmpeg
+FFPROBE=/usr/bin/ffprobe
diff --git a/emby-server.install b/emby-server.install
new file mode 100755
index 00000000000..4a47f0e31b4
--- /dev/null
+++ b/emby-server.install
@@ -0,0 +1,54 @@
+#! /bin/bash
+
+post_install() {
+ getent group emby >/dev/null || groupadd emby
+ getent passwd emby >/dev/null || useradd -c 'Emby Server' -g emby -d /var/lib/emby-server -r -M emby -s /bin/false
+ if [ ! -d /var/lib/emby-server ]; then
+ mkdir /var/lib/emby-server;
+ chown -R emby:emby /var/lib/emby-server
+ fi
+ if [ ! $? -eq 0 ]
+ then
+ echo "WARNING COULDN'T CREATE EMBY USERID, MAKE SURE I HAVE PERMISSON TO DO THAT!"
+ exit 1
+ fi
+
+ systemctl --system daemon-reload
+ echo "Fixing file permissions...Please be patient."
+ cat <<EOF
+
+Emby Server is a home media server built using other popular open-source technologies.
+
+If you would like to report a bug, please post to the forums at www.emby.media/community.
+
+Emby uses the system's mono, ffmpeg, and ffprobe binaries. If any of those binaries are in a non-standard location, please create a custom environment file using /etc/conf.d/emby-server as a template. You will then need to edit the systemd service file to point to the custom environment file.
+
+For more information on how to customize systemd files, please refer to https://wiki.archlinux.org/index.php/Systemd#Editing_provided_unit_files
+
+To start the server, run systemctl start emby-server.service.
+
+Enjoy the show!
+
+EOF
+}
+
+post_upgrade() {
+ getent group emby >/dev/null || groupadd emby
+ getent passwd emby >/dev/null || useradd -c 'Emby Server' -g emby -b /var/lib/emby-server -r -M emby -s /bin/false
+ if [ ! -d /var/lib/emby-server ]; then
+ mkdir /var/lib/emby-server
+ chown -R emby:emby /var/lib/emby-server
+ echo "The old installation will be in /var/lib/mediabrowser-server."
+ fi
+ systemctl --system daemon-reload
+}
+
+post_remove() {
+ cat <<EOF
+ To remove the MediaBrowser Server database, please delete
+ /var/lib/emby-server.
+
+ Also, you should probably remove the emby user and
+ and group from your system.
+EOF
+}
diff --git a/emby-server.service b/emby-server.service
new file mode 100755
index 00000000000..98f79fad7ca
--- /dev/null
+++ b/emby-server.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Media Browser Server is a home media server built using other popular open source technologies.
+
+[Service]
+EnvironmentFile=/etc/conf.d/emby-server
+WorkingDirectory=/usr/lib/emby-server
+ExecStart=/usr/bin/emby-server
+User=emby
+Group=emby
+Restart=on-failure
+
+[Unit]
+After=network.target
+
+[Install]
+WantedBy=multi-user.target