net.downloadhelper.coapp.noffmpeg.sh 1.23 KB
Newer Older
1 2 3 4 5 6 7 8
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCTDIR=/opt/vdhcoapp

. $(dirname $0)/common.sh

Vitaly Lipatov's avatar
Vitaly Lipatov committed
9 10 11 12
add_conflicts net.downloadhelper.coapp

add_unirequires /usr/bin/xdg-open
add_unirequires /usr/bin/ffmpeg /usr/bin/ffplay /usr/bin/ffprobe
13

14 15 16 17
# use xdg-open from the system
rm -v .$PRODUCTDIR/xdg-open
ln -s /usr/bin/xdg-open .$PRODUCTDIR/xdg-open

Vitaly Lipatov's avatar
Vitaly Lipatov committed
18
cat <<EOF | create_file /usr/lib64/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json
19 20 21 22 23 24 25 26 27 28 29 30
{
  "type": "stdio",
  "allowed_extensions": [
    "weh-native-test@downloadhelper.net",
    "{b9db16a4-6edc-47ec-a1f4-b86292ed211d}"
  ],
  "name": "net.downloadhelper.coapp",
  "description": "Video DownloadHelper companion app",
  "path": "$PRODUCTDIR/vdhcoapp"
}
EOF

Vitaly Lipatov's avatar
Vitaly Lipatov committed
31
cat <<EOF | create_file /etc/chromium/native-messaging-hosts/net.downloadhelper.coapp.json
32 33 34 35 36 37 38 39 40 41 42 43 44
{
  "type": "stdio",
  "allowed_origins": [
    "chrome-extension://lmjnegcaeklhafolokijcfjliaokphfk/",
    "chrome-extension://pfoiagbblcbmognbkekfpodpidedkmcc/",
    "chrome-extension://jmkaglaafmhbcpleggkmaliipiilhldn/",
    "chrome-extension://fojefjolbhfidomcaelhceoldmmpcaga/"
  ],
  "name": "net.downloadhelper.coapp",
  "description": "Video DownloadHelper companion app",
  "path": "$PRODUCTDIR/vdhcoapp"
}
EOF