diff options
author | Martin Väth <martin@mvath.de> | 2014-05-11 17:25:41 +0200 |
---|---|---|
committer | Martin Väth <martin@mvath.de> | 2015-10-11 10:49:10 +0200 |
commit | 7e74d845754689338ed22f9d1a77cdb55cc67763 (patch) | |
tree | 44a8701c227e1f9534a77a27cb41d7f9f3c15ba5 /media-tv | |
parent | Bump sundtek-tv (diff) | |
download | mv-7e74d845754689338ed22f9d1a77cdb55cc67763.tar.gz mv-7e74d845754689338ed22f9d1a77cdb55cc67763.tar.bz2 mv-7e74d845754689338ed22f9d1a77cdb55cc67763.zip |
Let sundtek-tv use versioned tarballs. Thanks to the sundtek support
Diffstat (limited to 'media-tv')
-rw-r--r-- | media-tv/sundtek-tv/ChangeLog | 5 | ||||
-rw-r--r-- | media-tv/sundtek-tv/Manifest | 3 | ||||
-rw-r--r-- | media-tv/sundtek-tv/sundtek-tv-140510.143826.ebuild (renamed from media-tv/sundtek-tv/sundtek-tv-20140510.ebuild) | 75 |
3 files changed, 28 insertions, 55 deletions
diff --git a/media-tv/sundtek-tv/ChangeLog b/media-tv/sundtek-tv/ChangeLog index a06fbaad..6d11e1c9 100644 --- a/media-tv/sundtek-tv/ChangeLog +++ b/media-tv/sundtek-tv/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*sundtek-tv-20140510.143826 (11 May 2014) + + 11 May 2014; Martin Väth <martin@mvath.de>: + Move to versioned tarball support. Thanks to the Sundtek support! + *sundtek-tv-20140510 (11 May 2014) 11 May 2014; Martin Väth <martin@mvath.de>: diff --git a/media-tv/sundtek-tv/Manifest b/media-tv/sundtek-tv/Manifest index 98a655be..f74cf269 100644 --- a/media-tv/sundtek-tv/Manifest +++ b/media-tv/sundtek-tv/Manifest @@ -1,2 +1 @@ -DIST sundtek-tv-amd64-20140510.tar.gz 1246063 SHA256 3fce3350a34475a532df4f4594a5b8d0ab50acb343066fdb7f322516f606ccf2 SHA512 a10efa1b5a3ae82422061975bcf3b5b4cd69e84b91af98b101d5f9d5f358c166b81579bd333b9d4bf116df659b978b0bf2f5d137d3ed237184a49ca3a0cb0439 WHIRLPOOL 8c7ead2d838b472b490349d0c7408676001b4d1128bc496ee2ddf1a7e9a7769d5dde0960db9b8e73c22b2ab9ce7363f156fdb526d98fda2d99d12dff56b037e9 -DIST sundtek-tv-x86-20140510.tar.gz 1168522 SHA256 60d637df778aacc815590a31c21baf057d3ce1019d44b8586c24e7af99b3975f SHA512 68822c065bbeac1f84b227a9484cd0d6d5819908ddbea79cdc67661e3901afcb6cb7eb9cab7ad7ea8e8c6847fdee7d59cc8dab12efecf1bd1dd0bf1fa54b9151 WHIRLPOOL 5e57facb4371ce68184b2ac8f7c7d66cd292a1f7d2b64b7fbe0c3de05d08398cb4aa802263f88a1e48d1172a54b44b22e1a4afa209abd38bd2080fe91cb4bddd +DIST sundtek_installer_140510.143826.sh 22545046 SHA256 8bd44e9ff9e3824ba42c5e3ee58b6f5de7033ec1a51d71bdeb15dc9ef116c2b6 SHA512 43b2d5b06e38d118bd511ee07cfcbfd63abbf8509789a99e65b19a85efdce56ed7f9991744a0c377f9e625931c0c3f97b5a11f2f1f508f789cb8ad621d663afc WHIRLPOOL 5904b39e965496c465c773799c587baa0992312045e8bdd477a8f6cdf352c0e7c3e18a1818a4dbc41661972a1cb81daa6de7fef208550aa17e0ebc620004318c diff --git a/media-tv/sundtek-tv/sundtek-tv-20140510.ebuild b/media-tv/sundtek-tv/sundtek-tv-140510.143826.ebuild index 3a3e60a1..0f67b52d 100644 --- a/media-tv/sundtek-tv/sundtek-tv-20140510.ebuild +++ b/media-tv/sundtek-tv/sundtek-tv-140510.143826.ebuild @@ -3,22 +3,14 @@ # $Header: $ EAPI=5 -inherit eutils pax-utils readme.gentoo systemd +inherit eutils pax-utils readme.gentoo systemd unpacker -develop=false +# The following variable is only for testing purposes. Leave it to "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" -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} )" -${develop} && SRC_URI="${SRC_URI} http://www.sundtek.de/media/${driverdist} -> ${driverfile}" +SRC_URI="http://www.sundtek.de/media/sundtek_installer_${PV}.sh" RESTRICT="mirror" LICENSE="sundtek" @@ -35,47 +27,31 @@ DOC_CONTENTS="To initialize sundtek drivers during booting call You will probably need to adapt sundtek-local.service to your defaults " -QA_PREBUILT="opt/bin/* usr/lib*" +QA_PREBUILT="opt/bin/* opt/bin/*/* usr/$(get_libdir)/*" -pkg_setup() { +src_unpack() { + local subdir a + a="${S}/archives" + mkdir -- "${S}" # "|| die" no necessary: test happens in cd + mkdir -- "${a}" + cd -- "${a}" || die "cannot cd to ${a}" + bash -- "${DISTDIR}/${A}" -e || die "extracting failed" + cd -- "${S}" || die if use amd64 - then sourcetar="${tar_amd64}" + then subdir=64bit elif use x86 - then sourcetar="${tar_x86}" + then subdir=32bit else die "This ebuild does not support the architecture. -Download from Sundtek directly or write your own ebuild" +Download from Sundtek directly, write your own ebuild, or send me patches." 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} + unpacker "${a}/${subdir}/installer.tar.gz" || die + rm -rf -- "${a}" || die "cannot remove ${a}" cp -- \ "${FILESDIR}"/sundtek.initd \ "${FILESDIR}"/sundtek-local.service \ "${FILESDIR}"/_mediaclient \ "${FILESDIR}"/mediaclient.video \ - "${S}" - ! ${develop} || cp "${DISTDIR}/${driverfile}" "${S}/${driverdist}" \ - || die "could not copy ${driverfile}" -} - -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" + "${S}" || die } my_movlibdir() { @@ -104,7 +80,6 @@ src_prepare() { 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 @@ -116,11 +91,6 @@ src_prepare() { ${keep_original} || mv 1/lib/pm 1/lib/pm-utils/sleep.d || die mv 1/lib "${mylibdir}" || die 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}#" \ @@ -141,7 +111,6 @@ src_prepare() { 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" ln -sfn mediaclient.video mediaclient.audio ln -sfn mediaclient.video mediaclient.dvb epatch_user @@ -153,7 +122,7 @@ src_install() { for i in etc lib64 lib32 lib usr opt do test -d "${i}" && mv -- "${i}" "${ED}" done - for i in "${ED}"/usr/bin "${ED}"/usr/lib* "${ED}"/opt + for i in "${ED}"/usr/bin "${ED}"/usr/$(get_libdir) "${ED}"/opt do test -d "${i}" && chmod -R 755 "${i}" done if ! ${keep_original} @@ -170,11 +139,11 @@ src_install() { } 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." + 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" } + false chmod 6111 "${EPREFIX}/opt/bin/mediasrv" || \ + elog "You might need to chmod 6111 ${EPREFIX}/opt/bin/mediasrv" } |