diff options
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 42 | ||||
-rw-r--r-- | build-x64.js | 34 | ||||
-rw-r--r-- | build-x86.js | 34 | ||||
-rwxr-xr-x | insteadman.desktop | 13 |
5 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a5a1297d84bd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = insteadman + pkgdesc = Manager for INSTEAD interpreter. + pkgver = 2.1.0 + pkgrel = 1 + url = https://github.com/jhekasoft/insteadman + arch = i686 + arch = x86_64 + license = MIT + makedepends = npm + makedepends = nodejs + depends = instead + source = https://github.com/jhekasoft/insteadman/archive/v2.1.0.tar.gz + source = build-x86.js + source = build-x64.js + source = insteadman.desktop + sha256sums = b582bce4188ff4c98bd90484422599407073e9fced21c1bc988c6a01959d741d + sha256sums = a041a851218b1e8a769becff26e5ec6ba5b4b5021c6463977f03b997c576ddb9 + sha256sums = efef590ba7d432cc74ea03315ba9f363ac15fb58f9d324ae0d25e6df4bffe041 + sha256sums = 90d7d51b416ae51bdd8091fd12fef953e67f6c951f714a19ce954d39ddfecee7 + +pkgname = insteadman + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1a7118d25422 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Boris Timofeev <btimofeev@emunix.org> +pkgname=insteadman +pkgver=2.1.0 +pkgrel=1 +pkgdesc="Manager for INSTEAD interpreter." +arch=('i686' 'x86_64') +url="https://github.com/jhekasoft/insteadman" +license=('MIT') +depends=('instead') +makedepends=('npm' 'nodejs') +source=("https://github.com/jhekasoft/insteadman/archive/v$pkgver.tar.gz" + "build-x86.js" + "build-x64.js" + "insteadman.desktop") +sha256sums=('b582bce4188ff4c98bd90484422599407073e9fced21c1bc988c6a01959d741d' + 'a041a851218b1e8a769becff26e5ec6ba5b4b5021c6463977f03b997c576ddb9' + 'efef590ba7d432cc74ea03315ba9f363ac15fb58f9d324ae0d25e6df4bffe041' + '90d7d51b416ae51bdd8091fd12fef953e67f6c951f714a19ce954d39ddfecee7') + +build() { + cp build-x86.js build-x64.js $srcdir/$pkgname-$pkgver/src + cd $srcdir/$pkgname-$pkgver/src + npm install + [[ $CARCH == "i686" ]] && node build-x86.js + [[ $CARCH == "x86_64" ]] && node build-x64.js +} + +package() { + install -D -m644 insteadman.desktop $pkgdir/usr/share/applications/insteadman.desktop + [[ $CARCH == "i686" ]] && cd $srcdir/$pkgname-$pkgver/build/dist/InsteadMan-linux-x86 + [[ $CARCH == "x86_64" ]] && cd $srcdir/$pkgname-$pkgver/build/dist/InsteadMan-linux-x64 + mkdir -p $pkgdir/opt/$pkgname + mkdir -p $pkgdir/usr/bin + cp -R * $pkgdir/opt/$pkgname/ + ln -s /opt/$pkgname/insteadman $pkgdir/usr/bin/insteadman + + find $pkgdir/opt/$pkgname -type d -print0 | xargs -0 chmod 755 + find $pkgdir/opt/$pkgmane -type f -print0 | xargs -0 chmod 644 + chmod 755 $pkgdir/opt/$pkgname/insteadman +} + +# vim:set ts=2 sw=2 et: diff --git a/build-x64.js b/build-x64.js new file mode 100644 index 000000000000..0c74395d30f8 --- /dev/null +++ b/build-x64.js @@ -0,0 +1,34 @@ +const nwjsBuilder = require('nwjs-builder-phoenix'); +const fs = require('fs-extra'); + +const builder = new nwjsBuilder.Builder({ + tasks: ['linux-x64'], + mute: false +}, "."); + +// Build returns a promise +builder.build().then(function () { + const buildDir = '../build' + const distDir = buildDir + '/dist'; + const appName = 'InsteadMan'; + const linux = 'linux'; + const x64 = 'x64'; + + console.log('GNU/Linux changes...'); + const gnulinInsteadManPathes = { + '64': distDir + '/' + appName + '-' + linux + '-' + x64 + '/' + }; + const gnulinBuildPath = buildDir + '/' + linux + '/'; + + for (let platform in gnulinInsteadManPathes) { + fs.renameSync(gnulinInsteadManPathes[platform] + appName, gnulinInsteadManPathes[platform] + appName.toLowerCase()); + fs.copySync(gnulinBuildPath + 'icon.png', gnulinInsteadManPathes[platform] + 'icon.png'); + fs.copySync(gnulinBuildPath + 'createdesktopfile', gnulinInsteadManPathes[platform] + 'createdesktopfile'); + fs.copySync(gnulinBuildPath + 'README', gnulinInsteadManPathes[platform] + 'README'); + } + console.log('GNU/Linux changes done.'); + + console.log('All done!'); +}).catch(function (error) { + console.error(error); +}); diff --git a/build-x86.js b/build-x86.js new file mode 100644 index 000000000000..fe98cfbafc54 --- /dev/null +++ b/build-x86.js @@ -0,0 +1,34 @@ +const nwjsBuilder = require('nwjs-builder-phoenix'); +const fs = require('fs-extra'); + +const builder = new nwjsBuilder.Builder({ + tasks: ['linux-x86'], + mute: false +}, "."); + +// Build returns a promise +builder.build().then(function () { + const buildDir = '../build' + const distDir = buildDir + '/dist'; + const appName = 'InsteadMan'; + const linux = 'linux'; + const x86 = 'x86'; + + console.log('GNU/Linux changes...'); + const gnulinInsteadManPathes = { + '86': distDir + '/' + appName + '-' + linux + '-' + x86 + '/' + }; + const gnulinBuildPath = buildDir + '/' + linux + '/'; + + for (let platform in gnulinInsteadManPathes) { + fs.renameSync(gnulinInsteadManPathes[platform] + appName, gnulinInsteadManPathes[platform] + appName.toLowerCase()); + fs.copySync(gnulinBuildPath + 'icon.png', gnulinInsteadManPathes[platform] + 'icon.png'); + fs.copySync(gnulinBuildPath + 'createdesktopfile', gnulinInsteadManPathes[platform] + 'createdesktopfile'); + fs.copySync(gnulinBuildPath + 'README', gnulinInsteadManPathes[platform] + 'README'); + } + console.log('GNU/Linux changes done.'); + + console.log('All done!'); +}).catch(function (error) { + console.error(error); +}); diff --git a/insteadman.desktop b/insteadman.desktop new file mode 100755 index 000000000000..a7a7fa3da8fe --- /dev/null +++ b/insteadman.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Version=1.0 +Name=InsteadMan +Name[ru]=InsteadMan +Name[uk]=InsteadMan +Comment=INSTEAD Manager +Comment[ru]=INSTEAD менеджер +Comment[uk]=INSTEAD менеджер +Exec=/opt/insteadman/insteadman +Icon=/opt/insteadman/icon.png +Terminal=false +Type=Application +Categories=Application;Game; |