mirror of
https://abf.rosa.ru/djam/ipfs-desktop.git
synced 2025-02-24 02:22:46 +00:00
102 lines
2.3 KiB
RPMSpec
102 lines
2.3 KiB
RPMSpec
%define _optdir /opt
|
|
%define debug %nil
|
|
%define debug_package %nil
|
|
|
|
Name: ipfs-desktop
|
|
Version: 0.41.0
|
|
Release: 1
|
|
Summary: A desktop client for IPFS
|
|
URL: https://ipfs.io
|
|
Source0: https://github.com/ipfs-shipyard/ipfs-desktop/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
Source1000: %{name}.rpmlintrc
|
|
Group: Networking/Instant messaging
|
|
License: MIT
|
|
BuildRequires: yarn
|
|
BuildRequires: nodejs-bootstrap-bin >= 18
|
|
BuildRequires: libicns-utils
|
|
BuildRequires: imagemagick
|
|
BuildRequires: python38-devel
|
|
|
|
%description
|
|
An unobtrusive and user-friendly desktop application
|
|
for IPFS on Windows, Mac and Linux.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
export PATH=$PATH:/opt/nodejs/16.*/bin
|
|
export PYTHONPATH=%{python38_sitelib}
|
|
export PYTHON3=/usr/libexec/python3.8
|
|
export PYTHON=/usr/libexec/python3.8
|
|
|
|
yarn config set --home enableTelemetry 0
|
|
|
|
yarn
|
|
yarn run install-app-deps
|
|
yarn run build
|
|
yarn run build:webui:minimize
|
|
|
|
#./node_modules/.bin/gulp build
|
|
|
|
%ifarch x86_64
|
|
./node_modules/.bin/electron-builder --linux --x64 --dir
|
|
%else
|
|
./node_modules/.bin/electron-builder --linux --ia32 --dir
|
|
%endif
|
|
|
|
%install
|
|
install -d %{buildroot}%{_optdir}/%{name}
|
|
install -d %{buildroot}%{_datadir}/applications
|
|
install -d %{buildroot}%{_bindir}
|
|
|
|
%ifarch x86_64
|
|
cp -a dist/linux-unpacked/* %{buildroot}%{_optdir}/%{name}/
|
|
%else
|
|
cp -a dist/linux-ia32-unpacked/* %{buildroot}%{_optdir}/%{name}/
|
|
%endif
|
|
|
|
# menu-entry
|
|
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop <<EOF
|
|
[Desktop Entry]
|
|
Name=IPFS Desktop
|
|
Name[ru]=IPFS Desktop
|
|
GenericName=IPFS Desktop
|
|
GenericName[ru]=IPFS Desktop
|
|
Comment=Desktop client for IPFS
|
|
Comment[ru]=Клиент сети IPFS
|
|
Exec=%{name}
|
|
Icon=%{name}
|
|
Terminal=false
|
|
Type=Application
|
|
StartupNotify=true
|
|
StartupWMClass="IPFS.Desktop"
|
|
MimeType=x-scheme-handler/ipfs
|
|
Categories=GNOME;GTK;Network
|
|
EOF
|
|
|
|
# script start program
|
|
cat > %{buildroot}%{_bindir}/%{name} << EOF
|
|
#!/bin/bash
|
|
cd %{_optdir}/%{name}
|
|
./%{name}
|
|
EOF
|
|
|
|
chmod +x %{buildroot}%{_bindir}/%{name}
|
|
|
|
# install icons
|
|
cd assets/build
|
|
|
|
icns2png -x icon.icns
|
|
|
|
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} icon_512x512x32.png %{buildroot}%{_iconsdir}/hicolor/${x}x${x}/apps/%{name}.png
|
|
done
|
|
|
|
%files
|
|
%doc README.md LICENSE
|
|
%{_bindir}/%{name}
|
|
%{_optdir}/%{name}
|
|
%{_datadir}/applications/%{name}.desktop
|
|
%{_iconsdir}/hicolor/*/apps/%{name}.png
|