Date: Thursday, February 22, 2018 @ 17:53:28
  Author: tensor5
Revision: 297092

archrelease: copy trunk to community-staging-x86_64

Added:
  messengerfordesktop/repos/community-staging-x86_64/
  messengerfordesktop/repos/community-staging-x86_64/PKGBUILD
    (from rev 297091, messengerfordesktop/trunk/PKGBUILD)
  messengerfordesktop/repos/community-staging-x86_64/messengerfordesktop.js
    (from rev 297091, messengerfordesktop/trunk/messengerfordesktop.js)
  messengerfordesktop/repos/community-staging-x86_64/use-system-electron.patch
    (from rev 297091, messengerfordesktop/trunk/use-system-electron.patch)

---------------------------+
 PKGBUILD                  |  102 ++++++++++++++++++++++++++++++++++++++++++++
 messengerfordesktop.js    |   29 ++++++++++++
 use-system-electron.patch |   28 ++++++++++++
 3 files changed, 159 insertions(+)

Copied: messengerfordesktop/repos/community-staging-x86_64/PKGBUILD (from rev 
297091, messengerfordesktop/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2018-02-22 17:53:28 UTC (rev 297092)
@@ -0,0 +1,102 @@
+# $Id$
+# Maintainer: Nicola Squartini <tens...@gmail.com>
+
+pkgname=messengerfordesktop
+pkgver=2.0.9+42+g4e4d6f1
+pkgrel=5
+_commit=4e4d6f1fd4bf3b8c0fa48ed6459efda9c4064461
+pkgdesc='A simple & beautiful desktop client for Facebook Messenger'
+arch=('x86_64')
+url='https://messengerfordesktop.com/'
+license=('MIT')
+depends=('electron')
+makedepends=('apm' 'git' 'npm')
+options=(!emptydirs)
+source=("git+https://github.com/Aluxian/Messenger-for-Desktop#commit=${_commit}";
+        "${pkgname}.js"
+        'use-system-electron.patch')
+sha256sums=('SKIP'
+            '55e6da47ddbf383fc8a6ef6e0aae5621b7800c8efe46422c1c352d6c029c1f45'
+            '014ef8a03e38d4e5c5cab49cb6a2e9fbf81de9aecbfc66aeadf124844a541a66')
+
+if [ "${CARCH}" == 'i686' ]; then
+    _target=linux32
+else
+    _target=linux64
+fi
+
+pkgver() {
+    cd Messenger-for-Desktop
+
+    git describe --tags | sed 's/-/+/g;s/v//'
+}
+
+prepare() {
+    cd Messenger-for-Desktop
+    
+    patch -Np1 -i "${srcdir}"/use-system-electron.patch
+    sed -e 's|/opt/{{ name }}/||' \
+        -i resources/linux/app.desktop \
+        -i resources/linux/startup.desktop
+    sed -e "s|'updates-auto-check': true|'updates-auto-check': false|" \
+        -i src/scripts/browser/utils/prefs-defaults.js
+}
+
+build() {
+    cd Messenger-for-Desktop
+    
+    npm install
+    cd src
+    ATOM_HOME="${PWD}" apm install --production
+    cd ..
+
+    ./node_modules/.bin/gulp build:${_target}
+}
+
+package() {
+    cd Messenger-for-Desktop
+
+    appdir=/usr/lib/${pkgname}
+
+    install -dm755 "${pkgdir}"${appdir}
+    cp -r build/${_target}/opt/${pkgname}/resources/app/* "${pkgdir}"${appdir}
+
+    cp -r build/${_target}/usr/share "${pkgdir}"/usr
+
+    install -Dm755 "${srcdir}"/${pkgname}.js "${pkgdir}"/usr/bin/${pkgname}
+
+    install -Dm644 -t "${pkgdir}"/usr/share/licenses/${pkgname} LICENSE.md
+
+    # Clean up
+    find "${pkgdir}"${appdir}/node_modules \
+        -name 'package.json' \
+            -exec sed -e 
"s|${srcdir}/Messenger-for-Desktop-${pkgver}/src|${appdir}|" \
+                -i {} \; \
+        -or -name '.*' -prune -exec rm -r '{}' \; \
+        -or -name '*.a' -exec rm '{}' \; \
+        -or -name '*.cc' -exec rm '{}' \; \
+        -or -name '*.h' -exec rm '{}' \; \
+        -or -name '*.gyp' -exec rm '{}' \; \
+        -or -name '*.gypi' -exec rm '{}' \; \
+        -or -name '*.Makefile' -exec rm '{}' \; \
+        -or -name '*.mk' -exec rm '{}' \; \
+        -or -name '*.mm' -exec rm '{}' \; \
+        -or -name 'appveyor.yml' -exec rm '{}' \; \
+        -or -name 'benchmark' -prune -exec rm -r '{}' \; \
+        -or -name 'bin' -prune -exec rm -r '{}' \; \
+        -or -name 'bin.js' -exec rm '{}' \; \
+        -or -name 'build.js' -exec rm '{}' \; \
+        -or -name 'cli.js' -exec rm '{}' \; \
+        -or -name 'deps' -prune -exec rm -r '{}' \; \
+        -or -name 'doc' -prune -exec rm -r '{}' \; \
+        -or -name 'docs' -prune -exec rm -r '{}' \; \
+        -or -name 'example' -prune -exec rm -r '{}' \; \
+        -or -name 'examples' -prune -exec rm -r '{}' \; \
+        -or -name 'hunspell' -prune -exec rm -r '{}' \; \
+        -or -name 'Makefile' -exec rm '{}' \; \
+        -or -name 'obj.target' -prune -exec rm -r '{}' \; \
+        -or -name 'scripts' -prune -exec rm -r '{}' \; \
+        -or -name 'test' -prune -exec rm -r '{}' \; \
+        -or -name 'tests' -prune -exec rm -r '{}' \; \
+        -or -name 'tools' -prune -exec rm -r '{}' \;
+}

Copied: 
messengerfordesktop/repos/community-staging-x86_64/messengerfordesktop.js (from 
rev 297091, messengerfordesktop/trunk/messengerfordesktop.js)
===================================================================
--- community-staging-x86_64/messengerfordesktop.js                             
(rev 0)
+++ community-staging-x86_64/messengerfordesktop.js     2018-02-22 17:53:28 UTC 
(rev 297092)
@@ -0,0 +1,29 @@
+#!/usr/bin/electron
+
+const name = 'messengerfordesktop';
+
+const {app} = require('electron');
+const fs = require('fs');
+const path = require('path');
+
+// Change command name.
+const fd = fs.openSync('/proc/self/comm', fs.constants.O_WRONLY);
+fs.writeSync(fd, name);
+fs.closeSync(fd);
+
+// Remove first command line argument (/usr/bin/electron).
+process.argv.splice(0, 1);
+
+// Set application paths.
+const appPath = path.join(path.dirname(__dirname), 'lib', name);
+const packageJson = require(path.join(appPath, 'package.json'));
+const productName = packageJson.productName;
+app.setAppPath(appPath);
+app.setDesktopName(name + '.desktop');
+app.setName(productName);
+app.setPath('userCache', path.join(app.getPath('cache'), productName));
+app.setPath('userData', path.join(app.getPath('appData'), productName));
+app.setVersion(packageJson.version);
+
+// Run the application.
+require('module')._load(appPath, module, true);

Copied: 
messengerfordesktop/repos/community-staging-x86_64/use-system-electron.patch 
(from rev 297091, messengerfordesktop/trunk/use-system-electron.patch)
===================================================================
--- community-staging-x86_64/use-system-electron.patch                          
(rev 0)
+++ community-staging-x86_64/use-system-electron.patch  2018-02-22 17:53:28 UTC 
(rev 297092)
@@ -0,0 +1,28 @@
+--- a/tasks/build.coffee
++++ b/tasks/build.coffee
+@@ -74,14 +74,6 @@
+ ['linux32', 'linux64'].forEach (dist) ->
+   gulp.task 'build:' + dist, ['resources:linux', 'compile:' + dist, 
'clean:build:' + dist, 'changelog:linux'], (done) ->
+     async.series [
+-      # Rename the executable
+-      (callback) ->
+-        exeDir = './build/' + dist + '/opt/' + manifest.name + '/'
+-        fromPath = exeDir + 'electron'
+-        toPath = exeDir + manifest.name
+-
+-        fs.rename fromPath, toPath, utils.log callback, fromPath, '=>', toPath
+-
+       # Move the app's .desktop file
+       (callback) ->
+         fromPath = './build/resources/linux/app.desktop'
+--- a/tasks/clean.coffee
++++ b/tasks/clean.coffee
+@@ -15,7 +15,7 @@
+ 
+ # Remove the default_app folder inside the linux builds
+ ['linux32', 'linux64'].forEach (dist) ->
+-  gulp.task 'clean:build:' + dist, ['download:' + dist], ->
++  gulp.task 'clean:build:' + dist, ->
+     del './build/' + dist + '/opt/' + manifest.name + 
'/resources/default_app.asar'
+       .then (result) -> console.log result
+ 

Reply via email to