Skip to content
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
5 changes: 2 additions & 3 deletions .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgbase = coolerdash
pkgdesc = Plug-in for CoolerControl that extends the LCD functionality with additional features
pkgver = 3.1.2
pkgver = 3.1.3
pkgrel = 1
url = https://github.com/damachine/coolerdash
install = coolerdash.install
Expand All @@ -17,7 +17,6 @@ pkgbase = coolerdash
provides = coolerdash-git
conflicts = coolerdash-git
replaces = coolerdash-git
backup = etc/coolercontrol/plugins/coolerdash/config.json
backup = etc/coolercontrol/plugins/coolerdash/credentials.json
backup = var/lib/coolercontrol/plugins/coolerdash/config.json

pkgname = coolerdash
14 changes: 7 additions & 7 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

steps:
- name: Checkout CoolerDash code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Update package manager
run: ${{ matrix.pre_install }}
Expand Down Expand Up @@ -102,31 +102,31 @@ jobs:
fi

# Check plugin files
if [ -f "/tmp/install-test/etc/coolercontrol/plugins/coolerdash/config.json" ]; then
if [ -f "/tmp/install-test/var/lib/coolercontrol/plugins/coolerdash/config.json" ]; then
echo "✅ Config file installed (plugin mode)"
else
echo "❌ Config file not found"
exit 1
fi

# Check manifest.toml
if [ -f "/tmp/install-test/etc/coolercontrol/plugins/coolerdash/manifest.toml" ]; then
if [ -f "/tmp/install-test/var/lib/coolercontrol/plugins/coolerdash/manifest.toml" ]; then
echo "✅ Plugin manifest installed"
else
echo "❌ Plugin manifest not found"
exit 1
fi

# Check UI files
if [ -f "/tmp/install-test/etc/coolercontrol/plugins/coolerdash/ui/index.html" ]; then
if [ -f "/tmp/install-test/var/lib/coolercontrol/plugins/coolerdash/ui/index.html" ]; then
echo "✅ Plugin UI file installed"
else
echo "❌ Plugin UI file not found"
exit 1
fi

# Check CC-Plugin Lib JS is NOT installed (served by CoolerControl)
if [ -f "/tmp/install-test/etc/coolercontrol/plugins/coolerdash/ui/cc-plugin-lib.js" ]; then
if [ -f "/tmp/install-test/var/lib/coolercontrol/plugins/coolerdash/ui/cc-plugin-lib.js" ]; then
echo "❌ Plugin Lib JS should NOT be installed (served by CoolerControl)"
exit 1
else
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Arch Linux
run: |
Expand All @@ -202,7 +202,7 @@ jobs:
fi

