Skip to content

Commit

Permalink
improved debian packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Milde committed Jan 18, 2021
1 parent e6df9c4 commit 66db0a5
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}}" \
Expand All @@ -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)
Expand Down
11 changes: 9 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
gdu (4.1.0-1) unstable; urgency=medium

* improved debian packaging
* added man page

-- Daniel Milde <[email protected]> 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 <[email protected]> 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 <[email protected]> Fri, 15 Jan 2021 18:23:42 +0200

Expand Down
1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

20 changes: 13 additions & 7 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
Source: gdu
Section: admin
Priority: optional
Maintainer: Daniel Milde <[email protected]>
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.
2 changes: 1 addition & 1 deletion debian/copyright
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Source: https://github.com/dundee/gdu
Expand Down
1 change: 1 addition & 0 deletions debian/manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gdu.1
3 changes: 1 addition & 2 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
3 changes: 3 additions & 0 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version=4
opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/<project>-$1\.tar\.gz/ \
https://github.com/dundee/gdu/tags .*/v?(\d\S+)\.tar\.gz
59 changes: 59 additions & 0 deletions gdu.1
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 66db0a5

Please sign in to comment.