Projects
Extra
discord
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 13
View file
discord.spec
Changed
@@ -1,7 +1,8 @@ # # spec file for package discord # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2023-2024 SUSE LLC. +# Copyright (c) 2021 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,32 +19,42 @@ # Require bash for extglob in install section. %global _buildshell /bin/bash -%global __requires_exclude ^(libffmpeg|libnode).* -%global __provides_exclude ^(libffmpeg|libnode).* +# Shipped by this package but not provided externally +%global __requires_exclude ^libffmpeg +%global __provides_exclude_from %{_libdir}/%{name} # This is to enable build with patent encoumbered codecs. Not allowed in OBS %bcond_with x264 Name: discord -Version: 0.0.10 +Version: 0.0.77 Release: 0 Summary: Voice and Text Chat for Gamers License: SUSE-NonFree -Group: chat voice-chat +Group: Productivity/Networking/Instant Messenger URL: https://discordapp.com/ Source0: https://dl.discordapp.net/apps/linux/%{version}/%{name}-%{version}.tar.gz #Source0: https://discordapp.com/api/download?platform=linux&format=tar.gz Source2: discord-symbolic.svg +Source3: https://raw.githubusercontent.com/flathub/com.discordapp.Discord/master/com.discordapp.Discord.appdata.xml +# Disable breaking updates which will prompt users to download a deb or tar +# file and lock them out of Discord making the program unusable. +Source4: discord Source99: PERMISSION ExclusiveArch: x86_64 BuildRequires: desktop-file-utils BuildRequires: hicolor-icon-theme BuildRequires: update-desktop-files BuildRequires: unzip +Requires: libatomic1 +#for the wrapper script: +Requires: grep +Requires: sed +Requires: coreutils Conflicts: discord -Requires: libgtk-2_0-0 libnotify-tools libasound2 gconf2 mozilla-nss dbus-1-glib libXtst6 libX11-6 libstdc++6 libc++1 libatomic1 + #Patent free ffmpeg config #Snippets from https://github.com/orionhealth/electron-packager-plugin-non-proprietary-codecs-ffmpeg/blob/master/src/downloadFFMPEG.js -%define electronVersion 4.0.1 +%define electronVersion 32.2.2 %define ffmpegarch x64 %define ffmpegplatform linux %define ffmpegFileName ffmpeg-v%{electronVersion}-%{ffmpegplatform}-%{ffmpegarch}.zip @@ -58,8 +69,8 @@ Server-to-client communications are encrypted. %prep -%setup -n Discord -%setup -T -a 1 -c -n ffmpeg +%setup -q -n Discord +%setup -q -T -a 1 -c -n ffmpeg %build %if %{with x264} @@ -83,7 +94,10 @@ install -Dm755 libffmpeg.so %{buildroot}%{_libdir}/%{name}/libffmpeg.so install -Dm755 libEGL.so %{buildroot}%{_libdir}/%{name}/libEGL.so install -Dm755 libGLESv2.so %{buildroot}%{_libdir}/%{name}/libGLESv2.so -install -Dm755 %SOURCE1 %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/%{name}-symbolic.svg +install -Dm755 libvk_swiftshader.so %{buildroot}%{_libdir}/%{name}/libvk_swiftshader.so +install -Dm755 libvulkan.so.1 %{buildroot}%{_libdir}/%{name}/libvulkan.so.1 +install -Dm644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/%{name}-symbolic.svg +install -Dm644 %{SOURCE3} %{buildroot}%{_datadir}/appdata/com.discordapp.Discord.appdata.xml # install share mkdir -p %{buildroot}%{_libdir}/%{name} @@ -91,12 +105,16 @@ cp -r !(discord*|*.so) %{buildroot}%{_libdir}/%{name} shopt -u extglob -# fix missing icon in some envoronments -ln -sf %{_datadir}/icons/hicolor/256x256/apps/%{name}.png /%{buildroot}%{_libdir}/%{name} +# fix missing icon in some environments +ln -sf %{_datadir}/icons/hicolor/256x256/apps/%{name}.png %{buildroot}%{_libdir}/%{name} # Executable checks for resources in its directory so it cannot be in bin. mkdir -p %{buildroot}%{_bindir} -ln -s %{_libdir}/%{name}/Discord %{buildroot}%{_bindir}/%{name} +install -v -m 755 %{SOURCE4} %{buildroot}%{_bindir}/%{name} + +%check +electronVersionActual=$(strings %{buildroot}%{_libdir}/%{name}/Discord | sed -nE 's/Chrome\/0-9.* Electron\/(.*)/\1/p') +if $electronVersionActual != "%{electronVersion}" ; then echo "Electron version does not match (expected is %{electronVersion} , actual is $electronVersionActual)"; exit 1; fi %post %if 0%{?suse_version} < 1500 @@ -104,18 +122,18 @@ %endif chmod 0755 %{_libdir}/%{name}/Discord -%if 0%{?suse_version} < 1500 +%if 0%{?suse_version} < 1500 %postun %desktop_database_postun %endif - %files %defattr(-,root,root) %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/256x256/apps/%{name}.png %{_datadir}/icons/hicolor/symbolic/apps/%{name}-symbolic.svg +%{_datadir}/appdata/com.discordapp.Discord.appdata.xml %{_libdir}/%{name} %changelog
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.