Skip to content

Instantly share code, notes, and snippets.

@314eter 314eter/PKGBUILD
Created Mar 11, 2019

Embed
What would you like to do?
fx_cast
--- 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`)({
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
You can’t perform that action at this time.