Merge branch 'master' of github.com:archlinuxarm/PKGBUILDs

This commit is contained in:
Kevin Mihelich 2013-08-14 21:36:08 +00:00
commit 89e344bcd2
7 changed files with 212 additions and 6 deletions

View file

@ -0,0 +1,48 @@
# Contributor: Praekon <praekon@googlemail.com>
# Contributor: Arthur <arthur.darcet@m4x.org>
# Contributor: Jon Wiersma <archaur@jonw.org>
# Contributor: monty <linksoft [at] gmx [dot] de>
# Maintainer: Tom Moore <t.moore01 [at] gmail [dot] com>
#ALARM: moonman
# - Using Synology arm package as the base
# - changed start_pms contents for arm
buildarch=2
pkgname=plexmediaserver
pkgver=0.9.8.4.125
pkgrel=1
_subver=ffe2a5d
pkgdesc="Plex Media Server for Linux"
url='http://www.plexapp.com'
arch=('arm')
license=('closed')
depends=('rsync' 'avahi')
backup=('etc/conf.d/plexmediaserver')
install='plexmediaserver.install'
source=("http://plex.r.worldssl.net/plex-media-server/${pkgver}-${_subver}/PlexMediaServer-${pkgver}-${_subver}-arm.spk"
"${pkgname}.conf.d"
"${pkgname}.service"
"start_pms")
md5sums=('3e8d842969db8bec8157b7d5312de829'
'32cdd9f9de446f6646616a0077151726'
'b69f7188025ff62187724041c959adef'
'da94a77cffc92c8e3af608d52963a238')
build() {
mkdir ${srcdir}/plex
cd ${srcdir}/plex
tar xzf ../package.tgz
}
package() {
mkdir -p "${pkgdir}"/opt/plexmediaserver
mkdir -p "${pkgdir}"/usr/lib/systemd/system
cp -r ${srcdir}/plex/* "${pkgdir}"/opt/plexmediaserver/
install -Dm755 ${srcdir}/start_pms "${pkgdir}"/opt/plexmediaserver/
install -Dm644 ${srcdir}/plexmediaserver.conf.d "${pkgdir}"/etc/conf.d/plexmediaserver
install -Dm644 ${srcdir}/plexmediaserver.service "${pkgdir}"/usr/lib/systemd/system/plexmediaserver.service
}

View file

@ -0,0 +1,19 @@
PLEX_MEDIA_SERVER_USER=plex
PLEX_MEDIA_SERVER_HOME=/opt/plexmediaserver
# the number of plugins that can run at the same time
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
# where the mediaserver should store the transcodes
PLEX_MEDIA_SERVER_TMPDIR=/var/tmp
# Change this to be what you like
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${PLEX_MEDIA_SERVER_HOME}/Library/Application Support"
# Logs live in /opt/plexmediaserver/Library/Application Support/Plex Media Server/Logs
# Uncomment this to send to syslog-ng
#PLEX_MEDIA_SERVER_USE_SYSLOG=true

View file

@ -0,0 +1,75 @@
post_install() {
if [ ! `getent passwd plex` ]; then
useradd -m -r -s /bin/bash -d /opt/plexmediaserver plex
if [ ! $? -eq 0 ]
then
echo "WARNING COULDN'T CREATE PLEX USERID, MAKE SURE I HAVE PERMISSON TO DO THAT!"
exit 1
fi
fi;
# Now to fix broken items from plexapp.com
rm -f /opt/plexmediaserver/start.sh
. /etc/conf.d/plexmediaserver
if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" ];
then
mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR"
if [ ! $? -eq 0 ]
then
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR, MAKE SURE I HAVE PERMISSON TO DO THAT!"
exit 1
fi
chown -R ${PLEX_MEDIA_SERVER_USER} "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR"
fi
if [ ! -d ${PLEX_MEDIA_SERVER_HOME}/Library/Application\ Support/Plex\ Media\ Server/Plug-ins ]; then
mkdir -p ${PLEX_MEDIA_SERVER_HOME}/Library/Application\ Support/Plex\ Media\ Server/Plug-ins
if [ ! $? -eq 0 ]
then
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR, MAKE SURE I HAVE PERMISSON TO DO THAT!"
exit 1
fi
cp -r ${PLEX_MEDIA_SERVER_HOME}/Resources/Plug-ins/{System.bundle,Framework.bundle} ${PLEX_MEDIA_SERVER_HOME}/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/
chown -R ${PLEX_MEDIA_SERVER_USER} ${PLEX_MEDIA_SERVER_HOME} &
fi
systemctl --system daemon-reload
cat << "EOM"
####
# Installation done
# - change default configurations in:
# /etc/conf.d/plexmediaserver
# - Launch the server with:
# systemctl start plexmediaserver
#
# This is an UNOFFICIAL package. Please don't go to plex forums
# asking for help as they don't support it on ArchLinux ARM.
#
# Redistributed with permission from Plex team.
####
EOM
}
pre_install() {
if [ -f /usr/lib/systemd/system/plexmediaserver.service ]; then
echo "Stopping Plexmediaserver before starting..."
systemctl stop plexmediaserver
fi;
}
pre_upgrade() {
pre_install;
}
pre_remove() {
pre_install;
}
post_upgrade() {
systemctl --system daemon-reload
. /etc/conf.d/plexmediaserver
rm -f ${PLEX_MEDIA_SERVER_HOME}/start.sh
chown -R ${PLEX_MEDIA_SERVER_USER} ${PLEX_MEDIA_SERVER_HOME} &
}

View file

@ -0,0 +1,12 @@
[Unit]
Description=Plex Media Server for Linux
After=network.target
[Service]
EnvironmentFile=-/etc/conf.d/plexmediaserver
ExecStart=/opt/plexmediaserver/start_pms
KillMode=process
Type=forking
[Install]
WantedBy=multi-user.target

52
aur/plexmediaserver/start_pms Executable file
View file

@ -0,0 +1,52 @@
#!/bin/sh
#defaults - change these parameters in /etc/conf.d/plexmediaserver
export PLEX_MEDIA_SERVER_USER=plex
export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
export PLEX_MEDIA_SERVER_HOME=/opt/plexmediaserver
export PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
export PLEX_MEDIA_SERVER_TMPDIR=/tmp
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${PLEX_MEDIA_SERVER_HOME}/Library/Application Support"
test -f /etc/conf.d/plexmediaserver && . /etc/conf.d/plexmediaserver
if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" ]
then
mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR"
chown -R ${PLEX_MEDIA_SERVER_USER} "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR"
if [ ! $? -eq 0 ]
then
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR, MAKE SURE I HAVE PERMISSON TO DO THAT!"
exit 1
fi
fi
if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Linux/arm/Frameworks/" ]
then
mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Linux/arm/Frameworks/"
chown -R ${PLEX_MEDIA_SERVER_USER} "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Linux/arm/Frameworks/"
if [ ! $? -eq 0 ]
then
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Linux/arm/Frameworks, MAKE SURE I HAVE PERMISSON TO DO THAT!"
exit 1
fi
fi
if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Logs" ]
then
mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Logs"
chown -R ${PLEX_MEDIA_SERVER_USER} "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Logs"
if [ ! $? -eq 0 ]
then
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Logs, MAKE SURE I HAVE PERMISSON TO DO THAT!"
exit 1
fi
fi
export LD_LIBRARY_PATH="${PLEX_MEDIA_SERVER_HOME}"
export TMPDIR="${PLEX_MEDIA_SERVER_TMPDIR}"
ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
cd ${PLEX_MEDIA_SERVER_HOME}; su -c "${PLEX_MEDIA_SERVER_HOME}/Plex\ Media\ Server &" ${PLEX_MEDIA_SERVER_USER}

View file

@ -8,8 +8,8 @@ pkgname=('linux-raspberrypi-latest' 'linux-headers-raspberrypi-latest')
# pkgname=linux-custom # Build kernel with a different name
_kernelname=${pkgname#linux}
_basekernel=3.10
pkgver=${_basekernel}.4
pkgrel=2
pkgver=${_basekernel}.6
pkgrel=1
bfqver=v6r2
arch=('arm armv6h')
url="http://www.kernel.org/"
@ -26,7 +26,7 @@ source=('config'
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${_basekernel}.0-${bfqver}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-${_basekernel}.patch"
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${_basekernel}.0-${bfqver}/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${bfqver}-for-${_basekernel}.0.patch")
md5sums=('6991d2c0deaf797e738666c702c94048'
md5sums=('e457b67e0260b3e199d632138dd7aafd'
'9d3c56a4b999c8bfbd4018089a62f662'
'd00814b57448895e65fbbc800e8a58ba'
'9335d1263fd426215db69841a380ea26'

View file

@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.10.1-2 Kernel Configuration
# Linux/arm 3.10.6-1 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@ -343,6 +343,7 @@ CONFIG_ARM_THUMB=y
# CONFIG_CPU_ICACHE_DISABLE is not set
# CONFIG_CPU_DCACHE_DISABLE is not set
# CONFIG_CPU_BPREDICT_DISABLE is not set
CONFIG_KUSER_HELPERS=y
# CONFIG_CACHE_L2X0 is not set
CONFIG_ARM_L1_CACHE_SHIFT=5
CONFIG_ARM_DMA_MEM_BUFFERABLE=y
@ -475,8 +476,7 @@ CONFIG_BINFMT_ELF=y
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
CONFIG_BINFMT_SCRIPT=y
CONFIG_HAVE_AOUT=y
CONFIG_BINFMT_AOUT=y
# CONFIG_HAVE_AOUT is not set
CONFIG_BINFMT_MISC=m
CONFIG_COREDUMP=y