diff --git a/Dockerfile b/Dockerfile index 923920228..4afa6583b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian +FROM debian:unstable RUN apt-get update && apt-get upgrade -y RUN apt-get install -y build-essential git diff --git a/Makefile b/Makefile index fb688f8e6..51f5463bd 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ build: -arch="amd64" \ -output="dist/{{.Dir}}_{{.OS}}_{{.Arch}}" \ -ldflags=$(LDFLAGS) - + -gox \ -os="linux freebsd netbsd openbsd" \ -output="dist/{{.Dir}}_{{.OS}}_{{.Arch}}" \ @@ -32,7 +32,13 @@ build: build-deb: clean docker build -t debian_go . - docker run -v $(CURDIR)/..:/xxx -w /xxx/gdu debian_go bash -c "dpkg-buildpackage" + docker run -v $(CURDIR)/..:/xxx -w /xxx/gdu debian_go bash -c "make build-deb-local" + +build-deb-local: + $(eval TAG := $(shell echo $(VERSION) | sed -e "s/-.*//g")) + $(eval DEB_VERSION := $(shell echo $(TAG) | sed -e "s/v//g")) + git archive --format=tar.gz HEAD >../gdu_$(DEB_VERSION).orig.tar.gz + debuild -us -uc -i test: go test -v $(PACKAGES) diff --git a/debian/changelog b/debian/changelog index b98a04c68..58da543be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,21 @@ +gdu (4.1.0-1) unstable; urgency=medium + + * improved debian packaging + * added man page + + -- Daniel Milde Mon, 18 Jan 2021 14:41:04 +0000 + gdu (4.0.0-1) unstable; urgency=medium * analyze current directory when no argument is passed * added option --show-disks - * select previous directory when going up + * select previous directory when going up -- Daniel Milde Mon, 18 Jan 2021 11:46:05 +0000 gdu (3.0.0-0) UNRELEASED; urgency=medium - * POSIX/GNU style flags: --log-file (or just -l) instead of -log-file + * POSIX/GNU style flags: --log-file (or just -l) instead of -log-file -- Daniel Milde Fri, 15 Jan 2021 18:23:42 +0200 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index f599e28b8..000000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/debian/control b/debian/control index 0e65846c4..ad0912645 100644 --- a/debian/control +++ b/debian/control @@ -1,17 +1,23 @@ Source: gdu +Section: admin +Priority: optional Maintainer: Daniel Milde Homepage: https://github.com/dundee/gdu Vcs-Git: https://github.com/dundee/gdu.git Vcs-Browser: https://github.com/dundee/gdu -Standards-Version: 4.5.1 -Section: Utilities +Standards-Version: 4.5.0 +XS-Go-Import-Path: github.com/dundee/gdu Build-Depends: debhelper (>= 9), - dh-golang, - golang-go, - git + debhelper-compat (= 13), + dh-golang, + golang-go, + git Package: gdu Architecture: any +Built-Using: ${misc:Built-Using} +Depends: ${shlibs:Depends}, ${misc:Depends} Description: Pretty fast disk usage analyzer written in Go - 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. + 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. diff --git a/debian/copyright b/debian/copyright index 7559332cd..8ee0dbf4b 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: gdu Upstream-Contact: Daniel Milde Source: https://github.com/dundee/gdu diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 000000000..1365144d1 --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +gdu.1 \ No newline at end of file diff --git a/debian/rules b/debian/rules index 2c4cc0e75..4905bb184 100755 --- a/debian/rules +++ b/debian/rules @@ -1,8 +1,7 @@ #!/usr/bin/make -f -export DH_GOPKG := github.com/dundee/gdu export GO111MODULE := on -export GOCACHE := on +export GOPROXY=https://proxy.golang.org %: dh $@ --buildsystem=golang --with=golang diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000..4a9c646bc --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/-$1\.tar\.gz/ \ + https://github.com/dundee/gdu/tags .*/v?(\d\S+)\.tar\.gz diff --git a/gdu.1 b/gdu.1 new file mode 100644 index 000000000..9993f084d --- /dev/null +++ b/gdu.1 @@ -0,0 +1,59 @@ +.nh +.TH "gdu" "1" "Jan 2021" "Auto generated by spf13/cobra" "" + +.SH NAME +.PP +gdu \- Pretty fast disk usage analyzer written in Go + + +.SH SYNOPSIS +.PP +\fBgdu [directory\_to\_scan] [flags]\fP + + +.SH DESCRIPTION +.PP +Pretty fast disk usage analyzer written in Go. + +.PP +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. + + +.SH OPTIONS +.PP +\fB\-h\fP, \fB\-\-help\fP[=false] + help for gdu + +.PP +\fB\-i\fP, \fB\-\-ignore\-dirs\fP=[/proc,/dev,/sys,/run] + Absolute paths to ignore (separated by comma) + +.PP +\fB\-l\fP, \fB\-\-log\-file\fP="/dev/null" + Path to a logfile + +.PP +\fB\-c\fP, \fB\-\-no\-color\fP[=false] + Do not use colorized output + +.PP +\fB\-p\fP, \fB\-\-no\-progress\fP[=false] + Do not show progress + +.PP +\fB\-n\fP, \fB\-\-non\-interactive\fP[=false] + Do not run in interactive mode + +.PP +\fB\-d\fP, \fB\-\-show\-disks\fP[=false] + Show all mounted disks + +.PP +\fB\-v\fP, \fB\-\-version\fP[=false] + Print version + + +.SH HISTORY +.PP +18\-Jan\-2021 Auto generated by spf13/cobra diff --git a/tui/tui.go b/tui/tui.go index 58fdd66ed..f580a6abb 100644 --- a/tui/tui.go +++ b/tui/tui.go @@ -100,7 +100,7 @@ func CreateUI(screen tcell.Screen, useColors bool) *UI { ui.footer.SetTextColor(tcell.ColorBlack) ui.footer.SetBackgroundColor(tcell.ColorWhite) } - ui.footer.SetText(" No items to diplay. ") + ui.footer.SetText(" No items to display. ") grid := tview.NewGrid().SetRows(1, 1, 0, 1).SetColumns(0) grid.AddItem(ui.header, 0, 0, 1, 1, 0, 0, false).