star/gdu/snapcraft.yaml
2025-04-26 19:33:14 +08:00

31 lines
1.0 KiB
YAML

name: gdu-disk-usage-analyzer
version: git
summary: Pretty fast disk usage analyzer written in Go.
description: |
Gdu is intended primarily for SSD disks where it can fully utilize parallel processing.
However HDDs work as well, but the performance gain is not so huge.
confinement: strict
base: core20
parts:
gdu:
plugin: go
source: .
override-build: |
GO111MODULE=on CGO_ENABLED=0 go build \
-buildmode=pie -trimpath -mod=readonly -modcacherw \
-ldflags \
"-s -w \
-X 'b612.me/apps/b612/gdu/build.Version=$(git describe)' \
-X 'b612.me/apps/b612/gdu/build.User=$(id -u -n)' \
-X 'b612.me/apps/b612/gdu/build.Time=$(LC_ALL=en_US.UTF-8 date)' \
-X 'b612.me/apps/b612/gdu/build.RootPathPrefix=/var/lib/snapd/hostfs'" \
-o $SNAPCRAFT_PART_INSTALL/gdu \
b612.me/apps/b612/gdu/cmd/gdu
$SNAPCRAFT_PART_INSTALL/gdu -v
apps:
gdu:
command: gdu
plugs:
- mount-observe
- system-backup