2023-10-06 04:20:51 +03:00
|
|
|
%define debug_package %nil
|
|
|
|
%define _optdir /opt
|
|
|
|
|
|
|
|
Name: mattermost-desktop
|
2024-03-15 19:03:43 +00:00
|
|
|
Version: 5.7.0
|
2023-10-06 04:20:51 +03:00
|
|
|
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
|