diff --git a/docs/Windows.md b/docs/Windows.md index 8efbb408b..c926c2074 100644 --- a/docs/Windows.md +++ b/docs/Windows.md @@ -47,4 +47,4 @@ npm run pack npm run dist ``` -It will start the packaging process. The ready for distribution file (e.g. dmg, windows installer, deb package) will be outputted to the `dist` directory. +It will start the packaging process. The ready for distribution file (e.g. dmg, windows installer, deb package, rpm package) will be outputted to the `dist` directory. diff --git a/docs/desktop-release.md b/docs/desktop-release.md index d776a2f5c..a2ea45b5d 100644 --- a/docs/desktop-release.md +++ b/docs/desktop-release.md @@ -16,7 +16,7 @@ ## - All the installer i.e. -- Linux (.deb, AppImage) +- Linux (.deb, .rpm, AppImage) - Mac - (.dmg) - Windows - (web installer for 32/64bit) diff --git a/package.json b/package.json index eda8ab4b3..8b3f1ef5d 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,7 @@ "description": "Zulip Desktop Client for Linux", "target": [ "deb", + "rpm", "tar.xz", "AppImage", "snap" @@ -98,6 +99,11 @@ "./packaging/deb-release-upgrades.cfg=/etc/update-manager/release-upgrades.d/zulip-desktop.cfg" ] }, + "rpm": { + "packageCategory": "net", + "synopsis": "Zulip Desktop App", + "afterInstall": "./packaging/rpm-after-install.sh" + }, "snap": { "synopsis": "Zulip Desktop App" }, diff --git a/packaging/rpm-after-install.sh b/packaging/rpm-after-install.sh new file mode 100644 index 000000000..9faee4b48 --- /dev/null +++ b/packaging/rpm-after-install.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Link to the binary +ln -sf '/opt/${productFilename}/${executable}' '/usr/bin/${executable}' + +# SUID chrome-sandbox for Electron 5+ +chmod 4755 '/opt/${productFilename}/chrome-sandbox' || true + +update-mime-database /usr/share/mime || true +update-desktop-database /usr/share/applications || true + +# Clean up configuration for old Bintray repository +rm -f /etc/apt/zulip.list