[arch-commits] Commit in (7 files)
Nicola Squartini
tensor5 at archlinux.org
Sat Oct 22 16:14:31 UTC 2016
Date: Saturday, October 22, 2016 @ 16:14:31
Author: tensor5
Revision: 192981
addpkg: min 1.5.0-1
Added:
min/
min/repos/
min/trunk/
min/trunk/PKGBUILD
min/trunk/icon.patch
min/trunk/min.desktop
min/trunk/min.js
-------------+
PKGBUILD | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
icon.patch | 12 +++++++++
min.desktop | 9 +++++++
min.js | 29 +++++++++++++++++++++++
4 files changed, 122 insertions(+)
Added: min/trunk/PKGBUILD
===================================================================
--- min/trunk/PKGBUILD (rev 0)
+++ min/trunk/PKGBUILD 2016-10-22 16:14:31 UTC (rev 192981)
@@ -0,0 +1,72 @@
+# $Id$
+# Maintainer: Nicola Squartini <tensor5 at gmail.com>
+
+pkgname=min
+pkgver=1.5.0
+pkgrel=1
+pkgdesc='A smarter, faster web browser'
+arch=('any')
+url='https://minbrowser.github.io/min'
+license=('Apache')
+depends=('electron')
+makedepends=('nodejs-grunt-cli' 'npm')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/minbrowser/min/archive/v${pkgver}.tar.gz"
+ 'min.desktop'
+ 'min.js'
+ 'icon.patch')
+sha256sums=('00735435e2d42eafcb07688d80da25b5f0d967e9a98053cef82e2d5f9e05929c'
+ 'a779a8daff1d684779ebc6d13ea4c2f09e838df018de41fa19fa3f25aa12e32f'
+ 'c22324184b72b3fad5a0aadb4e18182414e0294c5596c26426adc204fd473258'
+ 'f73d138d68f90e11a60128099b57eecb84a7d067e7f6883ff98924c5f4a61ea8')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+
+ patch -Np1 -i "${srcdir}"/icon.patch
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+
+ npm install grunt grunt-contrib-concat grunt-contrib-uglify
+ grunt
+ npm uninstall grunt grunt-contrib-concat grunt-contrib-uglify
+
+ npm install --production
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ 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,webview}.js
+ rm -r "${pkgdir}"${appdir}/icons
+ rm -r "${pkgdir}"${appdir}/main
+ find "${pkgdir}"${appdir} \
+ -name "package.json" \
+ -exec sed -e "s|${srcdir}/${pkgname}-${pkgver}|${appdir}|" \
+ -i {} \; \
+ -or -name ".*" -prune -exec rm -r '{}' \; \
+ -or -name "Gruntfile.js" -exec rm '{}' \; \
+ -or -name "Makefile" -exec rm '{}' \; \
+ -or -name "bower.json" -exec rm '{}' \; \
+ -or -name "cmd.js" -exec rm '{}' \; \
+ -or -name "coffee" -prune -exec rm -r '{}' \; \
+ -or -name "example" -prune -exec rm -r '{}' \; \
+ -or -name "gulpfile.js" -exec rm '{}' \; \
+ -or -name "test" -prune -exec rm -r '{}' \; \
+ -or -name "tests" -prune -exec rm -r '{}' \;
+}
Property changes on: min/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: min/trunk/icon.patch
===================================================================
--- min/trunk/icon.patch (rev 0)
+++ min/trunk/icon.patch 2016-10-22 16:14:31 UTC (rev 192981)
@@ -0,0 +1,12 @@
+--- a/main/main.js
++++ b/main/main.js
+@@ -78,8 +78,7 @@
+ y: bounds.y,
+ minWidth: 320,
+ minHeight: 500,
+- titleBarStyle: 'hidden-inset',
+- icon: __dirname + '/icons/icon256.png'
++ titleBarStyle: 'hidden-inset'
+ })
+
+ // and load the index.html of the app.
Added: min/trunk/min.desktop
===================================================================
--- min/trunk/min.desktop (rev 0)
+++ min/trunk/min.desktop 2016-10-22 16:14:31 UTC (rev 192981)
@@ -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
Added: min/trunk/min.js
===================================================================
--- min/trunk/min.js (rev 0)
+++ min/trunk/min.js 2016-10-22 16:14:31 UTC (rev 192981)
@@ -0,0 +1,29 @@
+#!/usr/bin/electron
+
+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/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);
More information about the arch-commits
mailing list