update sickbeard-git to pacman 4.1

This commit is contained in:
Daniel Wallace 2013-04-08 14:27:32 -04:00
parent de310f449b
commit cac8d43c2e
4 changed files with 25 additions and 127 deletions

View file

@ -4,51 +4,44 @@
# Contributor: Augusto Born de Oliveira <augustoborn at gmail dot com>
pkgname=sickbeard-git
pkgver=20130212
pkgver=3412.fb37d33
pkgrel=1
epoch=1
pkgdesc="A PVR application that downloads and manages your TV shows"
arch=(any)
arch=('any')
url="http://code.google.com/p/sickbeard/"
license=(GPL3)
depends=(python2 python2-cheetah)
makedepends=(git)
license=('GPL3')
depends=('python2' 'python2-cheetah')
makedepends=('git')
optdepends=('sabnzbd: NZB downloader'
'python-notify: desktop notifications')
install=sickbeard.install
conflicts=(sickbeard)
source=('sickbeard-system.service' 'sickbeard-user.service' 'sickbeard.tmpfile')
sha256sums=('aa2b6496bf622d2b235a47b80d950ba84411e879a08bc656d227e224653aeded'
conflicts=('sickbeard')
source=("$pkgname::git://github.com/midgetspy/Sick-Beard.git"
'sickbeard-system.service' 'sickbeard-user.service' 'sickbeard.tmpfile')
sha256sums=('SKIP'
'aa2b6496bf622d2b235a47b80d950ba84411e879a08bc656d227e224653aeded'
'bf2f9792d3d7e1d703fec9bf61a1562a34b8d08d1dba3d560e6299ea25bd5a72'
'24f20de2445ff3998aad5d87d94e0fea3b22eb1d0a451ed33ec301ac36a7398d')
_gitroot="git://github.com/midgetspy/Sick-Beard.git"
_gitname="sickbeardpvr"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d $_gitname ]; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
msg "Starting install..."
pkgver() {
cd "$srcdir"/$pkgname
echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}
package() {
mkdir -p "${pkgdir}/opt/"
cp -r "$srcdir/$_gitname" "${pkgdir}/opt/sickbeard"
chmod 775 "${pkgdir}/opt/sickbeard"
mkdir -p "$pkgdir"/opt/sickbeard
cp -r "$srcdir"/$pkgname/* "$pkgdir"/opt/sickbeard
chmod 775 "$pkgdir"/opt/sickbeard
sed -i 's/python/python2/g' "${pkgdir}/opt/sickbeard/autoProcessTV/sabToSickBeard.py"
sed -i 's/python/python2/g' "${pkgdir}/opt/sickbeard/autoProcessTV/hellaToSickBeard.py"
sed -i 's/python/python2/g' "$pkgdir"/opt/sickbeard/autoProcessTV/sabToSickBeard.py
sed -i 's/python/python2/g' "$pkgdir"/opt/sickbeard/autoProcessTV/hellaToSickBeard.py
install -D -m644 "${srcdir}/sickbeard-system.service" "${pkgdir}/usr/lib/systemd/system/sickbeard.service"
install -D -m644 "${srcdir}/sickbeard-user.service" "${pkgdir}/usr/lib/systemd/user/sickbeard.service"
install -D -m644 "${srcdir}/sickbeard.tmpfile" "${pkgdir}/usr/lib/tmpfiles.d/sickbeard.conf"
install -D -m644 "$srcdir"/sickbeard-system.service "$pkgdir"/usr/lib/systemd/system/sickbeard.service
install -D -m644 "$srcdir"/sickbeard-user.service "$pkgdir"/usr/lib/systemd/user/sickbeard.service
install -D -m644 "$srcdir"/sickbeard.tmpfile "$pkgdir"/usr/lib/tmpfiles.d/sickbeard.conf
find "$pkgdir" -type d -name '.git' -exec rm -r '{}' +
}
# vim:set ts=2 sw=2 et:

View file

@ -1,8 +0,0 @@
#!/bin/sh
# This file is a user shortcut to the Sick Beard program.
# It should only be used for simple debugging and checking the Sick Beard arguments.
# The initscript and unit use the longer command found here to prevent problems with PIDs.
/usr/bin/env python2 /opt/sickbeard/SickBeard.py "$@"

View file

@ -1,12 +0,0 @@
# Configuration parameters for the sickbeard daemon.
# User that Sick Beard will run as
# Leave blank to run as the current user (likely root).
# If you change the user, you must now modify the sickbeard tmpfiles config file.
# To do that, copy /usr/lib/tmpfiles.d/sickbeard.conf to /etc/tmpfiles.d/sickbeard.conf and modify the user in that file.
# You also need to change the datadir to somewhere writable by that user by adding it to the SB_ARGS, e.g. --datadir=/home/$USER/.sickbeard
SB_USER="sickbeard"
# Sick Beard arguments
SB_ARGS="--quiet --daemon --config /opt/sickbeard/config.ini"

View file

@ -1,75 +0,0 @@
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/sickbeard
SB_PIDFILE="/run/sickbeard/sickbeard.pid"
case "$1" in
start)
stat_busy "Starting Sick Beard"
if [ -f /run/daemons/sickbeard ]; then
echo "Sick Beard is already running as a daemon! If you are certain it is not, remove /run/daemons/sickbeard."
stat_fail
elif [ -f $SB_PIDFILE ]; then
echo "Sick Beard may already be running. If you are certain it is not, remove $SB_PIDFILE."
stat_fail
else
SB_ARGS+=" --pidfile $SB_PIDFILE"
if [ ! "$SB_USER" ]; then
/usr/bin/env python2 /opt/sickbeard/SickBeard.py $SB_ARGS
RC=$?
else
su - $SB_USER -s /bin/sh -c "/usr/bin/env python2 /opt/sickbeard/SickBeard.py $SB_ARGS"
RC=$?
fi
if [ $RC -gt 0 ]; then
stat_fail
else
add_daemon sickbeard
stat_done
fi
fi
;;
stop)
stat_busy "Stopping Sick Beard"
if [ ! -f $SB_PIDFILE ]; then
echo "The pid file is missing. Check that Sick Beard is actually running."
RC=1
else
read -r SB_PID < $SB_PIDFILE
kill $SB_PID
RC=$?
fi
if [ $RC -gt 0 ]; then
echo "The shutdown failed. Check that Sick Beard is actually running."
stat_fail
else
while [ -f $SB_PIDFILE ]; do
sleep 1
done
rm_daemon sickbeard
stat_done
fi
;;
restart)
"$0" stop
sleep 1
"$0" start
;;
status)
stat_busy "Sick Beard daemon status:";
ck_status $daemon_name
;;
*)
echo "usage: $0 {start|stop|restart|status}"
esac
exit 0