Add discord (#137)

This commit is contained in:
windowsboy111
2023-01-19 22:30:39 +08:00
committed by GitHub
parent 5d841402e6
commit 4906fc8fed
4 changed files with 55 additions and 9 deletions
@@ -3,7 +3,7 @@
Name: discord-canary-openasar
Version: 0.0.146
Release: 1%{?dist}
Release: 2%{?dist}
Summary: OpenAsar is a rewrite of part of Discord's desktop code, making it snappier and include more features like further customization and theming
License: MIT and https://discord.com/terms
URL: https://github.com/GooseMod/OpenAsar
@@ -18,9 +18,9 @@ ExclusiveArch: x86_64
%prep
%autosetup -n DiscordCanary
%build
sed "s@/usr/share/discord-canary/@/usr/share/discord-canary-openasar@g" discord-canary.desktop > a
sed "s@Discord Canary@Discord Canary OpenAsar@g" a > discord-canary.desktop
%install
rm -rf $RPM_BUILD_ROOT
@@ -33,12 +33,6 @@ install discord.png %{buildroot}%{_datadir}/pixmaps/discord-canary-openasar.png
cp -v %{SOURCE1} %{buildroot}%{_datadir}/discord-canary-openasar/app.asar
# trigger on discord-canary
%triggerin -- discord-canary
cp %{_datadir}/openasar-canary/app.asar %{_datadir}/discord-canary/resources/app.asar
%files
%{_datadir}/discord-canary-openasar/
%{_datadir}/applications/discord-canary-openasar.desktop
+5
View File
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "discord.spec"
}
}
+44
View File
@@ -0,0 +1,44 @@
%define debug_package %{nil}
Name: discord
Version: 0.0.24
Release: 1%{?dist}
Summary: Free Voice and Text Chat for Gamers.
URL: discord.com
Source0: https://dl.discordapp.net/apps/linux/%{version}/discord-%{version}.tar.gz
License: https://discord.com/terms
Requires: libatomic glibc alsa-lib GConf2 libnotify libstdc++ libappindicator libcxx libXScrnSaver
Requires: nspr >= 4.13
Requires: nss >= 3.27
Requires: libX11 >= 1.6
Requires: libXtst >= 1.2
Group: Applications/Internet
ExclusiveArch: x86_64
%description
Imagine a place where you can belong to a school club, a gaming group,
or a worldwide art community. Where just you and a handful of friends
can spend time together. A place that makes it easy to talk every day
and hang out more often.
%prep
%autosetup -n Discord
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p %{buildroot}%{_datadir}/discord
cp -rv * %{buildroot}%{_datadir}/discord
mkdir -p %{buildroot}%{_datadir}/applications/
mkdir -p %{buildroot}%{_datadir}/pixmaps
install discord.desktop %{buildroot}%{_datadir}/applications/discord.desktop
install discord.png %{buildroot}%{_datadir}/pixmaps/discord.png
%files
%{_datadir}/discord/
%{_datadir}/applications/discord.desktop
%{_datadir}/pixmaps/discord.png
%changelog
* Thu Jan 19 2023 windowsboy111 <wboy111@outlook.com> - 0.0.143-1
- Initial package
+3
View File
@@ -0,0 +1,3 @@
let html = get("https://discordapp.com/api/download?platform=linux&format=tar.gz");
let newver = find("https://dl\\.discordapp\\.net/apps/linux/([\\.\\d]+)/", html, 1);
rpm.version(newver);