1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-11 07:52:50 -05:00

Update dms-cli for OBS packages

This commit is contained in:
purian23
2025-11-26 23:27:33 -05:00
parent e129e4a2d0
commit 1978e67401
9 changed files with 173 additions and 64 deletions

View File

@@ -1,5 +1,5 @@
<services>
<!-- Pull full git repository for master branch -->
<!-- Git source and vendoring -->
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/AvengeMedia/DankMaterialShell.git</param>
@@ -10,7 +10,7 @@
<param name="file">*.tar</param>
<param name="compression">gz</param>
</service>
<!-- Download pre-built binaries (fallback for Debian 13 with Go 1.22) -->
<!-- Binary downloads kept for backwards compat - removed after successful source builds
<service name="download_url">
<param name="protocol">https</param>
<param name="host">github.com</param>
@@ -21,4 +21,5 @@
<param name="host">github.com</param>
<param name="path">/AvengeMedia/DankMaterialShell/releases/latest/download/dms-distropkg-arm64.gz</param>
</service>
-->
</services>

View File

@@ -1,8 +1,12 @@
dms-git (0.6.2+git) nightly; urgency=medium
dms-git (0.6.2+git5) nightly; urgency=medium
* Fix debian/rules to use source at root level (native format)
* Remove incorrect dms-git-source subdirectory references
* Fix Build-Depends parsing path issue in obs-upload.sh auto-increment
* Fix Build-Depends parsing in obs-upload.sh for proper dependency extraction
* Build dms binary from source for true git version strings
* Match Fedora COPR git build behavior
* Now shows proper git version (e.g., v0.6.2-11-g12e91534)
* Add golang-go and make as build dependencies
-- Avenge Media <AvengeMedia.US@gmail.com> Fri, 22 Nov 2025 00:00:00 -0500
-- Avenge Media <AvengeMedia.US@gmail.com> Wed, 27 Nov 2025 04:15:00 -0500

View File

@@ -2,7 +2,8 @@ Source: dms-git
Section: x11
Priority: optional
Maintainer: Avenge Media <AvengeMedia.US@gmail.com>
Build-Depends: debhelper-compat (= 13)
Build-Depends: debhelper-compat (= 13),
golang-go | golang (>= 2:1.22~) | golang-any
Standards-Version: 4.6.2
Homepage: https://github.com/AvengeMedia/DankMaterialShell
Vcs-Browser: https://github.com/AvengeMedia/DankMaterialShell

View File

@@ -1,31 +1,55 @@
#!/usr/bin/make -f
export DH_VERBOSE = 1
# Version info from changelog
DEB_VERSION := $(shell dpkg-parsechangelog -S Version)
UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed 's/-[^-]*$$//')
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
# Go needs writable directories for cache
export HOME := $(CURDIR)/debian/tmp-home
export GOCACHE := $(CURDIR)/debian/tmp-home/go-cache
export GOMODCACHE := $(CURDIR)/debian/tmp-home/go-mod
export GOTOOLCHAIN := local
%:
dh $@
override_dh_auto_build:
# Create Go cache directories
mkdir -p $(HOME) $(GOCACHE) $(GOMODCACHE)
# Verify core directory exists (native package format has source at root)
test -d core || (echo "ERROR: core directory not found!" && exit 1)
# Patch go.mod to use Go 1.24 base version (Debian 13 has 1.23.x, may vary)
sed -i 's/^go 1\.24\.[0-9]*/go 1.24/' core/go.mod
# Extract version info for embedding
VERSION="$(UPSTREAM_VERSION)"
COMMIT=$$(echo "$(UPSTREAM_VERSION)" | grep -oP '(?<=git)[0-9]+\.[a-f0-9]+' | cut -d. -f2 | head -c8 || echo "unknown")
# Build dms-cli from source using vendored dependencies
# Architecture mapping: Debian amd64/arm64 -> Makefile amd64/arm64
if [ "$(DEB_HOST_ARCH)" = "amd64" ]; then \
if [ -f dms-distropkg-amd64.gz ]; then \
gunzip -c dms-distropkg-amd64.gz > dms; \
elif [ -f ../SOURCES/dms-distropkg-amd64.gz ]; then \
gunzip -c ../SOURCES/dms-distropkg-amd64.gz > dms; \
else \
echo "ERROR: dms-distropkg-amd64.gz not found!" && exit 1; \
fi \
MAKE_ARCH=amd64; \
BINARY_NAME=dms-linux-amd64; \
elif [ "$(DEB_HOST_ARCH)" = "arm64" ]; then \
if [ -f dms-distropkg-arm64.gz ]; then \
gunzip -c dms-distropkg-arm64.gz > dms; \
elif [ -f ../SOURCES/dms-distropkg-arm64.gz ]; then \
gunzip -c ../SOURCES/dms-distropkg-arm64.gz > dms; \
else \
echo "ERROR: dms-distropkg-arm64.gz not found!" && exit 1; \
fi \
MAKE_ARCH=arm64; \
BINARY_NAME=dms-linux-arm64; \
else \
echo "Unsupported architecture: $(DEB_HOST_ARCH)" && exit 1; \
echo "ERROR: Unsupported architecture: $(DEB_HOST_ARCH)" && exit 1; \
fi; \
echo "Building with VERSION=$$VERSION COMMIT=$$COMMIT ARCH=$$MAKE_ARCH"; \
cd core && $(MAKE) GOFLAGS="-mod=vendor" dist ARCH=$$MAKE_ARCH VERSION="$$VERSION" COMMIT="$$COMMIT"
# Copy binary to expected location
if [ "$(DEB_HOST_ARCH)" = "amd64" ]; then \
cp core/bin/dms-linux-amd64 dms; \
elif [ "$(DEB_HOST_ARCH)" = "arm64" ]; then \
cp core/bin/dms-linux-arm64 dms; \
fi
chmod +x dms
@@ -36,11 +60,8 @@ override_dh_auto_install:
if [ -d quickshell ]; then \
cp -r quickshell/* debian/dms-git/usr/share/quickshell/dms/; \
install -Dm644 quickshell/assets/systemd/dms.service debian/dms-git/usr/lib/systemd/user/dms.service; \
elif [ -d dms-git-source/quickshell ]; then \
cp -r dms-git-source/quickshell/* debian/dms-git/usr/share/quickshell/dms/; \
install -Dm644 dms-git-source/quickshell/assets/systemd/dms.service debian/dms-git/usr/lib/systemd/user/dms.service; \
else \
echo "ERROR: quickshell directory not found (checked root and dms-git-source/)!" && \
echo "ERROR: quickshell directory not found!" && \
echo "Contents of current directory:" && ls -la && \
exit 1; \
fi
@@ -49,6 +70,8 @@ override_dh_auto_install:
debian/dms-git/usr/share/quickshell/dms/distro
override_dh_auto_clean:
# Clean up build artifacts
rm -f dms
[ ! -d dms-git-source ] || rm -rf dms-git-source
rm -rf core/bin
rm -rf debian/tmp-home
dh_auto_clean

View File

@@ -1 +1 @@
dms-distropkg-amd64.gz
# dms-cli is built from source