mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Support generating i386 deb file.
This commit is contained in:
parent
dbbf310e36
commit
35c2ef09a0
@ -13,9 +13,15 @@ module.exports = (grunt) ->
|
|||||||
grunt.registerTask 'mkdeb', 'Create debian package', ->
|
grunt.registerTask 'mkdeb', 'Create debian package', ->
|
||||||
done = @async()
|
done = @async()
|
||||||
|
|
||||||
|
if process.arch is 'ia32'
|
||||||
|
arch = 'i386'
|
||||||
|
else if process.arch is 'x64'
|
||||||
|
arch = 'amd64'
|
||||||
|
else
|
||||||
|
return done("Unsupported arch #{process.arch}")
|
||||||
|
|
||||||
{name, version, description} = grunt.file.readJSON('package.json')
|
{name, version, description} = grunt.file.readJSON('package.json')
|
||||||
section = 'devel'
|
section = 'devel'
|
||||||
arch = 'amd64'
|
|
||||||
maintainer = 'GitHub <atom@github.com>'
|
maintainer = 'GitHub <atom@github.com>'
|
||||||
data = {name, version, description, section, arch, maintainer}
|
data = {name, version, description, section, arch, maintainer}
|
||||||
|
|
||||||
@ -27,5 +33,5 @@ module.exports = (grunt) ->
|
|||||||
buildDir = grunt.config.get('atom.buildDir')
|
buildDir = grunt.config.get('atom.buildDir')
|
||||||
|
|
||||||
cmd = path.join('script', 'mkdeb')
|
cmd = path.join('script', 'mkdeb')
|
||||||
args = [version, control, desktop, icon, buildDir]
|
args = [version, arch, control, desktop, icon, buildDir]
|
||||||
spawn({cmd, args}, done)
|
spawn({cmd, args}, done)
|
||||||
|
13
script/mkdeb
13
script/mkdeb
@ -8,14 +8,15 @@ ROOT=`readlink -f $(dirname $SCRIPT)/..`
|
|||||||
cd $ROOT
|
cd $ROOT
|
||||||
|
|
||||||
VERSION="$1"
|
VERSION="$1"
|
||||||
CONTROL_FILE="$2"
|
ARCH="$2"
|
||||||
DESKTOP_FILE="$3"
|
CONTROL_FILE="$3"
|
||||||
ICON_FILE="$4"
|
DESKTOP_FILE="$4"
|
||||||
DEB_PATH="$5"
|
ICON_FILE="$5"
|
||||||
|
DEB_PATH="$6"
|
||||||
|
|
||||||
TARGET_ROOT="`mktemp -d`"
|
TARGET_ROOT="`mktemp -d`"
|
||||||
chmod 755 "$TARGET_ROOT"
|
chmod 755 "$TARGET_ROOT"
|
||||||
TARGET="$TARGET_ROOT/atom-$VERSION-amd64"
|
TARGET="$TARGET_ROOT/atom-$VERSION-$ARCH"
|
||||||
|
|
||||||
mkdir -p "$TARGET/usr"
|
mkdir -p "$TARGET/usr"
|
||||||
env INSTALL_PREFIX="$TARGET/usr" script/grunt install
|
env INSTALL_PREFIX="$TARGET/usr" script/grunt install
|
||||||
@ -30,5 +31,5 @@ mkdir -p "$TARGET/usr/share/pixmaps"
|
|||||||
cp "$ICON_FILE" "$TARGET/usr/share/pixmaps"
|
cp "$ICON_FILE" "$TARGET/usr/share/pixmaps"
|
||||||
|
|
||||||
dpkg-deb -b "$TARGET"
|
dpkg-deb -b "$TARGET"
|
||||||
mv "$TARGET_ROOT/atom-$VERSION-amd64.deb" "$DEB_PATH"
|
mv "$TARGET_ROOT/atom-$VERSION-$ARCH.deb" "$DEB_PATH"
|
||||||
rm -rf $TARGET_ROOT
|
rm -rf $TARGET_ROOT
|
||||||
|
Loading…
Reference in New Issue
Block a user