Skip to content

Commit

Permalink
Added debian package generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
stolk committed Sep 8, 2022
1 parent 98b4bae commit 5b8fc7d
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ TARGET = diskgraph
SRC = diskgraph.c
OBJ = $(SRC:.c=.o)

DISTFILES=\
Makefile \
diskgraph.c \
diskgraph.1 \
README.md \
LICENSE \
images \
debian

all: $(TARGET)

$(TARGET): $(OBJ)
Expand All @@ -17,3 +26,19 @@ $(TARGET): $(OBJ)
clean:
$(RM) *.o $(TARGET)
@echo All clean

install: diskgraph
install -d ${DESTDIR}/usr/bin
install -m 755 diskgraph ${DESTDIR}/usr/bin/

uninstall:
rm -f ${DESTDIR}/usr/bin/distgraph

tarball:
tar cvzf ../diskgraph_1.0.orig.tar.gz $(DISTFILES)

packageupload:
debuild -S
debsign ../diskgraph_1.0-1_source.changes
dput ppa:b-stolk/ppa ../diskgraph_1.0-1_source.changes

5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
diskgraph (1.0-1) kinetic; urgency=medium

* Initial release.

-- Bram Stolk <[email protected]> Wed, 07 Sep 2022 17:24:00 -0700
15 changes: 15 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Source: diskgraph
Section: contrib/utils
Priority: optional
Maintainer: Bram Stolk <[email protected]>
Rules-Requires-Root: no
Build-Depends:
debhelper-compat (= 13)
Standards-Version: 4.6.1
Homepage: https://github.com/stolk/diskgraph

Package: diskgraph
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Graphs live view of R/W bandwidth of a disk drive.
Shows a live graph of the R/W bandwidth of a disk drive along with how many IO operations are in flight.
31 changes: 31 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: diskgraph
Upstream-Contact: Bram Stolk <[email protected]>
Source: https://github.com/stolk/diskgraph

Files: *
Copyright: 2021-2022 Bram Stolk <[email protected]>
License: MIT

License: MIT
MIT License
.
Copyright (c) 2022 Bram Stolk
.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions debian/diskgraph.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diskgraph.1
20 changes: 20 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/make -f

# Output every command that modifies files on the build system.
export DH_VERBOSE = 1


# See FEATURE AREAS in dpkg-buildflags(1).
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# See ENVIRONMENT in dpkg-buildflags(1).
# Package maintainers to append CFLAGS.
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# Package maintainers to append LDFLAGS.
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


%:
dh $@


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)
37 changes: 37 additions & 0 deletions diskgraph.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.\" Hey, EMACS: -*- nroff -*-
.\" (C) Copyright 2022 Bram Stolk <[email protected]>,
.\"
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH DISKGRAPH 1 "September 7 2022"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
diskgraph \- program to graph disk activity
.SH SYNOPSIS
.B diskgraph /dev/nvme0n1
.SH DESCRIPTION
This manual page documents the
.B diskgraph
command.
.PP
\fBdiskgraph\fP is a program that that shows a live graph of disk activity.
.br
It shows the READ bandwidth, the WRITE bandwith and the number of operations that are in flight.
.br
.SH ARGUMENTS
The first and only parameter is a disk device like /dev/sda or /dev/nvme0n1 or similar.
.br
.SH SEE ALSO
.br

0 comments on commit 5b8fc7d

Please sign in to comment.