# Check plugin config
if [ -f "/tmp/install-test/etc/coolercontrol/plugins/coolerdash/config.json" ]; then
if [ -f "/tmp/install-test/var/lib/coolercontrol/plugins/coolerdash/config.json" ]; then
echo "✅ Config file installed"
else
echo "❌ Config file not found"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
commit_sha: ${{ steps.commit.outputs.sha }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
git

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: master
fetch-depth: 0
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -466,7 +466,7 @@ jobs:
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout main repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ coolerdash-bin/
*.old
*.db
*.files
docs/
src/
pkg/
bin/
Expand Down
30 changes: 27 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ INSTALL ?= install
INSTALL_PROGRAM ?= $(INSTALL)
INSTALL_DATA ?= $(INSTALL) -m 644

# Plugin directory (derived)
PLUGINDIR = $(sysconfdir)/coolercontrol/plugins/coolerdash
# Plugin directory (canonical path per CoolerControl cc-plugins spec)
PLUGINDIR = /var/lib/coolercontrol/plugins/coolerdash

# Colors for terminal output
RED = \033[0;31m
Expand Down Expand Up @@ -239,7 +239,7 @@ check: $(OBJDIR)
./$(OBJDIR)/test_scaling
@printf "$(GREEN)All tests passed$(RESET)\n"

# Install binary to /usr/libexec, plugin data to /etc/coolercontrol/plugins/coolerdash/
# Install binary to /usr/libexec, plugin data to /var/lib/coolercontrol/plugins/coolerdash/
install: check-deps $(TARGET)
@printf "\n"
@printf "$(WHITE)=== COOLERDASH INSTALLATION ===$(RESET)\n"
Expand Down Expand Up @@ -322,6 +322,28 @@ install: check-deps $(TARGET)
printf " $(BLUE)->$(RESET) No legacy files found (clean install)\n"; \
fi; \
printf "\n"; \
if [ -f /etc/coolercontrol/plugins/coolerdash/config.json ] && \
[ ! -f "$(PLUGINDIR)/config.json" ]; then \
$(SUDO) mkdir -p "$(PLUGINDIR)"; \
$(SUDO) cp /etc/coolercontrol/plugins/coolerdash/config.json \
"$(PLUGINDIR)/config.json"; \
$(SUDO) chmod 600 "$(PLUGINDIR)/config.json"; \
printf " $(GREEN)Migrated:$(RESET) config.json to $(PLUGINDIR)/\n"; \
fi; \
if [ -f /etc/coolercontrol/plugins/coolerdash/credentials.json ] && \
[ ! -f "$(PLUGINDIR)/credentials.json" ]; then \
$(SUDO) mkdir -p "$(PLUGINDIR)"; \
$(SUDO) cp /etc/coolercontrol/plugins/coolerdash/credentials.json \
"$(PLUGINDIR)/credentials.json"; \
$(SUDO) chmod 600 "$(PLUGINDIR)/credentials.json"; \
printf " $(GREEN)Migrated:$(RESET) credentials.json to $(PLUGINDIR)/\n"; \
fi; \
rm -f /etc/coolercontrol/plugins/coolerdash/manifest.toml; \
rm -rf /etc/coolercontrol/plugins/coolerdash/ui; \
rm -f /etc/coolercontrol/plugins/coolerdash/shutdown.png; \
rm -f /etc/coolercontrol/plugins/coolerdash/README.md; \
rm -f /etc/coolercontrol/plugins/coolerdash/CHANGELOG.md; \
rm -f /etc/coolercontrol/plugins/coolerdash/VERSION; \
COOLERDASH_COUNT=$$(pgrep -x coolerdash 2>/dev/null | wc -l); \
if [ "$$COOLERDASH_COUNT" -gt 0 ]; then \
printf "$(CYAN)Terminating running coolerdash process(es)...$(RESET)\n"; \
Expand Down Expand Up @@ -484,6 +506,8 @@ uninstall:
fi; \
fi
@$(SUDO) rm -rf "$(DESTDIR)$(PLUGINDIR)"
# Legacy path cleanup for users upgrading from older versions
@$(SUDO) rm -rf "$(DESTDIR)/etc/coolercontrol/plugins/coolerdash"
@$(SUDO) rm -rf "$(DESTDIR)$(libexecdir)/coolerdash"
@$(SUDO) rm -rf "$(DESTDIR)$(datarootdir)/licenses/coolerdash"
@$(SUDO) rm -f "$(DESTDIR)$(mandir)/man1/coolerdash.1"
Expand Down
36 changes: 18 additions & 18 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ license=('MIT')
depends=('cairo' 'jansson' 'libcurl-gnutls' 'ttf-roboto')
makedepends=('gcc' 'make' 'pkg-config' 'git')
optdepends=()
backup=('etc/coolercontrol/plugins/coolerdash/config.json'
'etc/coolercontrol/plugins/coolerdash/credentials.json')
backup=('var/lib/coolercontrol/plugins/coolerdash/config.json')
install=coolerdash.install
source=()
sha256sums=()
Expand All @@ -43,14 +42,14 @@ build() {
make

# Copy files to srcdir for packaging (fakeroot cannot access startdir)
mkdir -p "${srcdir}/bin" "${srcdir}/images" "${srcdir}/man" "${srcdir}/etc/coolercontrol/plugins/coolerdash/ui" "${srcdir}/etc/applications" "${srcdir}/etc/icons"
mkdir -p "${srcdir}/bin" "${srcdir}/images" "${srcdir}/man" "${srcdir}/var/lib/coolercontrol/plugins/coolerdash/ui" "${srcdir}/etc/applications" "${srcdir}/etc/icons"
cp -a bin/coolerdash "${srcdir}/bin/coolerdash"
cp -a README.md CHANGELOG.md VERSION LICENSE "${srcdir}/"
cp -a etc/coolercontrol/plugins/coolerdash/config.json "${srcdir}/etc/coolercontrol/plugins/coolerdash/"
cp -a etc/coolercontrol/plugins/coolerdash/ui/index.html "${srcdir}/etc/coolercontrol/plugins/coolerdash/ui/"
cp -a etc/coolercontrol/plugins/coolerdash/config.json "${srcdir}/var/lib/coolercontrol/plugins/coolerdash/"
cp -a etc/coolercontrol/plugins/coolerdash/ui/index.html "${srcdir}/var/lib/coolercontrol/plugins/coolerdash/ui/"
cp -a images/shutdown.png "${srcdir}/images/"
cp -a man/coolerdash.1 "${srcdir}/man/"
cp -a etc/coolercontrol/plugins/coolerdash/manifest.toml "${srcdir}/etc/coolercontrol/plugins/coolerdash/"
cp -a etc/coolercontrol/plugins/coolerdash/manifest.toml "${srcdir}/var/lib/coolercontrol/plugins/coolerdash/"
cp -a etc/applications/coolerdash.desktop "${srcdir}/etc/applications/"
cp -a etc/icons/coolerdash.svg "${srcdir}/etc/icons/"
}
Expand All @@ -69,21 +68,22 @@ check() {
}

package() {
# Binary to /usr/libexec, plugin data stays in /etc/coolercontrol/plugins/
install -dm755 "${pkgdir}/etc/coolercontrol/plugins/coolerdash"
# Binary to /usr/libexec, plugin data to /var/lib/coolercontrol/plugins/
install -dm711 "${pkgdir}/var/lib/coolercontrol"
install -dm755 "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash"
install -Dm755 "${srcdir}/bin/coolerdash" "${pkgdir}/usr/libexec/coolerdash/coolerdash"
install -Dm644 "${srcdir}/README.md" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/README.md"
install -Dm644 "${srcdir}/VERSION" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/VERSION"
install -Dm644 "${srcdir}/CHANGELOG.md" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/CHANGELOG.md"
install -Dm600 "${srcdir}/etc/coolercontrol/plugins/coolerdash/config.json" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/config.json"
install -Dm644 "${srcdir}/README.md" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/README.md"
install -Dm644 "${srcdir}/VERSION" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/VERSION"
install -Dm644 "${srcdir}/CHANGELOG.md" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/CHANGELOG.md"
install -Dm600 "${srcdir}/var/lib/coolercontrol/plugins/coolerdash/config.json" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/config.json"

install -dm755 "${pkgdir}/etc/coolercontrol/plugins/coolerdash/ui"
install -m644 "${srcdir}/etc/coolercontrol/plugins/coolerdash/ui/index.html" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/ui/index.html"
install -Dm644 "${srcdir}/images/shutdown.png" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/shutdown.png"
install -Dm644 "${srcdir}/etc/coolercontrol/plugins/coolerdash/manifest.toml" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/manifest.toml"
install -dm755 "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/ui"
install -m644 "${srcdir}/var/lib/coolercontrol/plugins/coolerdash/ui/index.html" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/ui/index.html"
install -Dm644 "${srcdir}/images/shutdown.png" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/shutdown.png"
install -Dm644 "${srcdir}/var/lib/coolercontrol/plugins/coolerdash/manifest.toml" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/manifest.toml"

sed -i "s/{{VERSION}}/${pkgver}/g" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/manifest.toml"
sed -i "s/{{VERSION}}/${pkgver}/g" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/ui/index.html"
sed -i "s/{{VERSION}}/${pkgver}/g" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/manifest.toml"
sed -i "s/{{VERSION}}/${pkgver}/g" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/ui/index.html"

install -Dm644 "${srcdir}/man/coolerdash.1" "${pkgdir}/usr/share/man/man1/coolerdash.1"
install -Dm644 "${srcdir}/etc/applications/coolerdash.desktop" "${pkgdir}/usr/share/applications/coolerdash.desktop"
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.1.3
28 changes: 14 additions & 14 deletions aur/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ url="https://github.com/damachine/coolerdash"
license=('MIT')
depends=('cairo' 'coolercontrol' 'jansson' 'libcurl-gnutls' 'ttf-roboto')
makedepends=('gcc' 'make' 'pkg-config' 'git')
backup=('etc/coolercontrol/plugins/coolerdash/config.json'
'etc/coolercontrol/plugins/coolerdash/credentials.json')
backup=('var/lib/coolercontrol/plugins/coolerdash/config.json')
install=coolerdash.install
_commit=
source=("coolerdash-git::git+https://github.com/damachine/coolerdash.git#commit=${_commit}")
Expand Down Expand Up @@ -56,21 +55,22 @@ check() {
}

package() {
# Binary to /usr/libexec, plugin data stays in /etc/coolercontrol/plugins/
install -dm755 "${pkgdir}/etc/coolercontrol/plugins/coolerdash"
# Binary to /usr/libexec, plugin data to /var/lib/coolercontrol/plugins/
install -dm711 "${pkgdir}/var/lib/coolercontrol"
install -dm755 "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash"
install -Dm755 "${srcdir}/${pkgname}/bin/coolerdash" "${pkgdir}/usr/libexec/coolerdash/coolerdash"
install -m644 "${srcdir}/${pkgname}/README.md" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/README.md"
install -m644 "${srcdir}/${pkgname}/VERSION" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/VERSION"
install -m644 "${srcdir}/${pkgname}/CHANGELOG.md" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/CHANGELOG.md"
install -m600 "${srcdir}/${pkgname}/etc/coolercontrol/plugins/coolerdash/config.json" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/config.json"
install -m644 "${srcdir}/${pkgname}/README.md" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/README.md"
install -m644 "${srcdir}/${pkgname}/VERSION" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/VERSION"
install -m644 "${srcdir}/${pkgname}/CHANGELOG.md" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/CHANGELOG.md"
install -m600 "${srcdir}/${pkgname}/etc/coolercontrol/plugins/coolerdash/config.json" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/config.json"

install -dm755 "${pkgdir}/etc/coolercontrol/plugins/coolerdash/ui"
install -m644 "${srcdir}/${pkgname}/etc/coolercontrol/plugins/coolerdash/ui/index.html" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/ui/index.html"
install -m644 "${srcdir}/${pkgname}/images/shutdown.png" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/shutdown.png"
install -m644 "${srcdir}/${pkgname}/etc/coolercontrol/plugins/coolerdash/manifest.toml" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/manifest.toml"
install -dm755 "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/ui"
install -m644 "${srcdir}/${pkgname}/etc/coolercontrol/plugins/coolerdash/ui/index.html" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/ui/index.html"
install -m644 "${srcdir}/${pkgname}/images/shutdown.png" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/shutdown.png"
install -m644 "${srcdir}/${pkgname}/etc/coolercontrol/plugins/coolerdash/manifest.toml" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/manifest.toml"

sed -i "s/{{VERSION}}/${pkgver}/g" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/manifest.toml"
sed -i "s/{{VERSION}}/${pkgver}/g" "${pkgdir}/etc/coolercontrol/plugins/coolerdash/ui/index.html"
sed -i "s/{{VERSION}}/${pkgver}/g" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/manifest.toml"
sed -i "s/{{VERSION}}/${pkgver}/g" "${pkgdir}/var/lib/coolercontrol/plugins/coolerdash/ui/index.html"

install -Dm644 "${srcdir}/${pkgname}/man/coolerdash.1" "${pkgdir}/usr/share/man/man1/coolerdash.1"
install -Dm644 "${srcdir}/${pkgname}/etc/applications/coolerdash.desktop" "${pkgdir}/usr/share/applications/coolerdash.desktop"
Expand Down
Loading