mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 15:34:59 +01:00
Use a custom control file for the Debian package
So we can say we replace the riot-web package
This commit is contained in:
parent
98fa34f56f
commit
6e6e7d82c8
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
|||||||
/packages
|
/packages
|
||||||
/deploys
|
/deploys
|
||||||
/node_modules
|
/node_modules
|
||||||
|
/pkg/control
|
||||||
|
@ -65,7 +65,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"deb": {
|
"deb": {
|
||||||
"afterInstall": "build/linux/after-install.tpl"
|
"afterInstall": "build/linux/after-install.tpl",
|
||||||
|
"fpm": [
|
||||||
|
"--deb-custom-control=pkg/control"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"mac": {
|
"mac": {
|
||||||
"category": "public.app-category.social-networking",
|
"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: default
|
||||||
|
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();
|
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) => {
|
await new Promise((resolve, reject) => {
|
||||||
child_process.execFile('yarn', [
|
child_process.execFile('yarn', [
|
||||||
'version',
|
'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);
|
console.log("Version set to " + ver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user