diff options
author | xiota | 2024-03-27 12:26:20 +0000 |
---|---|---|
committer | xiota | 2024-03-27 12:32:09 +0000 |
commit | 265c6186b6696da1b35df6097dd900fc0e03a309 (patch) | |
tree | 32dcd0462bd2f37f346756bca9fe69f8d0f3c1c1 | |
parent | d7ce05d325516579e3ff3e52426348ad126a2d45 (diff) | |
download | aur-265c6186b6696da1b35df6097dd900fc0e03a309.tar.gz |
2.0.19
-rw-r--r-- | .SRCINFO | 43 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 155 | ||||
-rw-r--r-- | vdhcoapp-build.patch | 37 | ||||
-rw-r--r-- | vdhcoapp-install.hook | 10 | ||||
-rw-r--r-- | vdhcoapp-remove.hook | 9 | ||||
-rw-r--r-- | vdhcoapp.install | 14 | ||||
-rw-r--r-- | vdhcoapp.patch | 27 |
8 files changed, 164 insertions, 135 deletions
@@ -1,24 +1,31 @@ pkgbase = vdhcoapp pkgdesc = Companion application for Video DownloadHelper browser add-on - pkgver = 1.6.3 - pkgrel = 2 - url = https://github.com/mi-g/vdhcoapp + pkgver = 2.0.19 + pkgrel = 1 + url = https://github.com/aclap-dev/vdhcoapp + install = vdhcoapp.install arch = x86_64 - license = GPL2 - makedepends = gulp - makedepends = nodejs - makedepends = npm - depends = ffmpeg + license = GPL-2.0-or-later + makedepends = esbuild + makedepends = jq + makedepends = yq + makedepends = nvm + makedepends = cargo + makedepends = git + depends = at-spi2-core + depends = gdk-pixbuf2 + depends = gtk3 + depends = pango options = !strip - source = vdhcoapp-1.6.3.tar.gz::https://github.com/mi-g/vdhcoapp/archive/v1.6.3.tar.gz - source = vdhcoapp.patch - source = vdhcoapp-build.patch - source = vdhcoapp-install.hook - source = vdhcoapp-remove.hook - sha256sums = 0b15f1f623193cf6c09fb830e3f5db0a71a63586fa1cb5cb73bf1a819d7c2f55 - sha256sums = ab240d9d9fea27792d008eaffe14de5f798ced0938cc79351ed108185baf93a3 - sha256sums = 9866e599048cc63f4a09182f8539fe1ba39315c5e33a6e2df41c88efa895064d - sha256sums = 9f8cbe84b2543738390b70d770551259c6db2b67235b7792e9094908cecbc955 - sha256sums = 448ee36b350b6bcd304d33cf7638c13bda88d5086f2256e823d73ccc22e52ce0 + options = emptydirs + source = vdhcoapp-2.0.19.tar.gz::https://github.com/aclap-dev/vdhcoapp/archive/v2.0.19.tar.gz + source = vdhcoapp-filepicker::git+https://github.com/paulrouget/static-filepicker.git + sha256sums = 2fedba42f5d1f207c92938e99cd3fcf0af351820e88ab0df5fcbf7b68ae51d23 + sha256sums = SKIP pkgname = vdhcoapp + depends = at-spi2-core + depends = gdk-pixbuf2 + depends = gtk3 + depends = pango + depends = ffmpeg diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..018a3de08144 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!PKGBUILD +!.SRCINFO +!.gitignore @@ -1,52 +1,139 @@ -# Maintainer: Damien Guihal <dguihal@gmail.com> -# Maintainer: Rodrigo Bezerra <rodrigobezerra21 at gmail dot com> +# Maintainer: +# Contributor: Damien Guihal <dguihal@gmail.com> +# Contributor: Rodrigo Bezerra <rodrigobezerra21 at gmail dot com> -pkgname=vdhcoapp -pkgver=1.6.3 -pkgrel=2 +_pkgname="vdhcoapp" +pkgname="$_pkgname" +pkgver=2.0.19 +pkgrel=1 pkgdesc="Companion application for Video DownloadHelper browser add-on" +url="https://github.com/aclap-dev/vdhcoapp" +license=('GPL-2.0-or-later') arch=('x86_64') -url="https://github.com/mi-g/vdhcoapp" -license=('GPL2') -depends=('ffmpeg') -makedepends=('gulp' 'nodejs' 'npm') -options=(!strip) -source=($pkgname-$pkgver.tar.gz::https://github.com/mi-g/vdhcoapp/archive/v${pkgver}.tar.gz - vdhcoapp.patch - vdhcoapp-build.patch - vdhcoapp-install.hook - vdhcoapp-remove.hook) -sha256sums=('0b15f1f623193cf6c09fb830e3f5db0a71a63586fa1cb5cb73bf1a819d7c2f55' - 'ab240d9d9fea27792d008eaffe14de5f798ced0938cc79351ed108185baf93a3' - '9866e599048cc63f4a09182f8539fe1ba39315c5e33a6e2df41c88efa895064d' - '9f8cbe84b2543738390b70d770551259c6db2b67235b7792e9094908cecbc955' - '448ee36b350b6bcd304d33cf7638c13bda88d5086f2256e823d73ccc22e52ce0') + +makedepends=( + 'esbuild' + 'jq' + 'yq' + + # AUR + 'nvm' +) + +options=(!strip emptydirs) +install="$_pkgname.install" + +_pkgsrc="$_pkgname-$pkgver" +_pkgext="tar.gz" +source+=("$_pkgsrc.$_pkgext"::"$url/archive/v$pkgver.$_pkgext") +sha256sums+=('2fedba42f5d1f207c92938e99cd3fcf0af351820e88ab0df5fcbf7b68ae51d23') + +# filepicker +depends+=( + 'at-spi2-core' + 'gdk-pixbuf2' + 'gtk3' + 'pango' +) +makedepends+=( + 'cargo' + 'git' +) + +_filepicker_url="https://github.com/paulrouget/static-filepicker" +_filepicker_pkgsrc="vdhcoapp-filepicker" +source+=("$_filepicker_pkgsrc"::"git+$_filepicker_url.git") +sha256sums+=('SKIP') + +_filepicker_prepare() { + export CARGO_HOME="${CARGO_HOME:-$SRCDEST/cargo-home}" + export RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN:-stable} + export CARGO_TARGET_DIR=target + + cd "$srcdir/$_filepicker_pkgsrc" + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" +} + +_filepicker_build() { + cd "$srcdir/$_filepicker_pkgsrc" + cargo build --frozen --release --all-features +} + +_filepicker_package() { + install -Dm755 "$srcdir/$_filepicker_pkgsrc/$CARGO_TARGET_DIR/release/filepicker" -t "$pkgdir/usr/bin/" +} prepare() { - cd ${pkgname}-${pkgver} + cd "$_pkgsrc" + mv -f app/* . + + # create config.json + tomlq . ./config.toml \ + | jq '.target.os = "linux"' \ + | jq '.target.arch = "amd64"' \ + > src/config.json + + # fix path to config.json + sed -E -i src/main.js src/native-autoinstall.js \ + -e 's&^(const config = require\('\'')(config.json'\''\);)$&\1./\2&' - patch -Np2 -i "${srcdir}/vdhcoapp.patch" - patch -N -i "${srcdir}/vdhcoapp-build.patch" + _filepicker_prepare } build() { - cd "${pkgname}-${pkgver}" + : ${_nodeversion:=18} + + export HOME="$srcdir/node-home" + export NVM_DIR="${SRCDEST:-${startdir:-$srcdir}}/node-nvm" + + # set up nvm + source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]] + nvm install $_nodeversion + nvm use $_nodeversion + + # build + cd "$_pkgsrc" - npm install + npm install --no-package-lock --no-audit --no-fund --prefer-offline + npm install pkg --no-package-lock --no-audit --no-fund --prefer-offline - gulp + local _esbuild_options=( + src/main.js + --target=esnext + "--banner:js=const _importMetaUrl=require('url').pathToFileURL(__filename)" + "--define:import.meta.url=_importMetaUrl" + --format=cjs + --bundle + --platform=node + --tree-shaking=true + --alias:electron=electron2 + --outfile=bundled.js + ) + + esbuild "${_esbuild_options[@]}" + + local _pkg_options=( + bundled.js + --target "node$_nodeversion-linux-x64" + --output vdhcoapp + ) + + ./node_modules/.bin/pkg "${_pkg_options[@]}" + + _filepicker_build } package() { - cd "${pkgname}-${pkgver}" + depends+=('ffmpeg') + + cd "$_pkgsrc" - install -Dm755 bin/net.downloadhelper.coapp-* "${pkgdir}/usr/bin/vdhcoapp" - install -Dm644 config.json "${pkgdir}/usr/share/vdhcoapp/config.json" + install -Dm755 vdhcoapp -t "$pkgdir/usr/bin/" - install -dm755 "${pkgdir}/usr/lib/mozilla/native-messaging-hosts/" - install -dm755 "${pkgdir}/etc/opt/chrome/native-messaging-hosts/" - install -dm755 "${pkgdir}/etc/chromium/native-messaging-hosts/" + install -dm755 "$pkgdir/usr/lib/mozilla/native-messaging-hosts/" + install -dm755 "$pkgdir/etc/opt/chrome/native-messaging-hosts/" + install -dm755 "$pkgdir/etc/chromium/native-messaging-hosts/" + install -dm755 "$pkgdir/etc/opt/edge/native-messaging-hosts/" - install -Dm644 "${srcdir}/vdhcoapp-install.hook" "${pkgdir}/usr/share/libalpm/hooks/vdhcoapp-install.hook" - install -Dm644 "${srcdir}/vdhcoapp-remove.hook" "${pkgdir}/usr/share/libalpm/hooks/vdhcoapp-remove.hook" + _filepicker_package } diff --git a/vdhcoapp-build.patch b/vdhcoapp-build.patch deleted file mode 100644 index 1b18ad8d6026..000000000000 --- a/vdhcoapp-build.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/config.json b/config.json -index 3e3c404..dbedcbe 100755 ---- a/config.json -+++ b/config.json -@@ -2,8 +2,8 @@ - "id": "net.downloadhelper.coapp", - "name": "VdhCoApp", - "description": "Video DownloadHelper companion app", -- "node_major": 12, -- "node_version": "12.16.1", -+ "node_major": 16, -+ "node_version": "16.16.0", - "extra": [{ - "source": "converter/build/${platform}/${arch}/" - },{ -diff --git a/package.json b/package.json -index 6223d76..896ffde 100755 ---- a/package.json -+++ b/package.json -@@ -30,7 +30,7 @@ - "gulp-if": "^2.0.2", - "gulp-rename": "^1.2.2", - "gulp-tar": "^2.0.0", -- "pkg": "^4.3.8", -+ "pkg": "^5.8.0", - "run-sequence": "^2.2.1", - "which": "^1.3.0", - "yargs": "^16.1.0" -@@ -46,7 +46,7 @@ - "got": "^11.8.2", - "log4js": "^6.3.0", - "opn": "^5.3.0", -- "pkg-fetch": "^2.6.9", -+ "pkg-fetch": "^3.4.2", - "tmp": "0.0.33", - "vinyl-fs": "^3.0.2" - } diff --git a/vdhcoapp-install.hook b/vdhcoapp-install.hook deleted file mode 100644 index 07ac5c712a5a..000000000000 --- a/vdhcoapp-install.hook +++ /dev/null @@ -1,10 +0,0 @@ -[Trigger] -Operation = Install -Operation = Upgrade -Type = Package -Target = vdhcoapp - -[Action] -Description = Installing JSON configuration file ... -When = PostTransaction -Exec = /usr/bin/vdhcoapp install --system diff --git a/vdhcoapp-remove.hook b/vdhcoapp-remove.hook deleted file mode 100644 index ed92db9c712b..000000000000 --- a/vdhcoapp-remove.hook +++ /dev/null @@ -1,9 +0,0 @@ -[Trigger] -Operation = Remove -Type = Package -Target = vdhcoapp - -[Action] -Description = Uninstalling JSON configuration file ... -When = PreTransaction -Exec = /usr/bin/vdhcoapp uninstall --system diff --git a/vdhcoapp.install b/vdhcoapp.install new file mode 100644 index 000000000000..847fee93b73b --- /dev/null +++ b/vdhcoapp.install @@ -0,0 +1,14 @@ +post_install() { + echo "vdhcoapp: system install" + vdhcoapp install --system +} + +post_upgrade() { + echo "vdhcoapp: system install" + vdhcoapp install --system +} + +pre_remove() { + echo "vdhcoapp: system uninstall" + vdhcoapp uninstall --system +} diff --git a/vdhcoapp.patch b/vdhcoapp.patch deleted file mode 100644 index 8c5a2c647953..000000000000 --- a/vdhcoapp.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -ura package.orig/vdhcoapp-1.1.2/app/converter.js package.new/vdhcoapp-1.1.2/app/converter.js ---- package.orig/vdhcoapp-1.1.2/app/converter.js 2017-11-14 08:35:27.000000000 -0300 -+++ package.new/vdhcoapp-1.1.2/app/converter.js 2017-11-16 16:46:57.183615000 -0300 -@@ -44,7 +44,7 @@ - else - throw new Error("Unsupported architecture",process.arch); - --const binaryDir = path.join(path.dirname(process.execPath),"..","converter","build",platform,arch); -+const binaryDir = platform == "linux" ? "/usr/bin" : path.join(path.dirname(process.execPath),"..","converter","build",platform,arch); - const binaryPath = path.join(binaryDir,"ffmpeg"); - const probeBinaryPath = path.join(binaryDir,"ffprobe"); - const playBinaryPath = path.join(binaryDir,"ffplay"); -diff -ura package.orig/vdhcoapp-1.1.2/app/native-autoinstall.js package.new/vdhcoapp-1.1.2/app/native-autoinstall.js ---- package.orig/vdhcoapp-1.1.2/app/native-autoinstall.js 2017-11-14 08:35:27.000000000 -0300 -+++ package.new/vdhcoapp-1.1.2/app/native-autoinstall.js 2017-11-16 17:36:30.888842000 -0300 -@@ -72,7 +72,10 @@ - mode = "system"; - var config; - try { -- config = JSON.parse(fs.readFileSync(path.resolve(path.dirname(process.execPath),"../config.json"),"utf8")); -+ if(process.platform == "linux") -+ config = JSON.parse(fs.readFileSync(path.resolve(path.dirname(process.execPath),"../share/vdhcoapp/config.json"),"utf8")); -+ else -+ config = JSON.parse(fs.readFileSync(path.resolve(path.dirname(process.execPath),"../config.json"),"utf8")); - } catch(err) { - DisplayMessage("Cannot read config file: "+err.message,"Error"); - process.exit(-1); |