diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abe8ecdc..58087786 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -398,297 +398,3 @@ jobs: prerelease: ${{ contains(env.TAG, '-') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # trigger-obs-update: - # runs-on: ubuntu-latest - # needs: release - # env: - # TAG: ${{ inputs.tag }} - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - # with: - # ref: ${{ inputs.tag }} - - # - name: Install OSC - # run: | - # sudo apt-get update - # sudo apt-get install -y osc - - # mkdir -p ~/.config/osc - # cat > ~/.config/osc/oscrc << EOF - # [general] - # apiurl = https://api.opensuse.org - - # [https://api.opensuse.org] - # user = ${{ secrets.OBS_USERNAME }} - # pass = ${{ secrets.OBS_PASSWORD }} - # EOF - # chmod 600 ~/.config/osc/oscrc - - # - name: Update OBS packages - # run: | - # cd distro - # bash scripts/obs-upload.sh dms "Update to ${TAG}" - - # trigger-ppa-update: - # runs-on: ubuntu-latest - # needs: release - # env: - # TAG: ${{ inputs.tag }} - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - # with: - # ref: ${{ inputs.tag }} - - # - name: Install build dependencies - # run: | - # sudo apt-get update - # sudo apt-get install -y \ - # debhelper \ - # devscripts \ - # dput \ - # lftp \ - # build-essential \ - # fakeroot \ - # dpkg-dev - - # - name: Configure GPG - # env: - # GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - # run: | - # echo "$GPG_KEY" | gpg --import - # GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d'/' -f2) - # echo "DEBSIGN_KEYID=$GPG_KEY_ID" >> $GITHUB_ENV - - # - name: Upload to PPA - # run: | - # cd distro/ubuntu/ppa - # bash create-and-upload.sh ../dms dms questing - - # copr-build: - # runs-on: ubuntu-latest - # needs: release - # env: - # TAG: ${{ inputs.tag }} - - # steps: - # - name: Checkout repository - # uses: actions/checkout@v4 - # with: - # ref: ${{ inputs.tag }} - - # - name: Determine version - # id: version - # run: | - # VERSION="${TAG#v}" - # echo "version=$VERSION" >> $GITHUB_OUTPUT - # echo "Building DMS stable version: $VERSION" - - # - name: Setup build environment - # run: | - # sudo apt-get update - # sudo apt-get install -y rpm wget curl jq gzip - # mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} - - # - name: Download release assets - # run: | - # VERSION="${{ steps.version.outputs.version }}" - # cd ~/rpmbuild/SOURCES - - # wget "https://github.com/AvengeMedia/DankMaterialShell/releases/download/v${VERSION}/dms-qml.tar.gz" || { - # echo "Failed to download dms-qml.tar.gz for v${VERSION}" - # exit 1 - # } - - # - name: Generate stable spec file - # run: | - # VERSION="${{ steps.version.outputs.version }}" - # CHANGELOG_DATE="$(date '+%a %b %d %Y')" - - # cat > ~/rpmbuild/SPECS/dms.spec <<'SPECEOF' - # # Spec for DMS stable releases - Generated by GitHub Actions - - # %global debug_package %{nil} - # %global version VERSION_PLACEHOLDER - # %global pkg_summary DankMaterialShell - Material 3 inspired shell for Wayland compositors - - # Name: dms - # Version: %{version} - # Release: 1%{?dist} - # Summary: %{pkg_summary} - - # License: MIT - # URL: https://github.com/AvengeMedia/DankMaterialShell - - # Source0: dms-qml.tar.gz - - # BuildRequires: gzip - # BuildRequires: wget - # BuildRequires: systemd-rpm-macros - - # Requires: (quickshell or quickshell-git) - # Requires: accountsservice - # Requires: dms-cli = %{version}-%{release} - # Requires: dgop - - # Recommends: cava - # Recommends: cliphist - # Recommends: danksearch - # Recommends: matugen - # Recommends: wl-clipboard - # Recommends: NetworkManager - # Recommends: qt6-qtmultimedia - # Suggests: qt6ct - - # %description - # DankMaterialShell (DMS) is a modern Wayland desktop shell built with Quickshell - # and optimized for the niri and hyprland compositors. Features notifications, - # app launcher, wallpaper customization, and fully customizable with plugins. - - # Includes auto-theming for GTK/Qt apps with matugen, 20+ customizable widgets, - # process monitoring, notification center, clipboard history, dock, control center, - # lock screen, and comprehensive plugin system. - - # %package -n dms-cli - # Summary: DankMaterialShell CLI tool - # License: MIT - # URL: https://github.com/AvengeMedia/DankMaterialShell - - # %description -n dms-cli - # Command-line interface for DankMaterialShell configuration and management. - # Provides native DBus bindings, NetworkManager integration, and system utilities. - - # %prep - # %setup -q -c -n dms-qml - - # # Download architecture-specific binaries during build - # case "%{_arch}" in - # x86_64) - # ARCH_SUFFIX="amd64" - # ;; - # aarch64) - # ARCH_SUFFIX="arm64" - # ;; - # *) - # echo "Unsupported architecture: %{_arch}" - # exit 1 - # ;; - # esac - - # wget -O %{_builddir}/dms-cli.gz "https://github.com/AvengeMedia/DankMaterialShell/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 - - # %build - - # %install - # install -Dm755 %{_builddir}/dms-cli %{buildroot}%{_bindir}/dms - - # install -d %{buildroot}%{_datadir}/bash-completion/completions - # install -d %{buildroot}%{_datadir}/zsh/site-functions - # install -d %{buildroot}%{_datadir}/fish/vendor_completions.d - # %{_builddir}/dms-cli completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || : - # %{_builddir}/dms-cli completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || : - # %{_builddir}/dms-cli completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || : - - # install -Dm644 assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service - - # install -Dm644 assets/dms-open.desktop %{buildroot}%{_datadir}/applications/dms-open.desktop - # install -Dm644 assets/danklogo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg - - # install -dm755 %{buildroot}%{_datadir}/quickshell/dms - # cp -r %{_builddir}/dms-qml/* %{buildroot}%{_datadir}/quickshell/dms/ - - # rm -rf %{buildroot}%{_datadir}/quickshell/dms/.git* - # rm -f %{buildroot}%{_datadir}/quickshell/dms/.gitignore - # rm -rf %{buildroot}%{_datadir}/quickshell/dms/.github - # rm -rf %{buildroot}%{_datadir}/quickshell/dms/distro - - # echo "%{version}" > %{buildroot}%{_datadir}/quickshell/dms/VERSION - - # %posttrans - # if [ -d "%{_sysconfdir}/xdg/quickshell/dms" ]; then - # rmdir "%{_sysconfdir}/xdg/quickshell/dms" 2>/dev/null || true - # rmdir "%{_sysconfdir}/xdg/quickshell" 2>/dev/null || true - # rmdir "%{_sysconfdir}/xdg" 2>/dev/null || true - # fi - # # Signal running DMS instances to reload - # pkill -USR1 -x dms >/dev/null 2>&1 || : - - # %files - # %license LICENSE - # %doc README.md CONTRIBUTING.md - # %{_datadir}/quickshell/dms/ - # %{_userunitdir}/dms.service - # %{_datadir}/applications/dms-open.desktop - # %{_datadir}/icons/hicolor/scalable/apps/danklogo.svg - - # %files -n dms-cli - # %{_bindir}/dms - # %{_datadir}/bash-completion/completions/dms - # %{_datadir}/zsh/site-functions/_dms - # %{_datadir}/fish/vendor_completions.d/dms.fish - - # %changelog - # * CHANGELOG_DATE_PLACEHOLDER AvengeMedia - VERSION_PLACEHOLDER-1 - # - Stable release VERSION_PLACEHOLDER - # - Built from GitHub release - # SPECEOF - - # sed -i "s/VERSION_PLACEHOLDER/${VERSION}/g" ~/rpmbuild/SPECS/dms.spec - # sed -i "s/CHANGELOG_DATE_PLACEHOLDER/${CHANGELOG_DATE}/g" ~/rpmbuild/SPECS/dms.spec - - # - name: Build SRPM - # id: build - # run: | - # cd ~/rpmbuild/SPECS - # rpmbuild -bs dms.spec - - # SRPM=$(ls ~/rpmbuild/SRPMS/*.src.rpm | tail -n 1) - # SRPM_NAME=$(basename "$SRPM") - - # echo "srpm_path=$SRPM" >> $GITHUB_OUTPUT - # echo "srpm_name=$SRPM_NAME" >> $GITHUB_OUTPUT - # echo "SRPM built: $SRPM_NAME" - - # - name: Upload SRPM artifact - # uses: actions/upload-artifact@v4 - # with: - # name: dms-stable-srpm-${{ steps.version.outputs.version }} - # path: ${{ steps.build.outputs.srpm_path }} - # retention-days: 90 - - # - name: Install Copr CLI - # run: | - # sudo apt-get install -y python3-pip - # pip3 install copr-cli - - # mkdir -p ~/.config - # cat > ~/.config/copr << EOF - # [copr-cli] - # login = ${{ secrets.COPR_LOGIN }} - # username = avengemedia - # token = ${{ secrets.COPR_TOKEN }} - # copr_url = https://copr.fedorainfracloud.org - # EOF - # chmod 600 ~/.config/copr - - # - name: Upload to Copr - # run: | - # SRPM="${{ steps.build.outputs.srpm_path }}" - # VERSION="${{ steps.version.outputs.version }}" - - # echo "Uploading SRPM to avengemedia/dms..." - # BUILD_OUTPUT=$(copr-cli build avengemedia/dms "$SRPM" --nowait 2>&1) - # echo "$BUILD_OUTPUT" - - # BUILD_ID=$(echo "$BUILD_OUTPUT" | grep -oP 'Build was added to.*\K[0-9]+' || echo "unknown") - - # if [ "$BUILD_ID" != "unknown" ]; then - # echo "Build submitted: https://copr.fedorainfracloud.org/coprs/avengemedia/dms/build/$BUILD_ID/" - # fi diff --git a/.github/workflows/run-copr.yml b/.github/workflows/run-copr.yml index 6568ef23..8382b86d 100644 --- a/.github/workflows/run-copr.yml +++ b/.github/workflows/run-copr.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: version: - description: 'Versioning (e.g., 0.1.14, leave empty for latest release)' + description: 'Versioning (e.g., 1.0.3, leave empty for latest release)' required: false default: '' release: @@ -71,138 +71,10 @@ jobs: RELEASE="${{ steps.version.outputs.release }}" CHANGELOG_DATE="$(date '+%a %b %d %Y')" - cat > ~/rpmbuild/SPECS/dms.spec <<'SPECEOF' - # Spec for DMS stable releases - Generated by GitHub Actions - - %global debug_package %{nil} - %global version VERSION_PLACEHOLDER - %global pkg_summary DankMaterialShell - Material 3 inspired shell for Wayland compositors - - Name: dms - Version: %{version} - Release: RELEASE_PLACEHOLDER%{?dist} - Summary: %{pkg_summary} - - License: MIT - URL: https://github.com/AvengeMedia/DankMaterialShell - - Source0: dms-qml.tar.gz - - BuildRequires: gzip - BuildRequires: wget - BuildRequires: systemd-rpm-macros - - Requires: (quickshell or quickshell-git) - Requires: accountsservice - Requires: dms-cli = %{version}-%{release} - Requires: dgop - - Recommends: cava - Recommends: cliphist - Recommends: danksearch - Recommends: hyprpicker - Recommends: matugen - Recommends: wl-clipboard - Recommends: NetworkManager - Recommends: qt6-qtmultimedia - Suggests: qt6ct - - %description - DankMaterialShell (DMS) is a modern Wayland desktop shell built with Quickshell - and optimized for the niri and hyprland compositors. Features notifications, - app launcher, wallpaper customization, and fully customizable with plugins. - - Includes auto-theming for GTK/Qt apps with matugen, 20+ customizable widgets, - process monitoring, notification center, clipboard history, dock, control center, - lock screen, and comprehensive plugin system. - - %package -n dms-cli - Summary: DankMaterialShell CLI tool - License: MIT - URL: https://github.com/AvengeMedia/DankMaterialShell - - %description -n dms-cli - Command-line interface for DankMaterialShell configuration and management. - Provides native DBus bindings, NetworkManager integration, and system utilities. - - %prep - %setup -q -c -n dms-qml - - # 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/DankMaterialShell/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 - - %build - - %install - install -Dm755 %{_builddir}/dms-cli %{buildroot}%{_bindir}/dms - - # Shell completions - install -d %{buildroot}%{_datadir}/bash-completion/completions - install -d %{buildroot}%{_datadir}/zsh/site-functions - install -d %{buildroot}%{_datadir}/fish/vendor_completions.d - %{_builddir}/dms-cli completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || : - %{_builddir}/dms-cli completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || : - %{_builddir}/dms-cli completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || : - - install -Dm644 %{_builddir}/dms-qml/assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service - - install -dm755 %{buildroot}%{_datadir}/quickshell/dms - cp -r %{_builddir}/dms-qml/* %{buildroot}%{_datadir}/quickshell/dms/ - - rm -rf %{buildroot}%{_datadir}/quickshell/dms/.git* - rm -f %{buildroot}%{_datadir}/quickshell/dms/.gitignore - rm -rf %{buildroot}%{_datadir}/quickshell/dms/.github - rm -rf %{buildroot}%{_datadir}/quickshell/dms/distro - - %posttrans - # Clean up old installation path from previous versions (only if empty) - if [ -d "%{_sysconfdir}/xdg/quickshell/dms" ]; then - # Remove directories only if empty (preserves any user-added files) - rmdir "%{_sysconfdir}/xdg/quickshell/dms" 2>/dev/null || true - rmdir "%{_sysconfdir}/xdg/quickshell" 2>/dev/null || true - rmdir "%{_sysconfdir}/xdg" 2>/dev/null || true - fi - # Signal running DMS instances to reload (harmless if none running) - pkill -USR1 -x dms >/dev/null 2>&1 || : - - %files - %license LICENSE - %doc README.md CONTRIBUTING.md - %{_datadir}/quickshell/dms/ - %{_userunitdir}/dms.service - - %files -n dms-cli - %{_bindir}/dms - %{_datadir}/bash-completion/completions/dms - %{_datadir}/zsh/site-functions/_dms - %{_datadir}/fish/vendor_completions.d/dms.fish - - %changelog - * CHANGELOG_DATE_PLACEHOLDER AvengeMedia - VERSION_PLACEHOLDER-RELEASE_PLACEHOLDER - - Stable release VERSION_PLACEHOLDER - - Built from GitHub release - SPECEOF + # Copy spec file from repository + cp distro/fedora/dms.spec ~/rpmbuild/SPECS/dms.spec + # Replace placeholders with actual values sed -i "s/VERSION_PLACEHOLDER/${VERSION}/g" ~/rpmbuild/SPECS/dms.spec sed -i "s/RELEASE_PLACEHOLDER/${RELEASE}/g" ~/rpmbuild/SPECS/dms.spec sed -i "s/CHANGELOG_DATE_PLACEHOLDER/${CHANGELOG_DATE}/g" ~/rpmbuild/SPECS/dms.spec diff --git a/distro/fedora/dms-git.spec b/distro/fedora/dms-git.spec new file mode 100644 index 00000000..337f579e --- /dev/null +++ b/distro/fedora/dms-git.spec @@ -0,0 +1,136 @@ +# Spec for DMS - uses rpkg macros for git builds + +%global debug_package %{nil} +%global version {{{ git_repo_version }}} +%global pkg_summary DankMaterialShell - Material 3 inspired shell for Wayland compositors + +Name: dms +Epoch: 2 +Version: %{version} +Release: 1%{?dist} +Summary: %{pkg_summary} + +License: MIT +URL: https://github.com/AvengeMedia/DankMaterialShell +VCS: {{{ git_repo_vcs }}} +Source0: {{{ git_repo_pack }}} + +BuildRequires: git-core +BuildRequires: gzip +BuildRequires: golang >= 1.24 +BuildRequires: make +BuildRequires: wget +BuildRequires: systemd-rpm-macros + +# Core requirements +Requires: (quickshell-git or quickshell) +Requires: accountsservice +Requires: dms-cli = %{epoch}:%{version}-%{release} +Requires: dgop + +# Core utilities (Highly recommended for DMS functionality) +Recommends: cava +Recommends: cliphist +Recommends: danksearch +Recommends: matugen +Recommends: quickshell-git +Recommends: wl-clipboard + +# Recommended system packages +Recommends: NetworkManager +Recommends: qt6-qtmultimedia +Suggests: qt6ct + +%description +DankMaterialShell (DMS) is a modern Wayland desktop shell built with Quickshell +and optimized for the niri, hyprland, sway, and dwl (MangoWC) compositors. Features notifications, +app launcher, wallpaper customization, and fully customizable with plugins. + +Includes auto-theming for GTK/Qt apps with matugen, 20+ customizable widgets, +process monitoring, notification center, clipboard history, dock, control center, +lock screen, and comprehensive plugin system. + +%package -n dms-cli +Summary: DankMaterialShell CLI tool +License: MIT +URL: https://github.com/AvengeMedia/DankMaterialShell + +%description -n dms-cli +Command-line interface for DankMaterialShell configuration and management. +Provides native DBus bindings, NetworkManager integration, and system utilities. + +%prep +{{{ git_repo_setup_macro }}} + +%build +# Build DMS CLI from source (core/subdirectory) +VERSION="%{version}" +COMMIT=$(echo "%{version}" | grep -oP '[a-f0-9]{7,}' | head -n1 || echo "unknown") + +cd core +make dist VERSION="$VERSION" COMMIT="$COMMIT" + +%install +# Install dms-cli binary (built from source) +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 core/bin/${DMS_BINARY} %{buildroot}%{_bindir}/dms + +# Shell completions +install -d %{buildroot}%{_datadir}/bash-completion/completions +install -d %{buildroot}%{_datadir}/zsh/site-functions +install -d %{buildroot}%{_datadir}/fish/vendor_completions.d +core/bin/${DMS_BINARY} completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || : +core/bin/${DMS_BINARY} completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || : +core/bin/${DMS_BINARY} completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || : + +# Install systemd user service +install -Dm644 assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service + +install -Dm644 assets/dms-open.desktop %{buildroot}%{_datadir}/applications/dms-open.desktop +install -Dm644 assets/danklogo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg + +# Install shell files to shared data location +install -dm755 %{buildroot}%{_datadir}/quickshell/dms +cp -r quickshell/* %{buildroot}%{_datadir}/quickshell/dms/ + +# Remove build files +rm -rf %{buildroot}%{_datadir}/quickshell/dms/.git* +rm -f %{buildroot}%{_datadir}/quickshell/dms/.gitignore +rm -rf %{buildroot}%{_datadir}/quickshell/dms/.github +rm -rf %{buildroot}%{_datadir}/quickshell/dms/distro + +echo "%{version}" > %{buildroot}%{_datadir}/quickshell/dms/VERSION + +%posttrans +# Signal running DMS instances to reload +pkill -USR1 -x dms >/dev/null 2>&1 || : + +%files +%license LICENSE +%doc CONTRIBUTING.md +%doc quickshell/README.md +%{_datadir}/quickshell/dms/ +%{_userunitdir}/dms.service +%{_datadir}/applications/dms-open.desktop +%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg + +%files -n dms-cli +%{_bindir}/dms +%{_datadir}/bash-completion/completions/dms +%{_datadir}/zsh/site-functions/_dms +%{_datadir}/fish/vendor_completions.d/dms.fish + +%changelog +{{{ git_repo_changelog }}} diff --git a/distro/fedora/dms.spec b/distro/fedora/dms.spec index 337f579e..f1779600 100644 --- a/distro/fedora/dms.spec +++ b/distro/fedora/dms.spec @@ -1,49 +1,40 @@ -# Spec for DMS - uses rpkg macros for git builds +# Feodra spec for DMS stable releases %global debug_package %{nil} -%global version {{{ git_repo_version }}} +%global version VERSION_PLACEHOLDER %global pkg_summary DankMaterialShell - Material 3 inspired shell for Wayland compositors Name: dms -Epoch: 2 Version: %{version} -Release: 1%{?dist} +Release: RELEASE_PLACEHOLDER%{?dist} Summary: %{pkg_summary} License: MIT URL: https://github.com/AvengeMedia/DankMaterialShell -VCS: {{{ git_repo_vcs }}} -Source0: {{{ git_repo_pack }}} -BuildRequires: git-core +Source0: dms-qml.tar.gz + BuildRequires: gzip -BuildRequires: golang >= 1.24 -BuildRequires: make BuildRequires: wget BuildRequires: systemd-rpm-macros -# Core requirements -Requires: (quickshell-git or quickshell) +Requires: (quickshell or quickshell-git) Requires: accountsservice -Requires: dms-cli = %{epoch}:%{version}-%{release} +Requires: dms-cli = %{version}-%{release} Requires: dgop -# Core utilities (Highly recommended for DMS functionality) Recommends: cava Recommends: cliphist Recommends: danksearch Recommends: matugen -Recommends: quickshell-git Recommends: wl-clipboard - -# Recommended system packages Recommends: NetworkManager Recommends: qt6-qtmultimedia Suggests: qt6ct %description DankMaterialShell (DMS) is a modern Wayland desktop shell built with Quickshell -and optimized for the niri, hyprland, sway, and dwl (MangoWC) compositors. Features notifications, +and optimized for the niri and hyprland compositors. Features notifications, app launcher, wallpaper customization, and fully customizable with plugins. Includes auto-theming for GTK/Qt apps with matugen, 20+ customizable widgets, @@ -60,24 +51,14 @@ Command-line interface for DankMaterialShell configuration and management. Provides native DBus bindings, NetworkManager integration, and system utilities. %prep -{{{ git_repo_setup_macro }}} +%setup -q -c -n dms-qml -%build -# Build DMS CLI from source (core/subdirectory) -VERSION="%{version}" -COMMIT=$(echo "%{version}" | grep -oP '[a-f0-9]{7,}' | head -n1 || echo "unknown") - -cd core -make dist VERSION="$VERSION" COMMIT="$COMMIT" - -%install -# Install dms-cli binary (built from source) case "%{_arch}" in x86_64) - DMS_BINARY="dms-linux-amd64" + ARCH_SUFFIX="amd64" ;; aarch64) - DMS_BINARY="dms-linux-arm64" + ARCH_SUFFIX="arm64" ;; *) echo "Unsupported architecture: %{_arch}" @@ -85,27 +66,35 @@ case "%{_arch}" in ;; esac -install -Dm755 core/bin/${DMS_BINARY} %{buildroot}%{_bindir}/dms +# Download dms-cli for target architecture +wget -O %{_builddir}/dms-cli.gz "https://github.com/AvengeMedia/DankMaterialShell/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 + +%build + +%install +install -Dm755 %{_builddir}/dms-cli %{buildroot}%{_bindir}/dms # Shell completions install -d %{buildroot}%{_datadir}/bash-completion/completions install -d %{buildroot}%{_datadir}/zsh/site-functions install -d %{buildroot}%{_datadir}/fish/vendor_completions.d -core/bin/${DMS_BINARY} completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || : -core/bin/${DMS_BINARY} completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || : -core/bin/${DMS_BINARY} completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || : +%{_builddir}/dms-cli completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || : +%{_builddir}/dms-cli completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || : +%{_builddir}/dms-cli completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || : -# Install systemd user service -install -Dm644 assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service +install -Dm644 %{_builddir}/dms-qml/assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service -install -Dm644 assets/dms-open.desktop %{buildroot}%{_datadir}/applications/dms-open.desktop -install -Dm644 assets/danklogo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg +install -Dm644 %{_builddir}/dms-qml/assets/dms-open.desktop %{buildroot}%{_datadir}/applications/dms-open.desktop +install -Dm644 %{_builddir}/dms-qml/assets/danklogo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg -# Install shell files to shared data location install -dm755 %{buildroot}%{_datadir}/quickshell/dms -cp -r quickshell/* %{buildroot}%{_datadir}/quickshell/dms/ +cp -r %{_builddir}/dms-qml/* %{buildroot}%{_datadir}/quickshell/dms/ -# Remove build files rm -rf %{buildroot}%{_datadir}/quickshell/dms/.git* rm -f %{buildroot}%{_datadir}/quickshell/dms/.gitignore rm -rf %{buildroot}%{_datadir}/quickshell/dms/.github @@ -119,8 +108,7 @@ pkill -USR1 -x dms >/dev/null 2>&1 || : %files %license LICENSE -%doc CONTRIBUTING.md -%doc quickshell/README.md +%doc README.md CONTRIBUTING.md %{_datadir}/quickshell/dms/ %{_userunitdir}/dms.service %{_datadir}/applications/dms-open.desktop @@ -133,4 +121,6 @@ pkill -USR1 -x dms >/dev/null 2>&1 || : %{_datadir}/fish/vendor_completions.d/dms.fish %changelog -{{{ git_repo_changelog }}} +* CHANGELOG_DATE_PLACEHOLDER AvengeMedia - VERSION_PLACEHOLDER-RELEASE_PLACEHOLDER +- Stable release VERSION_PLACEHOLDER +- Built from GitHub release