From e23f8cad78d8a38cae2e9b92519c0c180d20cb5e Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 25 Oct 2024 12:01:08 +0800 Subject: [PATCH 1/5] fix: legcord* --- anda/apps/legcord-bin/legcord-bin.spec | 2 ++ anda/apps/legcord/legcord.spec | 3 +++ 2 files changed, 5 insertions(+) diff --git a/anda/apps/legcord-bin/legcord-bin.spec b/anda/apps/legcord-bin/legcord-bin.spec index aee59dc028..7d47a6e57e 100644 --- a/anda/apps/legcord-bin/legcord-bin.spec +++ b/anda/apps/legcord-bin/legcord-bin.spec @@ -58,6 +58,7 @@ 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 @@ -67,6 +68,7 @@ install -Dm644 %SOURCE2 %buildroot%_docdir/%name/ %files %doc README.md %_datadir/legcord +%_datadir/armcord %_bindir/legcord %_datadir/applications/LegCord.desktop %_datadir/pixmaps/legcord.png diff --git a/anda/apps/legcord/legcord.spec b/anda/apps/legcord/legcord.spec index 1936544b79..b8365a5acf 100644 --- a/anda/apps/legcord/legcord.spec +++ b/anda/apps/legcord/legcord.spec @@ -51,6 +51,8 @@ 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 + %files %doc README.md %license license.txt @@ -58,6 +60,7 @@ install -Dm644 build/icon.png %buildroot/usr/share/pixmaps/legcord.png /usr/share/applications/LegCord.desktop /usr/share/pixmaps/legcord.png /usr/share/legcord/app.asar +/usr/share/armcord/app.asar %changelog * Mon Oct 21 2024 madonuko - 1.0.2-2 From 9d952d47afe5c036427d59e58826bbfae95fc16e Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 25 Oct 2024 12:28:07 +0800 Subject: [PATCH 2/5] fix builds --- anda/apps/legcord-bin/legcord-bin.spec | 3 ++- anda/apps/legcord/legcord.spec | 12 +++++------- anda/terra/release/terra-extra.repo | 24 ++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 anda/terra/release/terra-extra.repo diff --git a/anda/apps/legcord-bin/legcord-bin.spec b/anda/apps/legcord-bin/legcord-bin.spec index 7d47a6e57e..40d531a513 100644 --- a/anda/apps/legcord-bin/legcord-bin.spec +++ b/anda/apps/legcord-bin/legcord-bin.spec @@ -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 @@ -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 diff --git a/anda/apps/legcord/legcord.spec b/anda/apps/legcord/legcord.spec index b8365a5acf..94ad486599 100644 --- a/anda/apps/legcord/legcord.spec +++ b/anda/apps/legcord/legcord.spec @@ -2,7 +2,7 @@ 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 @@ -10,20 +10,18 @@ Group: Applications/Internet Source1: launch.sh Packager: madonuko 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 < legcord.desktop [Desktop Entry] @@ -60,7 +58,7 @@ ln -s %_datadir/legcord %buildroot%_datadir/armcord /usr/share/applications/LegCord.desktop /usr/share/pixmaps/legcord.png /usr/share/legcord/app.asar -/usr/share/armcord/app.asar +/usr/share/armcord %changelog * Mon Oct 21 2024 madonuko - 1.0.2-2 diff --git a/anda/terra/release/terra-extra.repo b/anda/terra/release/terra-extra.repo new file mode 100644 index 0000000000..0160f4bfad --- /dev/null +++ b/anda/terra/release/terra-extra.repo @@ -0,0 +1,24 @@ +[terra] +name=Terra $releasever (Extra) +#baseurl=https://repos.fyralabs.com/terra$releasever +metalink=https://tetsudou.fyralabs.com/metalink?repo=terra$releasever&arch=$basearch +metadata_expire=6h +type=rpm +gpgcheck=1 +gpgkey=https://repos.fyralabs.com/terra$releasever-extra/key.asc +repo_gpgcheck=1 +enabled=1 +enabled_metadata=1 +countme=1 + +[terra-source] +name=Terra $releasever (Extra) - Source +#baseurl=https://repos.fyralabs.com/terra$releasever-source +metalink=https://tetsudou.fyralabs.com/metalink?repo=terra$releasever-extras-source&arch=$basearch +metadata_expire=6h +type=rpm +gpgcheck=1 +gpgkey=https://repos.fyralabs.com/terra$releasever-source/key.asc +repo_gpgcheck=1 +enabled=0 +enabled_metadata=0 From 58aeb8e5628a16a458fb718ee978cf476061e34f Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 25 Oct 2024 12:40:41 +0800 Subject: [PATCH 3/5] meow --- anda/apps/legcord-bin/legcord-bin.spec | 3 ++- anda/apps/legcord/legcord.spec | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/anda/apps/legcord-bin/legcord-bin.spec b/anda/apps/legcord-bin/legcord-bin.spec index 7d47a6e57e..40d531a513 100644 --- a/anda/apps/legcord-bin/legcord-bin.spec +++ b/anda/apps/legcord-bin/legcord-bin.spec @@ -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 @@ -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 diff --git a/anda/apps/legcord/legcord.spec b/anda/apps/legcord/legcord.spec index b8365a5acf..94ad486599 100644 --- a/anda/apps/legcord/legcord.spec +++ b/anda/apps/legcord/legcord.spec @@ -2,7 +2,7 @@ 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 @@ -10,20 +10,18 @@ Group: Applications/Internet Source1: launch.sh Packager: madonuko 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 < legcord.desktop [Desktop Entry] @@ -60,7 +58,7 @@ ln -s %_datadir/legcord %buildroot%_datadir/armcord /usr/share/applications/LegCord.desktop /usr/share/pixmaps/legcord.png /usr/share/legcord/app.asar -/usr/share/armcord/app.asar +/usr/share/armcord %changelog * Mon Oct 21 2024 madonuko - 1.0.2-2 From 25613155b6405d3d78d66a611badb2ef3db0e330 Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 25 Oct 2024 12:41:04 +0800 Subject: [PATCH 4/5] =?UTF-8?q?meow=20=C3=972?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- anda/terra/release/terra-extra.repo | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 anda/terra/release/terra-extra.repo diff --git a/anda/terra/release/terra-extra.repo b/anda/terra/release/terra-extra.repo deleted file mode 100644 index 0160f4bfad..0000000000 --- a/anda/terra/release/terra-extra.repo +++ /dev/null @@ -1,24 +0,0 @@ -[terra] -name=Terra $releasever (Extra) -#baseurl=https://repos.fyralabs.com/terra$releasever -metalink=https://tetsudou.fyralabs.com/metalink?repo=terra$releasever&arch=$basearch -metadata_expire=6h -type=rpm -gpgcheck=1 -gpgkey=https://repos.fyralabs.com/terra$releasever-extra/key.asc -repo_gpgcheck=1 -enabled=1 -enabled_metadata=1 -countme=1 - -[terra-source] -name=Terra $releasever (Extra) - Source -#baseurl=https://repos.fyralabs.com/terra$releasever-source -metalink=https://tetsudou.fyralabs.com/metalink?repo=terra$releasever-extras-source&arch=$basearch -metadata_expire=6h -type=rpm -gpgcheck=1 -gpgkey=https://repos.fyralabs.com/terra$releasever-source/key.asc -repo_gpgcheck=1 -enabled=0 -enabled_metadata=0 From 2f13fe43c99ce5a5e6b5714cc25affc52d5db924 Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 25 Oct 2024 12:58:57 +0800 Subject: [PATCH 5/5] add pre script for the bug --- anda/apps/legcord-bin/legcord-bin.spec | 7 +++++++ anda/apps/legcord/legcord.spec | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/anda/apps/legcord-bin/legcord-bin.spec b/anda/apps/legcord-bin/legcord-bin.spec index 40d531a513..9b8798ec78 100644 --- a/anda/apps/legcord-bin/legcord-bin.spec +++ b/anda/apps/legcord-bin/legcord-bin.spec @@ -66,6 +66,13 @@ 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 diff --git a/anda/apps/legcord/legcord.spec b/anda/apps/legcord/legcord.spec index 94ad486599..faa89bcd8c 100644 --- a/anda/apps/legcord/legcord.spec +++ b/anda/apps/legcord/legcord.spec @@ -51,6 +51,13 @@ 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