Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Video DownloadHelper addon helper app
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ryszardzonk
Apprentice
Apprentice


Joined: 18 Dec 2003
Posts: 225
Location: Rzeszów, POLAND

PostPosted: Tue May 01, 2018 8:59 pm    Post subject: Video DownloadHelper addon helper app Reply with quote

Live seems is always full of surprises. One day Firefox addons work fine while other they inform you of changes within the browser that require changes to one's habits. Recording streams from download helper is no longer possible without helper app which needs to be installed in system which does not seem to work for me at all when I did it manually. :cry:
Cutting to the point could someone prepare ebuild for https://github.com/mi-g/vdhcoapp/ so others like me could stay happy knowing they do not have to pull out the very few hair they have left ;)

PLEASE
_________________
Sky is not the limit...
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19441
Location: here

PostPosted: Wed May 02, 2018 9:24 am    Post subject: Reply with quote

I have not tested the ebuild

EDIT: this ebuild is based on binary version because in portage npm install isn't yet supported

www-misc/vdhcoapp-bin/vdhcoapp-bin-1.1.3.ebuild:
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

BN="net.downloadhelper.coapp"
MY_PN="${PN/-bin/}"

DESCRIPTION="Companion application for Video DownloadHelper browser add-on"
HOMEPAGE="https://www.downloadhelper.net/"
SRC_URI="
        x86? ( https://github.com/mi-g/${MY_PN}/releases/download/v${PV}/${BN}-${PV}-1_i386.tar.gz )
        amd64? ( https://github.com/mi-g/${MY_PN}/releases/download/v${PV}/${BN}-${PV}-1_amd64.tar.gz )"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="
        dev-lang/orc
        media-video/ffmpeg[arm,mp3,opus,theora,vorbis,webp,x264,x265]
"
DEPEND="${RDEPEND}"

S="${WORKDIR}/${BN}-${PV}"

src_install() {
        local size
        if use x86; then
                size=32
        elif use amd64; then
                size=64
    else
        die "Ebuild only functions for x86 and amd64."
    fi

        dobin bin/${BN}-linux-${size}


        insinto /usr/share/"${MY_PN}"
        doins config.json

        insinto /usr/lib/mozilla/native-messaging-hosts/
        newins "${FILESDIR}/firefox-manifest.json" "${BN}.json"
        sed -i "s/%SIZE%/${size}/" "${ED%/}/usr/lib/mozilla/native-messaging-hosts/${BN}.json" || die "sed"

        insinto /etc/opt/chrome/native-messaging-hosts
        newins "${FILESDIR}/chrome-manifest.json" "${BN}.json"
        sed -i "s/%SIZE%/${size}/" "${ED%/}/etc/opt/chrome/native-messaging-hosts/${BN}.json" || die "sed"

        insinto /etc/chromium/native-messaging-hosts
        newins "${FILESDIR}/chrome-manifest.json" "${BN}.json"
        sed -i "s/%SIZE%/${size}/" "${ED%/}/etc/chromium/native-messaging-hosts/${BN}.json" || die "sed"
}



files/firefox-manifest.json :
{
        "name": "net.downloadhelper.coapp",
        "description": "Video DownloadHelper companion app",
        "path": "/usr/bin/net.downloadhelper.coapp-linux-%SIZE%",
        "type": "stdio",
        "allowed_extensions": [
               
                       
                        "weh-native-test@downloadhelper.net"
               
                        ,
                        "{b9db16a4-6edc-47ec-a1f4-b86292ed211d}"
                ]
}


files/chrome-manifest.json :
{
        "name": "net.downloadhelper.coapp",
        "description": "Video DownloadHelper companion app",
        "path": "/usr/bin/net.downloadhelper.coapp-linux-%SIZE%",
        "type": "stdio",
        "allowed_origins": [
               
                       
                        "chrome-extension://ocgbelnknlgoiofcepicgpicjibclfdg/"
               
                        ,
                        "chrome-extension://lpheobkpibijgligoklmllibbbdhfghg/"
               
                        ,
                        "chrome-extension://amnobfikmbfolbaeeadnkcppghfdjeke/"
                ]
}

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
ryszardzonk
Apprentice
Apprentice


Joined: 18 Dec 2003
Posts: 225
Location: Rzeszów, POLAND

PostPosted: Thu May 03, 2018 7:43 am    Post subject: Reply with quote

Thank You!

First thing is I think you meant media-video/ffmpeg[amr...]. And is that one really required? I never used it so far. I mean I saw it in the libs bundle, but same way there was also openjpeg, ogg or xvid.

Here is slightly modified version with use flags for firefox/chrome.

Code:
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

BN="net.downloadhelper.coapp"
MY_PN="${PN/-bin/}"

DESCRIPTION="Companion application for Video DownloadHelper browser add-on"
HOMEPAGE="https://www.downloadhelper.net/"
SRC_URI="
        x86? ( https://github.com/mi-g/${MY_PN}/releases/download/v${PV}/${BN}-${PV}-1_i386.tar.gz )
        amd64? ( https://github.com/mi-g/${MY_PN}/releases/download/v${PV}/${BN}-${PV}-1_amd64.tar.gz )"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="chrome +firefox"

RDEPEND="
        dev-lang/orc
        media-video/ffmpeg[amr,mp3,opus,theora,vorbis,webp,x264,x265]
"
DEPEND="${RDEPEND}"

S="${WORKDIR}/${BN}-${PV}"

src_install() {
        local size
        if use x86; then
                size=32
        elif use amd64; then
                size=64
    else
        die "Ebuild only functions for x86 and amd64."
    fi

        dobin bin/${BN}-linux-${size}

        insinto /usr/share/"${MY_PN}"
        doins config.json

if use firefox; then
        insinto /usr/lib/mozilla/native-messaging-hosts/
        newins "${FILESDIR}/firefox-manifest.json" "${BN}.json"
        sed -i "s/%SIZE%/${size}/" "${ED%/}/usr/lib/mozilla/native-messaging-hosts/${BN}.json" || die "sed"
fi
is use chrome; then
        insinto /etc/opt/chrome/native-messaging-hosts
        newins "${FILESDIR}/chrome-manifest.json" "${BN}.json"
        sed -i "s/%SIZE%/${size}/" "${ED%/}/etc/opt/chrome/native-messaging-hosts/${BN}.json" || die "sed"

        insinto /etc/chromium/native-messaging-hosts
        newins "${FILESDIR}/chrome-manifest.json" "${BN}.json"
        sed -i "s/%SIZE%/${size}/" "${ED%/}/etc/chromium/native-messaging-hosts/${BN}.json" || die "sed"
fi
}

_________________
Sky is not the limit...
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19441
Location: here

PostPosted: Thu May 03, 2018 9:57 am    Post subject: Reply with quote

ryszardzonk wrote:
First thing is I think you meant media-video/ffmpeg[amr...]. And is that one really required? I never used it so far. I mean I saw it in the libs bundle, but same way there was also openjpeg, ogg or xvid.

When you download the binary package contains libraries libopencore-amrnb.so and libopencore-amrwb.so that are provided by media-libs/opencore-amr which in turn are used by ffmpeg[amr], then I think yes is required for something.

ryszardzonk wrote:
Here is slightly modified version with use flags for firefox/chrome.

Usually are not added esotics use flags and I prefer that all file are installed, but is your ebuild and you can add use flags you want :D
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum