mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-05 21:15:38 -05:00
Update Copr Architecture logic
This commit is contained in:
51
.github/workflows/copr-release.yml
vendored
51
.github/workflows/copr-release.yml
vendored
@@ -56,7 +56,7 @@ jobs:
|
|||||||
VERSION="${{ steps.version.outputs.version }}"
|
VERSION="${{ steps.version.outputs.version }}"
|
||||||
cd ~/rpmbuild/SOURCES
|
cd ~/rpmbuild/SOURCES
|
||||||
|
|
||||||
echo "📦 Downloading DMS release assets for v${VERSION}..."
|
echo "📦 Downloading DMS QML source for v${VERSION}..."
|
||||||
|
|
||||||
# Download DMS QML source
|
# Download DMS QML source
|
||||||
wget "https://github.com/AvengeMedia/DankMaterialShell/releases/download/v${VERSION}/dms-qml.tar.gz" || {
|
wget "https://github.com/AvengeMedia/DankMaterialShell/releases/download/v${VERSION}/dms-qml.tar.gz" || {
|
||||||
@@ -64,21 +64,8 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download dms-cli (always use latest)
|
echo "✅ Source downloaded"
|
||||||
echo "📦 Downloading latest dms-cli..."
|
echo "Note: dms-cli and dgop binaries will be downloaded during build based on target architecture"
|
||||||
wget "https://github.com/AvengeMedia/danklinux/releases/latest/download/dms-distropkg-amd64.gz" || {
|
|
||||||
echo "❌ Failed to download dms-cli"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Download dgop (always use latest)
|
|
||||||
echo "📦 Downloading latest dgop..."
|
|
||||||
wget "https://github.com/AvengeMedia/dgop/releases/latest/download/dgop-linux-amd64.gz" || {
|
|
||||||
echo "❌ Failed to download dgop"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "✅ All sources downloaded"
|
|
||||||
ls -lh
|
ls -lh
|
||||||
|
|
||||||
- name: Generate stable spec file
|
- name: Generate stable spec file
|
||||||
@@ -102,10 +89,9 @@ jobs:
|
|||||||
URL: https://github.com/AvengeMedia/DankMaterialShell
|
URL: https://github.com/AvengeMedia/DankMaterialShell
|
||||||
|
|
||||||
Source0: dms-qml.tar.gz
|
Source0: dms-qml.tar.gz
|
||||||
Source1: dms-distropkg-amd64.gz
|
|
||||||
Source2: dgop-linux-amd64.gz
|
|
||||||
|
|
||||||
BuildRequires: gzip
|
BuildRequires: gzip
|
||||||
|
BuildRequires: wget
|
||||||
|
|
||||||
Requires: (quickshell or quickshell-git)
|
Requires: (quickshell or quickshell-git)
|
||||||
Requires: dms-cli
|
Requires: dms-cli
|
||||||
@@ -157,10 +143,35 @@ jobs:
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -c -n dms-qml
|
%setup -q -c -n dms-qml
|
||||||
|
|
||||||
gunzip -c %{SOURCE1} > %{_builddir}/dms-cli
|
# Download architecture-specific binaries during build
|
||||||
|
# This ensures the correct architecture is used for each build target
|
||||||
|
case "%{_arch}" in
|
||||||
|
x86_64)
|
||||||
|
ARCH_SUFFIX="amd64"
|
||||||
|
;;
|
||||||
|
aarch64)
|
||||||
|
ARCH_SUFFIX="arm64"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported architecture: %{_arch}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Download dms-cli for target architecture
|
||||||
|
wget -O %{_builddir}/dms-cli.gz "https://github.com/AvengeMedia/danklinux/releases/latest/download/dms-distropkg-${ARCH_SUFFIX}.gz" || {
|
||||||
|
echo "Failed to download dms-cli for architecture %{_arch}"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
gunzip -c %{_builddir}/dms-cli.gz > %{_builddir}/dms-cli
|
||||||
chmod +x %{_builddir}/dms-cli
|
chmod +x %{_builddir}/dms-cli
|
||||||
|
|
||||||
gunzip -c %{SOURCE2} > %{_builddir}/dgop
|
# Download dgop for target architecture
|
||||||
|
wget -O %{_builddir}/dgop.gz "https://github.com/AvengeMedia/dgop/releases/latest/download/dgop-linux-${ARCH_SUFFIX}.gz" || {
|
||||||
|
echo "Failed to download dgop for architecture %{_arch}"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
gunzip -c %{_builddir}/dgop.gz > %{_builddir}/dgop
|
||||||
chmod +x %{_builddir}/dgop
|
chmod +x %{_builddir}/dgop
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|||||||
42
dms.spec
42
dms.spec
@@ -18,14 +18,12 @@ Source0: {{{ git_dir_pack }}}
|
|||||||
# DMS CLI from danklinux latest commit
|
# DMS CLI from danklinux latest commit
|
||||||
Source1: https://github.com/AvengeMedia/danklinux/archive/refs/heads/master.tar.gz
|
Source1: https://github.com/AvengeMedia/danklinux/archive/refs/heads/master.tar.gz
|
||||||
|
|
||||||
# DGOP binary from dgop latest release
|
|
||||||
Source2: https://github.com/AvengeMedia/dgop/releases/latest/download/dgop-linux-amd64.gz
|
|
||||||
|
|
||||||
BuildRequires: git-core
|
BuildRequires: git-core
|
||||||
BuildRequires: rpkg
|
BuildRequires: rpkg
|
||||||
BuildRequires: gzip
|
BuildRequires: gzip
|
||||||
BuildRequires: golang >= 1.24
|
BuildRequires: golang >= 1.24
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
|
BuildRequires: wget
|
||||||
|
|
||||||
# Core requirements
|
# Core requirements
|
||||||
Requires: (quickshell-git or quickshell)
|
Requires: (quickshell-git or quickshell)
|
||||||
@@ -85,8 +83,25 @@ used standalone. This package always includes the latest stable dgop release.
|
|||||||
# Extract DankLinux source
|
# Extract DankLinux source
|
||||||
tar -xzf %{SOURCE1} -C %{_builddir}
|
tar -xzf %{SOURCE1} -C %{_builddir}
|
||||||
|
|
||||||
# Extract DGOP binary
|
# Download and extract DGOP binary for target architecture
|
||||||
gunzip -c %{SOURCE2} > %{_builddir}/dgop
|
case "%{_arch}" in
|
||||||
|
x86_64)
|
||||||
|
DGOP_ARCH="amd64"
|
||||||
|
;;
|
||||||
|
aarch64)
|
||||||
|
DGOP_ARCH="arm64"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported architecture: %{_arch}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
wget -O %{_builddir}/dgop.gz "https://github.com/AvengeMedia/dgop/releases/latest/download/dgop-linux-${DGOP_ARCH}.gz" || {
|
||||||
|
echo "Failed to download dgop for architecture %{_arch}"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
gunzip -c %{_builddir}/dgop.gz > %{_builddir}/dgop
|
||||||
chmod +x %{_builddir}/dgop
|
chmod +x %{_builddir}/dgop
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@@ -95,8 +110,21 @@ cd %{_builddir}/danklinux-master
|
|||||||
make dist
|
make dist
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Install dms-cli binary (built from source)
|
# Install dms-cli binary (built from source) - use architecture-specific path
|
||||||
install -Dm755 %{_builddir}/danklinux-master/bin/dms-linux-amd64 %{buildroot}%{_bindir}/dms
|
case "%{_arch}" in
|
||||||
|
x86_64)
|
||||||
|
DMS_BINARY="dms-linux-amd64"
|
||||||
|
;;
|
||||||
|
aarch64)
|
||||||
|
DMS_BINARY="dms-linux-arm64"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported architecture: %{_arch}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
install -Dm755 %{_builddir}/danklinux-master/bin/${DMS_BINARY} %{buildroot}%{_bindir}/dms
|
||||||
|
|
||||||
# Install dgop binary
|
# Install dgop binary
|
||||||
install -Dm755 %{_builddir}/dgop %{buildroot}%{_bindir}/dgop
|
install -Dm755 %{_builddir}/dgop %{buildroot}%{_bindir}/dgop
|
||||||
|
|||||||
Reference in New Issue
Block a user