mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Merge pull request #14 from vector-im/dbkr/debcontrol
Use a custom control file for the Debian package
This commit is contained in:
commit
39c6db4063
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
/packages
|
||||
/deploys
|
||||
/node_modules
|
||||
/pkg/control
|
||||
|
@ -65,7 +65,10 @@
|
||||
}
|
||||
},
|
||||
"deb": {
|
||||
"afterInstall": "build/linux/after-install.tpl"
|
||||
"afterInstall": "build/linux/after-install.tpl",
|
||||
"fpm": [
|
||||
"--deb-custom-control=pkg/control"
|
||||
]
|
||||
},
|
||||
"mac": {
|
||||
"category": "public.app-category.social-networking",
|
||||
|
14
pkg/control.template
Normal file
14
pkg/control.template
Normal file
@ -0,0 +1,14 @@
|
||||
Package: riot-desktop
|
||||
License: Apache-2.0
|
||||
Vendor: support@riot.im
|
||||
Architecture: amd64
|
||||
Maintainer: support@riot.im
|
||||
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libappindicator3-1, libsecret-1-0
|
||||
Provides: riot-web
|
||||
Conflicts: riot-web
|
||||
Replaces: riot-web
|
||||
Section: net
|
||||
Priority: extra
|
||||
Homepage: https://riot.im/
|
||||
Description:
|
||||
A feature-rich client for Matrix.org
|
@ -18,6 +18,9 @@ async function main() {
|
||||
}
|
||||
|
||||
const ver = asar.extractFile('webapp.asar', 'version').toString().trim();
|
||||
|
||||
// set version in package.json: electron-builder will use this to populate
|
||||
// all the various version fields
|
||||
await new Promise((resolve, reject) => {
|
||||
child_process.execFile('yarn', [
|
||||
'version',
|
||||
@ -33,6 +36,15 @@ async function main() {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Also create a debian package control file with the version.
|
||||
// We use a custom control file so we need to do this ourselves
|
||||
const outFile = await fs.open('pkg/control', 'w');
|
||||
const template = await fs.readFile('pkg/control.template');
|
||||
await outFile.write(template);
|
||||
await outFile.write('Version: ' + ver + "\n");
|
||||
await outFile.close();
|
||||
|
||||
console.log("Version set to " + ver);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user