summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2014-03-09 12:07:20 +0100
committerMartin Väth <martin@mvath.de>2015-10-11 10:49:09 +0200
commit28393e7bbb7f729a4cc7f6c710d75df5f1ce80dd (patch)
treea9262caa79c4e9d92f1ae524fde40bde5c5dc5f3 /media-tv/sundtek-tv
parentFix paths in fvwm-crystal. Bump noscript (diff)
downloadmv-28393e7bbb7f729a4cc7f6c710d75df5f1ce80dd.tar.gz
mv-28393e7bbb7f729a4cc7f6c710d75df5f1ce80dd.tar.bz2
mv-28393e7bbb7f729a4cc7f6c710d75df5f1ce80dd.zip
Add sundtek-tv. Bump squashmount
Diffstat (limited to 'media-tv/sundtek-tv')
-rw-r--r--media-tv/sundtek-tv/ChangeLog8
-rw-r--r--media-tv/sundtek-tv/Manifest3
-rw-r--r--media-tv/sundtek-tv/files/sundtek.initd17
-rw-r--r--media-tv/sundtek-tv/metadata.xml16
-rw-r--r--media-tv/sundtek-tv/sundtek-tv-20140304.ebuild169
5 files changed, 213 insertions, 0 deletions
diff --git a/media-tv/sundtek-tv/ChangeLog b/media-tv/sundtek-tv/ChangeLog
new file mode 100644
index 00000000..bec69bd8
--- /dev/null
+++ b/media-tv/sundtek-tv/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for media-video/sundtek-tv-pro
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*sundtek-tv-pro3 (17 Feb 2014)
+
+ 17 Feb 2014; Martin Väth <martin@mvath.de>:
+ New ebuild from scratch.
diff --git a/media-tv/sundtek-tv/Manifest b/media-tv/sundtek-tv/Manifest
new file mode 100644
index 00000000..5ac7247f
--- /dev/null
+++ b/media-tv/sundtek-tv/Manifest
@@ -0,0 +1,3 @@
+DIST sundtek-tv-20090913.pdf 40767 SHA256 89c63affc25759a96c23331170a22ba1148f632e7ceb22383cf8ff0b29b499d3 SHA512 38245d485f4cde1deac55252fe070f0167ee3e8b52dc30d1ac2594a5f19ffb14054051f2dfe76bde64f7485d2c975850264adcde4575cc8b397eb0948a118e00 WHIRLPOOL 295c039be49b0b2c77358f0a9aebca621f9c1ddc0491182028bdc1fb24e84ab6ca07f32e1f69638c92c1939d328dad69e63be947fd403e896bbbee737e59dc38
+DIST sundtek-tv-amd64-20140304.tar.gz 1238797 SHA256 02ab0cbf85d20a10be6570f39208f940073a152f6b73a9f144ae03925a0fd6e1 SHA512 da8e45eeaaf82f2ff946aeb157c7f7b9405817bee49e2313c54285f901db7c120f9056e71c793763282719e32e9ee0005ab3a5557f62e9daadbebbc1457b8b34 WHIRLPOOL 5d463961da7f0597a045f3565ca43176b57b00e4dbbd25792675d6a9cadabbf43564d993481f8d49292697c4fe08cd9787aa164a53fb6d274dfd778d94cf37d2
+DIST sundtek-tv-x86-20140304.tar.gz 1161883 SHA256 e57429ac72aaae9bd41e3a8a959605ddab53804b7f5e95dc5d2d5ee1b478de00 SHA512 834be5a4925fa61bd4d7d0f6789c5df1c038250e0b8b2f06812721528cd5211599702f7f880ddcdc0a494eb3bfbdba245aa25fbdbabe6e838f827f0e003c5717 WHIRLPOOL 89c1918f8ec3b21e9958ffe16424b0fa8c9ac03261540b4eba0a576d78801fc798618d98a0b76b4023e6a769769de15d49e3bc936efb831e21b235d74ddd986a
diff --git a/media-tv/sundtek-tv/files/sundtek.initd b/media-tv/sundtek-tv/files/sundtek.initd
new file mode 100644
index 00000000..13a3b31c
--- /dev/null
+++ b/media-tv/sundtek-tv/files/sundtek.initd
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+description="sundtek TV mediaclient"
+#command=/opt/bin/mediasrv
+#command_args="-d --pluginpath /opt/bin"
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ /opt/bin/mediaclient --start=4
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ /opt/bin/mediaclient --shutdown
+ eend $?
+}
diff --git a/media-tv/sundtek-tv/metadata.xml b/media-tv/sundtek-tv/metadata.xml
new file mode 100644
index 00000000..e85a5d21
--- /dev/null
+++ b/media-tv/sundtek-tv/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>martin@mvath.de</email>
+ <name>Martin Väth</name>
+ </maintainer>
+ <upstream>
+ <maintainer>
+ <email>martin@mvath.de</email>
+ <name>Martin Väth</name>
+ </maintainer>
+ <bugs-to>mailto:martin@mvath.de</bugs-to>
+ <remote-id type="github">vaeth/video-mv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-tv/sundtek-tv/sundtek-tv-20140304.ebuild b/media-tv/sundtek-tv/sundtek-tv-20140304.ebuild
new file mode 100644
index 00000000..35f715a7
--- /dev/null
+++ b/media-tv/sundtek-tv/sundtek-tv-20140304.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+inherit eutils pax-utils readme.gentoo systemd
+
+develop=false
+keep_original=false
+
+tar_amd64="${PN}-amd64-${PV}.tar.gz"
+tar_x86="${PN}-x86-${PV}.tar.gz"
+drivertar="installer.tar.gz"
+driverfile="${PN}-20140223.sh"
+driverdist="sundtek_netinst.sh"
+docfile="${PN}-20090913.pdf"
+docdist="sundtek_smart_facts_de.pdf"
+DESCRIPTION="Sundtek MediaTV Pro III Drivers"
+HOMEPAGE="http://support.sundtek.com/index.php/topic,2.0.html"
+SRC_URI="amd64? ( http://www.sundtek.de/media/netinst/64bit/installer.tar.gz -> ${tar_amd64} )
+x86? ( http://www.sundtek.de/media/netinst/32bit/installer.tar.gz -> ${tar_x86} )
+doc? ( http://www.sundtek.com/docs/${docdist} -> ${docfile} )"
+${develop} && SRC_URI="${SRC_URI} http://www.sundtek.de/media/${driverdist} -> ${driverfile}"
+
+RESTRICT="mirror"
+LICENSE="sundtek"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="doc pax_kernel"
+RDEPEND=""
+DEPEND="pax_kernel? ( || ( sys-apps/elfix sys-apps/paxctl ) )"
+
+DISABLE_AUTOFORMATTING="true"
+DOC_CONTENTS="To initialize sundtek drivers during booting call
+ rc-update add sundtek default # for openrc
+ systemctl enable sundtek.service # for systemd
+"
+
+QA_PREBUILT="opt/bin/* usr/lib*"
+
+pkg_setup() {
+ if use amd64
+ then sourcetar="${tar_amd64}"
+ elif use x86
+ then sourcetar="${tar_x86}"
+ else die "This ebuild does not support the architecture.
+Download from Sundtek directly or write your own ebuild"
+ fi
+ elog "sundtek provides regular updates to the driver."
+ elog "I do not have time to bump this ebuild regularly."
+ elog "In case of checksum mismatches, copy to your local overlay,"
+ elog "rename the ebuild version to the current date and call"
+ elog "ebuild [name to the new ebuild] manifest"
+ elog "Although the ebuild tries to be generic, there is no guarantee that"
+ elog "the most current driver will work in this case, of course."
+ elog "If you cannot get this ebuild to work, use sundtek's installer."
+}
+
+src_unpack() {
+ mkdir "${S}" && cd "${S}"
+ unpack ${A}
+ cp "${FILESDIR}"/sundtek.initd "${S}"
+ ! ${develop} || cp "${DISTDIR}/${driverfile}" "${S}/${driverdist}" \
+ || die "could not copy ${driverfile}"
+ ! use doc || cp "${DISTDIR}/${docfile}" "${S}/${docdist}" \
+ || die "could not copy ${docfile}"
+}
+
+extract_driver() {
+ local size
+ size=`sed -n -e 's/^_SIZE=//p' -- "${S}/${driverdist}"` \
+ && [ -n "${size}" ] || die "cannot determine size"
+ dd "if=${S}/${driverdist}" of="${S}/installer.tar.gz" skip=1 "bs=${size}" \
+ || die "failed to extract driver tarball"
+ dd "if=${S}/${driverdist}" of="${S}/installer.sh" count=1 "bs=${size}" \
+ || die "failed to extract installer script"
+}
+
+my_movlibdir() {
+ local i
+ for i in bin/*
+ do if test -d "${i}"
+ then mv "${i}" "${2}" || die
+ fi
+ done
+}
+
+src_prepare() {
+ local mybinprefix mylibdir myinclude myinclsundtek mysystemd \
+ myudev mypkgconfig mylirc
+ if ${keep_original}
+ then mylibdir="opt/lib"
+ else mylibdir="usr/$(get_libdir)"
+ fi
+ mybinprefix="opt"
+ myinclude="usr/include"
+ mypkgconfig="usr/share/pkgconfig"
+ myinclsundtek="${myinclude}/sundtek"
+ myudev="lib/udev"
+ mylirc="etc/lirc"
+ umask 022
+ ${develop} && extract_driver
+ if use pax_kernel
+ then pax-mark em opt/bin/mediasrv
+ pax-mark e opt/bin/mediaclient
+ fi
+ mv opt 1 || die
+ mkdir -p "${mybinprefix}" lib "${myinclude}" "${mypkgconfig}" "${mylirc}" \
+ 1/lib/pm-utils || die
+ mv 1/bin "${mybinprefix}" || die
+ ${keep_original} || mv 1/lib/pm 1/lib/pm-utils/sleep.d || die
+ mv 1/lib "${mylibdir}" || die
+ ${keep_original} || mv 1/include "${myinclude}" || die
+ # The systemd unit need only be patched if PAX flags are not properly set
+ : sed -i -e 's/^\(\(Exec\(Start\|Stop\)\|Type\)=\)/#\1/' \
+ -e '/^#ExecStart=/iExecStart=/opt/bin/mediasrv --pluginpath /opt/bin' \
+ -e '/^#ExecStop=/i#ExecStop=/bin/kill $MAINPID' \
+ 1/doc/sundtek.service || die
+ sed -e "s#/opt/lib#${EPREFIX}/${mylibdir}#" \
+ -e "s#/opt/include#${EPREFIX}/${myinclsundtek}#" \
+ -e "s#prefix=/opt#prefix=${EPREFIX}/${mybinprefix}#" \
+ 1/doc/libmedia.pc >"${mypkgconfig}/libmedia.pc" || die
+ sed -i -e "s#/opt#${EPREFIX}/${mybinprefix}#" \
+ etc/udev/rules.d/*.rules 1/doc/*.service sundtek.initd || die
+ sed -i -e "s/^\([^#]\)/#\1/" \
+ etc/udev/rules.d/80-mediasrv-eeti.rules || die
+ mv etc/udev/rules.d/80-mediasrv.rules etc/hal . || die
+ mv etc/udev "${myudev}" || die
+ mv 1/doc/hardware.conf 1/doc/sundtek.conf "${mylirc}" || die
+ rm 1/doc/lirc_install.sh 1/doc/libmedia.pc || die
+ mv 1/doc/README 1/doc/*.service 1/doc/*.conf "${S}" || die
+ rmdir 1/doc || die "${S}/1/doc contains files not known to the ebuild"
+ rmdir 1 || die "${S}/1 contains files not known to the ebuild"
+ my_movlibdir "${mylibdir}"
+ mkdir etc/revdep-rebuild || die
+ echo "SEARCH_DIRS_MASK=\"${EPREFIX}/${mybinprefix}/bin/audio/libpulse.so\"" \
+ >etc/revdep-rebuild/50-sundtek-tv
+ echo "/${mylibdir}/libmediaclient.so" >etc/ld.so.preload
+ ${develop} && die "Developer mode: Dying after unpacking all"
+ epatch_user
+}
+
+src_install() {
+ insinto /
+ local i
+ for i in etc lib64 lib32 lib usr opt
+ do test -d "${i}" && doins -r "${i}"
+ done
+ for i in "${ED}"/usr/bin "${ED}"/usr/lib* "${ED}"/opt
+ do test -d "${i}" && chmod -R 755 "${i}"
+ done
+ if ! ${keep_original}
+ then newinitd sundtek.initd sundtek
+ systemd_dounit *.service
+ dodoc README *.conf
+ ! use doc || dodoc "${docdist}"
+ fi
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ false chmod 6111 "${EPREFIX}/opt/bin/mediasrv" ||
+ elog "You might need to chmod 6111 ${EPREFIX}/opt/bin/mediasrv"
+ einfo "adding root to the audio group."
+ usermod -aG audio root || {
+ ewarn "Could not add root to the audio group."
+ ewarn "You should do this manually if you have problems with sound"
+ }
+}