diff options
author | Cyano Hao | 2022-08-12 13:16:41 +0800 |
---|---|---|
committer | Cyano Hao | 2022-08-12 13:16:41 +0800 |
commit | 342ec6022b10ebb98d2da2c9ab169df0bc863cc3 (patch) | |
tree | 5a53f69a803d5b7663d616cb0819b2d131915f45 | |
download | aur-342ec6022b10ebb98d2da2c9ab169df0bc863cc3.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 70 | ||||
-rw-r--r-- | disable-updater.js | 19 | ||||
-rw-r--r-- | run_wow.export.sh | 3 | ||||
-rw-r--r-- | wow.export.desktop | 9 |
6 files changed, 132 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..59ce7a47e0ca --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = wow.export-git + pkgdesc = Extracting and converting World of Warcraft files + pkgver = 0.1.42.r78.g48c3bf0 + pkgrel = 1 + url = https://www.kruithne.net/wow.export/ + arch = x86_64 + license = MIT + makedepends = git + makedepends = nodejs-lts-gallium + makedepends = npm + makedepends = imagemagick + makedepends = blender + optdepends = blender: Advanced map/model importing + source = git+https://github.com/Kruithne/wow.export.git + source = disable-updater.js + source = wow.export.desktop + source = run_wow.export.sh + sha256sums = SKIP + sha256sums = df1c85ec9910f2fa5e423c786ee274a91bb5d5d751af0cc1d9657e39226896b7 + sha256sums = 0999c519bdeeb9038f9dae1164b8d953c8abf3e446b0d1af698f975553e558f9 + sha256sums = 8659e690ae3cc215035132b56795bded32fc81175829c421d8238086a703611c + +pkgname = wow.export-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..faf48e0a16b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# downloadable source +wow.export + +# build files +src/ +pkg/ +*.log +*.tar* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..726d42e94f0c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: Cyano Hao <c@cyano.cn> + +pkgname=wow.export-git +pkgver=0.1.42.r78.g48c3bf0 +pkgrel=1 +pkgdesc='Extracting and converting World of Warcraft files' +arch=('x86_64') + +url='https://www.kruithne.net/wow.export/' +license=('MIT') +# no runtime depends +optdepends=( + 'blender: Advanced map/model importing' +) +makedepends=( + 'git' + 'nodejs-lts-gallium' + 'npm' + 'imagemagick' + 'blender' +) +source=( + 'git+https://github.com/Kruithne/wow.export.git' + disable-updater.js + wow.export.desktop + run_wow.export.sh +) +sha256sums=('SKIP' + 'df1c85ec9910f2fa5e423c786ee274a91bb5d5d751af0cc1d9657e39226896b7' + '0999c519bdeeb9038f9dae1164b8d953c8abf3e446b0d1af698f975553e558f9' + '8659e690ae3cc215035132b56795bded32fc81175829c421d8238086a703611c') + +pkgver() { + cd wow.export/ + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + node disable-updater.js + mkdir -p wow.export/bin/linux-x64/ +} + +build() { + cd wow.export/ + npm install + node build.js linux-x64 +} + +package() { + install -Dm755 run_wow.export.sh "$pkgdir/usr/bin/wow.export" + install -Dm644 wow.export.desktop -t "$pkgdir/usr/share/applications/" + + cd "$srcdir"/wow.export/bin/linux-x64/ + mkdir -p "$pkgdir"/usr/lib/wow.export/ + cp -r -- * "$pkgdir"/usr/lib/wow.export/ + + cd "$srcdir"/wow.export/ + install -Dm644 resources/icon.png "$pkgdir/usr/share/icons/hicolor/128x128/apps/wow.export.png" + for size in 16 22 24 32 36 44 48 64 72 96; do + target="$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps" + mkdir -p $target + convert resources/icon.png -resize ${size}x${size} "$target/wow.export.png" + done + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + # blender add-on + _blender=$(blender -v | head -n1 | cut -f2 -d ' ' | grep -oE '^[0-9]+.[0-9]+') + install -Dm644 addons/blender/2.80/io_scene_wowobj/{__init__,import_wowobj}.py -t "$pkgdir/usr/share/blender/${_blender}/scripts/addons/io_scene_wowobj/" +} diff --git a/disable-updater.js b/disable-updater.js new file mode 100644 index 000000000000..2ba9a869fc5f --- /dev/null +++ b/disable-updater.js @@ -0,0 +1,19 @@ +'use strict'; + +const fs = require("fs"); + +const buildConfig = JSON.parse( + fs.readFileSync("wow.export/build.conf") +); + +for (const platformConfig of buildConfig.builds) { + if (platformConfig.name == "linux-x64") { + platformConfig.updater = undefined; + platformConfig.updateBundle = undefined; + } +} + +fs.writeFileSync( + "wow.export/build.conf", + JSON.stringify(buildConfig) +); diff --git a/run_wow.export.sh b/run_wow.export.sh new file mode 100644 index 000000000000..0cd64bd76536 --- /dev/null +++ b/run_wow.export.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +exec /usr/lib/wow.export/wow.export "$@" diff --git a/wow.export.desktop b/wow.export.desktop new file mode 100644 index 000000000000..c68dc2494dc4 --- /dev/null +++ b/wow.export.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=wow.export +Exec=/usr/lib/wow.export/wow.export %u +Terminal=false +Type=Application +Icon=wow.export +StartupWMClass=wow.export +Comment=Extracting and converting World of Warcraft files +Categories=Game; |