Skip to content
This repository has been archived by the owner on Aug 5, 2018. It is now read-only.

Commit

Permalink
Added debArch option
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann Behr committed May 19, 2018
1 parent ea9ab45 commit 22647cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ pak.debian({
| dist | Path to `dist/electron-<theme used, default: mat>` folder |
| distArch _Optional_ | Architecture of Quasar build. Default: "x64" |
| dest | Path to dir where deb file be located |
| debArch _Optional_ | Architecture of deb file. Default: "amd64" |
| filename | name of the deb file, _Add `.deb` to the filename by yourself_ |
6 changes: 4 additions & 2 deletions lib/debian.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ module.exports = function (params) {
)

// Set control file
let debArch = params.debArch || 'amd64'
let controlContent = [
'Package: ' + params.package.name,
'Version: ' + params.package.version,
'Section: base',
'Priority: optional',
'Architecture: amd64',
`Architecture: ${debArch}`,
'Maintainer: ' + params.package.author,
'Description: ' + params.package.description
].join('\n') + '\n'
Expand All @@ -78,7 +79,8 @@ module.exports = function (params) {
fs.writeFileSync(desktopFilePath, desktopentryContent)

// Create .deb file
let debName = params.filename || params.package.name + '_' + params.package.version + '_amd64.deb'
// let debName = params.filename || params.package.name + '_' + params.package.version + '_' + debArch + '.deb'
let debName = params.filename || `${params.package.name}_${params.package.version}_${debArch}.deb`
let dest = path.join(helper.mkpath(params.dest), debName)
let debBuildCommand = 'dpkg-deb --verbose --build ' + temp + ' ' + dest
shell.exec(debBuildCommand)
Expand Down

0 comments on commit 22647cd

Please sign in to comment.