aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tvheadend-git
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2012-11-22 17:01:02 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2012-11-22 17:01:02 +0100
commit452b90aac34dc84967abaae2024ddfc6b378833b (patch)
treefbd8f5d08a98cb60b94a571c9a9278b80e6f70bd /testing/tvheadend-git
parent5f98cefe85cb966d6aa9315845d2327ba377299c (diff)
downloadaports-452b90aac34dc84967abaae2024ddfc6b378833b.tar.bz2
aports-452b90aac34dc84967abaae2024ddfc6b378833b.tar.xz
testing/tvheadend-git: new snapshot
Diffstat (limited to 'testing/tvheadend-git')
-rw-r--r--testing/tvheadend-git/APKBUILD75
-rw-r--r--testing/tvheadend-git/tvheadend-git.confd3
-rw-r--r--testing/tvheadend-git/tvheadend-git.initd15
-rw-r--r--testing/tvheadend-git/tvheadend-git.post-deinstall4
-rw-r--r--testing/tvheadend-git/tvheadend-git.pre-install5
5 files changed, 71 insertions, 31 deletions
diff --git a/testing/tvheadend-git/APKBUILD b/testing/tvheadend-git/APKBUILD
index f800ab0d99..bce95bc325 100644
--- a/testing/tvheadend-git/APKBUILD
+++ b/testing/tvheadend-git/APKBUILD
@@ -1,23 +1,50 @@
# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=tvheadend-git
-_pkgname=andoma-tvheadend-bccec43
-pkgver=2.99
+_date=20121122
+pkgver=$_date
pkgrel=0
pkgdesc="TV Streaming server for linux"
url="http://www.lonelycoder.com/hts/tvheadend_overview.html"
arch="all"
license="GPL3"
depends=""
-depends_dev="openssl-dev avahi-dev wget bash findutils"
-makedepends="$depends_dev"
-install="$pkgname.pre-install $pkgname.post-deinstall"
-subpackages=""
-source="saveas-https://github.com/andoma/tvheadend/tarball/master/$pkgname-$pkgver.tar.gz
-tvheadend-git.initd
-tvheadend-git.confd
-"
-_builddir="$srcdir"/$_pkgname
+depends_dev="openssl-dev bash findutils"
+makedepends="$depends_dev python"
+pkgusers="$pkgname"
+pkggroups="$pkgname"
+install="$pkgname.pre-install"
+subpackages="$pkgname-doc"
+source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$_date.tar.gz
+ $pkgname.initd
+ $pkgname.confd"
+_giturl="git://github.com/tvheadend/tvheadend.git"
+_upload=dev.alpinelinux.org:/archive/$pkgname/
+_builddir="$srcdir/$pkgname-$_date"
+
+snapshot() {
+ _date=$(date +%Y%m%d)
+ local _pkg=$pkgname-$_date.tar.gz
+ mkdir -p "$srcdir"
+ cd "$srcdir"
+ rm -rf "$pkgname"
+ git clone --depth=1 --bare $_giturl || return 1
+ git --git-dir ${_giturl##*/} archive -o $_pkg \
+ --prefix=$pkgname-$_date/ HEAD \
+ || return 1
+ msg "New snapshot: $_pkg"
+ msg "Uploading to $_upload"
+ #scp -r $_pkg $_upload/$_pkg || return 1
+ rsync -ave ssh $_pkg $_upload || return 1
+ cd ..
+ sed -i -e "s/^_date=.*/_date=$_date/" \
+ APKBUILD || return 1
+ _dir=${PWD%/APKBUILD}
+ _dir=${_dir%/*}
+ abuild checksum && abuild -r && git add APKBUILD \
+ && git commit -m"${_dir##*/}/$pkgname: snapshot $_date"
+}
+
prepare() {
local i
cd "$_builddir"
@@ -27,19 +54,31 @@ prepare() {
esac
done
}
+
build() {
cd "$_builddir"
- ./configure --prefix=/usr --release
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --release \
+ --disable-avahi \
+ || return 1
make || return 1
}
+
package() {
cd "$_builddir"
- sed -i 's/\-T//g' support/posix.mk
make DESTDIR="$pkgdir" install || return 1
- install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname || return 1
- install -m755 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname || return 1
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -m755 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+ install -d -o $pkgname -g $pkgname \
+ "$pkgdir/etc/$pkgname" || return 1
}
-md5sums="96fa898ae84aefbc25e12067eb8a93c1 tvheadend-git-2.99.tar.gz
-4d6324b1b87890faf846ad95c2f3483c tvheadend-git.initd
-74749f3527418ddfd5671d5d5ad4dca4 tvheadend-git.confd"
+md5sums="9048b0d2a5dda4436bce2ec76c9d859d tvheadend-git-20121122.tar.gz
+8b7da39441150596bdeb2456f7cf73ed tvheadend-git.initd
+17cf7dfaf27706409a004c246c1a2c3c tvheadend-git.confd"
diff --git a/testing/tvheadend-git/tvheadend-git.confd b/testing/tvheadend-git/tvheadend-git.confd
index a912932aea..32dfe2526c 100644
--- a/testing/tvheadend-git/tvheadend-git.confd
+++ b/testing/tvheadend-git/tvheadend-git.confd
@@ -1,2 +1,3 @@
TVHBIN="/usr/bin/tvheadend"
-TVHUSER="tvheadend"
+TVHUSER="tvheadend"
+TVHCONF="/etc/tvheadend"
diff --git a/testing/tvheadend-git/tvheadend-git.initd b/testing/tvheadend-git/tvheadend-git.initd
index 6a50b9f3f2..9b56313a8b 100644
--- a/testing/tvheadend-git/tvheadend-git.initd
+++ b/testing/tvheadend-git/tvheadend-git.initd
@@ -1,18 +1,23 @@
#!/sbin/runscript
+
depend() {
need net
}
start() {
- ebegin "Starting tvheadend"
+ ebegin "Starting tvheadend"
start-stop-daemon --start \
- --user ${TVHUSER} \
- --exec ${TVHBIN} -- -C -f
+ --exec ${TVHBIN} -- \
+ -C -f -u ${TVHUSER} \
+ -c ${TVHCONF}
eend $?
}
stop() {
- ebegin "Stopping tvheadend"
- start-stop-daemon --stop --quiet --name tvheadend --signal 2
+ ebegin "Stopping tvheadend"
+ start-stop-daemon --stop --quiet \
+ --retry TERM/30/KILL/5 \
+ --pidfile /var/run/tvheadend.pid
eend $?
}
+
diff --git a/testing/tvheadend-git/tvheadend-git.post-deinstall b/testing/tvheadend-git/tvheadend-git.post-deinstall
deleted file mode 100644
index b80984d6f0..0000000000
--- a/testing/tvheadend-git/tvheadend-git.post-deinstall
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-deluser hts 2>/dev/null
-exit 0
diff --git a/testing/tvheadend-git/tvheadend-git.pre-install b/testing/tvheadend-git/tvheadend-git.pre-install
index 73f865ca47..c91e1eda93 100644
--- a/testing/tvheadend-git/tvheadend-git.pre-install
+++ b/testing/tvheadend-git/tvheadend-git.pre-install
@@ -1,5 +1,4 @@
#!/bin/sh
-groupadd tvheadend 2>/dev/null
-adduser -H -h /home/tvheadend -g tvheadend -D -s /bin/false tvheadend 2>/dev/null
-gpasswd -a tvheadend video 2>/dev/null
+adduser -H -h /usr/share/tvheadend -g tvheadend -D -s /bin/false tvheadend 2>/dev/null
+addgroup tvheadend video 2>/dev/null
exit 0