Created
March 11, 2019 14:33
-
-
Save 314eter/6cb0a0d81a4c632c4339adc6ce95b7dd to your computer and use it in GitHub Desktop.
fx_cast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- app/bin/build.js | |
+++ app/bin/build.js | |
@@ -90,7 +90,8 @@ | |
}); | |
// Move tsc output to build dir | |
- fs.moveSync(path.join(BUILD_PATH, "src"), BUILD_PATH); | |
+ fs.copySync(path.join(BUILD_PATH, "src"), BUILD_PATH); | |
+ fs.removeSync(path.join(BUILD_PATH, "src")); | |
// Copy other files | |
fs.copySync(SRC_PATH, BUILD_PATH, { | |
@@ -156,7 +157,7 @@ | |
// Run pkg to create a single executable | |
await pkg.exec([ | |
BUILD_PATH | |
- , "--target", `${pkgPlatform[argv.platform]}-${argv.arch}` | |
+ , "--target", `node10-${pkgPlatform[argv.platform]}-${argv.arch}` | |
, "--output", path.join(BUILD_PATH, executableName[argv.platform]) | |
]); | |
--- ext/bin/build.js | |
+++ ext/bin/build.js | |
@@ -31,11 +31,6 @@ | |
process.exit(1); | |
} | |
-// If packaging, use production mode | |
-if (argv.package) { | |
- argv.mode = "production"; | |
-} | |
- | |
// Import webpack config and specify env values | |
const webpackConfig = require(`${ROOT}/webpack.config.js`)({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgname=fx_cast | |
pkgver=0.0.2 | |
pkgrel=1 | |
pkgdesc="Implementation of the Chrome Sender API (Chromecast) within Firefox" | |
arch=('x86_64') | |
url="https://hensm.github.io/fx_cast/" | |
license=('MIT') | |
depends=('nodejs') | |
makedepends=('npm') | |
source=( | |
"https://github.com/hensm/$pkgname/archive/v$pkgver.tar.gz" | |
"fx_cast.patch" | |
) | |
noextract=("$pkgname-$pkgver-fx.xpi") | |
sha256sums=('73e4c5849959a5479606547b410a1e83de26080ac22f896861118f3031182a39' | |
'afef3da814ae66faa98892b6bc0a82416a005b1a4dfe730684d208f38ceb5946') | |
prepare() { | |
cd "$pkgname-$pkgver" | |
patch -p0 -i "$srcdir/fx_cast.patch" | |
} | |
build() { | |
cd "$pkgname-$pkgver" | |
npm install | |
npm run build:app | |
npm run package:ext | |
sed -i 's#"path": ".*"#"path": "/usr/bin/fx_cast_bridge"#' dist/app/fx_cast_bridge.json | |
} | |
package() { | |
cd "$pkgname-$pkgver" | |
install -Dm755 dist/app/bridge "$pkgdir/usr/bin/fx_cast_bridge" | |
install -Dm644 dist/app/fx_cast_bridge.json -t "$pkgdir/usr/lib/mozilla/native-messaging-hosts/" | |
install -Dm644 "dist/ext/$pkgname-$pkgver.xpi" "$pkgdir/usr/lib/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/fx_cast@matt.tf.xpi" | |
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment