[arch-commits] Commit in min/repos (5 files)

Nicola Squartini tensor5 at archlinux.org
Mon Oct 5 05:51:47 UTC 2020


    Date: Monday, October 5, 2020 @ 05:51:47
  Author: tensor5
Revision: 718687

archrelease: copy trunk to community-staging-any

Added:
  min/repos/community-staging-any/
  min/repos/community-staging-any/PKGBUILD
    (from rev 718686, min/trunk/PKGBUILD)
  min/repos/community-staging-any/icon.patch
    (from rev 718686, min/trunk/icon.patch)
  min/repos/community-staging-any/min.desktop
    (from rev 718686, min/trunk/min.desktop)
  min/repos/community-staging-any/min.js
    (from rev 718686, min/trunk/min.js)

-------------+
 PKGBUILD    |   80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 icon.patch  |   11 +++++++
 min.desktop |    9 ++++++
 min.js      |   29 +++++++++++++++++++++
 4 files changed, 129 insertions(+)

Copied: min/repos/community-staging-any/PKGBUILD (from rev 718686, min/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2020-10-05 05:51:47 UTC (rev 718687)
@@ -0,0 +1,80 @@
+# Maintainer: Nicola Squartini <tensor5 at gmail.com>
+
+pkgname=min
+pkgver=1.16.0
+_commit=0096da38545f9828a256ca6872eb91246132a5c3
+pkgrel=1
+pkgdesc='A smarter, faster web browser'
+arch=('any')
+url='https://minbrowser.github.io/min'
+license=('Apache')
+depends=('electron9')
+makedepends=('git' 'npm')
+source=("git+https://github.com/minbrowser/min.git#commit=${_commit}"
+        'min.desktop'
+        'min.js'
+        'icon.patch')
+sha256sums=('SKIP'
+            'a779a8daff1d684779ebc6d13ea4c2f09e838df018de41fa19fa3f25aa12e32f'
+            '75b2b763b69d61681fe083418fdc5ff49f8df727bfa90a1447aeda8c799c3188'
+            '573761590c84a5fa917d1082b4dd20b3cd193a51f0cc57110f5b5ef6966aba3c')
+
+prepare() {
+    cd ${pkgname}
+
+    patch -Np1 -i "${srcdir}"/icon.patch
+}
+
+build() {
+    cd ${pkgname}
+
+    npm install
+    npm run build
+    rm -r node_modules
+
+    npm install --production --no-optional
+}
+
+package() {
+    cd ${pkgname}
+
+    appdir=/usr/lib/${pkgname}
+
+    install -dm755 "${pkgdir}"${appdir}
+    cp -r * "${pkgdir}"${appdir}
+
+    install -dm755 "${pkgdir}"/usr/share/icons/hicolor/256x256/apps
+    mv icons/icon256.png \
+        "${pkgdir}"/usr/share/icons/hicolor/256x256/apps/${pkgname}.png
+
+    install -Dm755 "${srcdir}"/${pkgname}.js "${pkgdir}"/usr/bin/${pkgname}
+    install -Dm644 "${srcdir}"/${pkgname}.desktop \
+            "${pkgdir}"/usr/share/applications/${pkgname}.desktop
+
+    # Clean up
+    rm "${pkgdir}"${appdir}/dist/build.js
+    rm -r "${pkgdir}"${appdir}/icons
+    rm -r "${pkgdir}"${appdir}/localization
+    rm -r "${pkgdir}"${appdir}/main
+    rm -r "${pkgdir}"${appdir}/scripts
+    find "${pkgdir}"${appdir} \
+        -name "package.json" \
+            -exec sed -e "s|${srcdir}/${pkgname}|${appdir}|" \
+                -i {} \; \
+        -or -name ".*" -prune -exec rm -r '{}' \; \
+        -or -name "Gruntfile.js" -exec rm '{}' \; \
+        -or -name "Makefile" -exec rm '{}' \; \
+        -or -name "bin" -prune -exec rm -r '{}' \; \
+        -or -name "bin.js" -exec rm '{}' \; \
+        -or -name "bower.json" -exec rm '{}' \; \
+        -or -name "cli.js" -exec rm '{}' \; \
+        -or -name "cmd.js" -exec rm '{}' \; \
+        -or -name "coffee" -prune -exec rm -r '{}' \; \
+        -or -name "example" -prune -exec rm -r '{}' \; \
+        -or -name "examples" -prune -exec rm -r '{}' \; \
+        -or -name "gulpfile.js" -exec rm '{}' \; \
+        -or -name "man" -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 '{}' \;
+}

Copied: min/repos/community-staging-any/icon.patch (from rev 718686, min/trunk/icon.patch)
===================================================================
--- community-staging-any/icon.patch	                        (rev 0)
+++ community-staging-any/icon.patch	2020-10-05 05:51:47 UTC (rev 718687)
@@ -0,0 +1,11 @@
+--- a/main/main.js
++++ b/main/main.js
+@@ -174,7 +174,7 @@
+     minHeight: 350,
+     titleBarStyle: 'hidden',
+     trafficLightPosition: { x: 12, y: 19 },
+-    icon: __dirname + '/icons/icon256.png',
++    icon: '/usr/share/icons/hicolor/256x256/apps/min.png',
+     frame: process.platform === 'darwin' || settings.get('useSeparateTitlebar') === true,
+     alwaysOnTop: settings.get('windowAlwaysOnTop'),
+     backgroundColor: '#fff', // the value of this is ignored, but setting it seems to work around https://github.com/electron/electron/issues/10559

Copied: min/repos/community-staging-any/min.desktop (from rev 718686, min/trunk/min.desktop)
===================================================================
--- community-staging-any/min.desktop	                        (rev 0)
+++ community-staging-any/min.desktop	2020-10-05 05:51:47 UTC (rev 718687)
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Name=Min
+GenericName=Web Browser
+Comment=A smarter, faster web browser
+Icon=min
+Exec=min
+Categories=GTK;Network;WebBrowser;
+StartupNotify=true

Copied: min/repos/community-staging-any/min.js (from rev 718686, min/trunk/min.js)
===================================================================
--- community-staging-any/min.js	                        (rev 0)
+++ community-staging-any/min.js	2020-10-05 05:51:47 UTC (rev 718687)
@@ -0,0 +1,29 @@
+#!/usr/bin/electron9
+
+const name = 'min';
+
+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/electron9).
+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);



More information about the arch-commits mailing list