mirror of
https://abf.rosa.ru/djam/mattermost-desktop.git
synced 2025-02-22 21:12:56 +00:00
Imported from SRPM
This commit is contained in:
commit
60b395185a
3 changed files with 102 additions and 0 deletions
2
.abf.yml
Normal file
2
.abf.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
sources:
|
||||
mattermost-desktop-5.5.1.tar.gz: c8d14cc384eaf90e871fb92908d2d1c607b1e9f1
|
10
mattermost-desktop.rpmlintrc
Normal file
10
mattermost-desktop.rpmlintrc
Normal file
|
@ -0,0 +1,10 @@
|
|||
addFilter("E: dir-or-file-in-opt")
|
||||
addFilter("W: hidden-file-or-dir")
|
||||
addFilter("E: zero-length")
|
||||
addFilter("W: script-without-shebang")
|
||||
addFilter("E: non-standard-executable-perm")
|
||||
addFilter("E: wrong-script-interpreter")
|
||||
addFilter("W: non-executable-script")
|
||||
addFilter("W: pem-certificate")
|
||||
addFilter("E: shared-lib-without-dependency-information")
|
||||
|
90
mattermost-desktop.spec
Normal file
90
mattermost-desktop.spec
Normal file
|
@ -0,0 +1,90 @@
|
|||
%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
|
Loading…
Add table
Reference in a new issue