mirror of
https://abf.rosa.ru/djam/mattermost-desktop.git
synced 2025-02-23 13:32:53 +00:00
91 lines
2.2 KiB
RPMSpec
91 lines
2.2 KiB
RPMSpec
|
%define debug_package %nil
|
||
|
%define _optdir /opt
|
||
|
|
||
|
Name: mattermost-desktop
|
||
|
Version: 5.5.1
|
||
|
Release: 1
|
||
|
Summary: Mattermost Desktop application
|
||
|
URL: https://github.com/mattermost/desktop
|
||
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||
|
Source1: %{name}.rpmlintrc
|
||
|
License: ASL 2.0
|
||
|
Group: Networking/Instant messaging
|
||
|
BuildRequires: nodejs-bootstrap-bin >= 16
|
||
|
BuildRequires: yarn
|
||
|
#BuildRequires: pkgconfig(libsecret-1)
|
||
|
#BuildRequires: pkgconfig(xkbfile)
|
||
|
BuildRequires: imagemagick
|
||
|
BuildRequires: git-core
|
||
|
BuildRequires: openssl-devel
|
||
|
#BuildRequires: sqlite-tools
|
||
|
BuildRequires: python38-devel
|
||
|
BuildRequires: jq
|
||
|
BuildRequires: pkgconfig(xtst)
|
||
|
BuildRequires: pkgconfig(libpng)
|
||
|
|
||
|
|
||
|
%description
|
||
|
Mattermost is an open source platform for secure
|
||
|
collaboration across the entire software development
|
||
|
lifecycle.
|
||
|
|
||
|
%prep
|
||
|
%setup -qn desktop-%{version}
|
||
|
|
||
|
# without git fix version
|
||
|
|
||
|
sed -i '/const\ VERSION/s/git\ rev-parse\ --short\ HEAD/echo\ %{version}/' webpack.config.base.js
|
||
|
|
||
|
%build
|
||
|
export PATH=/opt/nodejs/16.17.1/bin/:$PATH
|
||
|
export PYTHONPATH=%{python38_sitelib}
|
||
|
export PYTHON3=/usr/libexec/python3.8
|
||
|
export PYTHON=/usr/libexec/python3.8
|
||
|
|
||
|
yarn config set --home enableTelemetry 0
|
||
|
|
||
|
#export NODE_ENV=production
|
||
|
|
||
|
npm config set python /usr/libexec/python3.8
|
||
|
|
||
|
npm ci
|
||
|
|
||
|
export NODE_ENV=production
|
||
|
|
||
|
npm run build:main
|
||
|
npm run build-prod
|
||
|
node_modules/.bin/electron-builder --publish=never --dir
|
||
|
|
||
|
%install
|
||
|
install -d %{buildroot}%{_optdir}/%{name}
|
||
|
cp -a release/linux-*/* %{buildroot}%{_optdir}/%{name}
|
||
|
|
||
|
# create desktop
|
||
|
install -d %{buildroot}%{_datadir}/applications
|
||
|
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop <<EOF
|
||
|
[Desktop Entry]
|
||
|
Name=Mattermost
|
||
|
Comment=Mattermost Desktop application for Linux
|
||
|
Exec="%{_optdir}/%{name}/mattermost-desktop"
|
||
|
Terminal=false
|
||
|
Type=Application
|
||
|
Icon=%{name}
|
||
|
Categories=Network;InstantMessaging;
|
||
|
EOF
|
||
|
|
||
|
# install icons
|
||
|
|
||
|
pushd dist/assets/linux
|
||
|
for x in 16 24 32 48 64 96 128 256 512; do
|
||
|
install -d %{buildroot}%{_iconsdir}/hicolor/${x}x${x}/apps/
|
||
|
convert -resize ${x}x${x} app_icon.png %{buildroot}%{_iconsdir}/hicolor/${x}x${x}/apps/%{name}.png
|
||
|
done
|
||
|
popd
|
||
|
|
||
|
|
||
|
%files
|
||
|
%doc README.md LICENSE.txt
|
||
|
%{_optdir}/%{name}
|
||
|
%{_datadir}/applications/%{name}.desktop
|
||
|
%{_iconsdir}/hicolor/*/apps/%{name}.png
|