Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[f40] fix: legcord* (#2395) #2440

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion anda/apps/legcord-bin/legcord-bin.spec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

Name: legcord-bin
Version: 1.0.2
Release: 2%?dist
Release: 3%?dist
License: OSL-3.0
Summary: Custom lightweight Discord client designed to enhance your experience
URL: https://github.com/LegCord/LegCord
Expand All @@ -28,6 +28,7 @@ BuildRequires: unzip
ExclusiveArch: x86_64 aarch64 armv7l
Conflicts: legcord
BuildRequires: add-determinism
Obsoletes: armcord < 3.3.2-1

%description
LegCord is a custom client designed to enhance your Discord experience
Expand Down Expand Up @@ -58,15 +59,24 @@ cd legcord
mkdir -p %buildroot%_bindir %buildroot%_datadir/applications %buildroot%_datadir/pixmaps %buildroot%_datadir/legcord %buildroot%_docdir/%name
cp -a * %buildroot%_datadir/legcord/
ln -s %_datadir/legcord/legcord %buildroot%_bindir/legcord
ln -s %_datadir/legcord %buildroot%_datadir/armcord
chmod +x -R %buildroot%_datadir/legcord/*
chmod 755 %buildroot%_datadir/legcord/legcord
install -Dm644 .legcord.desktop %buildroot%_datadir/applications/LegCord.desktop
install -Dm644 %SOURCE1 %buildroot%_datadir/pixmaps/legcord.png
install -Dm644 %SOURCE2 %buildroot%_docdir/%name/

# HACK: rpm bug for unability to replace existing files on system.
%pre
if [ -d %_datadir/armcord ] && [ ! -L %_datadir/armcord ]; then
echo "Found old %_datadir/armcord directory, removing…"
rm -rf %_datadir/armcord
fi

%files
%doc README.md
%_datadir/legcord
%_datadir/armcord
%_bindir/legcord
%_datadir/applications/LegCord.desktop
%_datadir/pixmaps/legcord.png
Expand Down
20 changes: 14 additions & 6 deletions anda/apps/legcord/legcord.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,26 @@

Name: legcord
Version: 1.0.2
Release: 2%?dist
Release: 3%?dist
License: OSL-3.0
Summary: Custom lightweight Discord client designed to enhance your experience
URL: https://github.com/LegCord/LegCord
Group: Applications/Internet
Source1: launch.sh
Packager: madonuko <[email protected]>
Requires: electron xdg-utils
BuildRequires: git-core add-determinism pnpm
Provides: armcord
Obsoletes: armcord
Obsoletes: armcord < 3.3.2-1
Conflicts: legcord-bin
BuildArch: noarch
BuildRequires: anda-srpm-macros pnpm

%description
legcord is a custom client designed to enhance your Discord experience
while keeping everything lightweight.

%prep
rm -rf *
git clone %url .
git checkout v%version
%git_clone %url v%version

cat <<EOF > legcord.desktop
[Desktop Entry]
Expand Down Expand Up @@ -51,13 +49,23 @@ install -Dm755 %SOURCE1 %buildroot/usr/bin/legcord
install -Dm644 legcord.desktop %buildroot/usr/share/applications/LegCord.desktop
install -Dm644 build/icon.png %buildroot/usr/share/pixmaps/legcord.png

ln -s %_datadir/legcord %buildroot%_datadir/armcord

# HACK: rpm bug for unability to replace existing files on system.
%pre
if [ -d %_datadir/armcord ] && [ ! -L %_datadir/armcord ]; then
echo "Found old %_datadir/armcord directory, removing…"
rm -rf %_datadir/armcord
fi

%files
%doc README.md
%license license.txt
/usr/bin/legcord
/usr/share/applications/LegCord.desktop
/usr/share/pixmaps/legcord.png
/usr/share/legcord/app.asar
/usr/share/armcord

%changelog
* Mon Oct 21 2024 madonuko <[email protected]> - 1.0.2-2
Expand Down
Loading