From 511ffdcd23cd0fa4aab8353409460ba8a0b0be20 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 11 Feb 2024 04:10:36 -0600 Subject: use go-deb to build packages Signed-off-by: Jeff Carr --- control | 9 +++++++++ debian/Makefile | 49 ------------------------------------------------- debian/compat | 1 - debian/control | 9 --------- debian/postinst | 1 - digStatusWindow.go | 8 ++++---- resources/empty.so | 0 7 files changed, 13 insertions(+), 64 deletions(-) create mode 100644 control delete mode 100644 debian/Makefile delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100755 debian/postinst delete mode 100644 resources/empty.so diff --git a/control b/control new file mode 100644 index 0000000..1a46081 --- /dev/null +++ b/control @@ -0,0 +1,9 @@ +Source: control-panel-dns +Build-Depends: golang +Package: control-panel-dns +Maintainer: Jeff Carr +Architecture: amd64 +Depends: +Recommends: libgtk-3-0, ddclient, ddupdate +Description: a control panel for DNS and IPv6 settings + Goals: show the settings, validate & update DNS diff --git a/debian/Makefile b/debian/Makefile deleted file mode 100644 index 1b42b3b..0000000 --- a/debian/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# GITVERSION=$(shell git rev-parse FETCH_HEAD) -VERSION=$(shell git describe --tags $(git rev-list --tags --max-count=1) | sed 's/^v//') - -BASENAME=control-panel-dns - -all: help deb - -help: - @echo - @echo "make deb # attempt to build the .deb package using dpkg" - @echo - -deb: clean extract DEBIAN build - -clean: - rm -rf ../files - rm -f ../*.deb - rm -f ../*.tar.xz data.tar.xz - rm -rf DEBIAN - -extract: - mkdir -p ../files/usr/bin - mkdir -p ../files/usr/lib/control-panel-dns/ - cp ../README.md ../files/usr/lib/control-panel-dns/ - cp ~/go/bin/control-panel-dns ../files/usr/bin/ - -# makes the DEBIAN/ directory -DEBIAN: - mkdir -p DEBIAN - - # make the md5sum file - cd ../files/ && find -type f -exec md5sum '{}' \; |sort -k2 >../md5sums - mv ../md5sums DEBIAN/ - - # make the control there - mkdir -p DEBIAN - cp control DEBIAN/ - echo Version: ${VERSION} >>DEBIAN/control - - cp postinst DEBIAN - -build: - mv DEBIAN ../files/ - cd .. && dpkg-deb --build files ${BASENAME}_${VERSION}_amd64.deb - @echo - @echo '#######################' - cd .. && dpkg-deb --info ${BASENAME}_${VERSION}_amd64.deb - @echo '#######################' - @echo diff --git a/debian/compat b/debian/compat deleted file mode 100644 index f599e28..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/debian/control b/debian/control deleted file mode 100644 index 1a46081..0000000 --- a/debian/control +++ /dev/null @@ -1,9 +0,0 @@ -Source: control-panel-dns -Build-Depends: golang -Package: control-panel-dns -Maintainer: Jeff Carr -Architecture: amd64 -Depends: -Recommends: libgtk-3-0, ddclient, ddupdate -Description: a control panel for DNS and IPv6 settings - Goals: show the settings, validate & update DNS diff --git a/debian/postinst b/debian/postinst deleted file mode 100755 index 1a24852..0000000 --- a/debian/postinst +++ /dev/null @@ -1 +0,0 @@ -#!/bin/sh diff --git a/digStatusWindow.go b/digStatusWindow.go index 5722f47..dce5b71 100644 --- a/digStatusWindow.go +++ b/digStatusWindow.go @@ -253,12 +253,12 @@ func (ds *digStatus) updateDnsStatus() { } cmd = "dig +noall +answer www.wit.com A" - out = shell.Run(cmd) + out = shell.RunCapture(cmd) log.Log(DNS, "makeDnsStatusGrid() dig", out) me.digStatus.set(ds.DnsDigUDP, out) cmd = "dig +noall +answer www.wit.com AAAA" - out = shell.Run(cmd) + out = shell.RunCapture(cmd) log.Log(DNS, "makeDnsStatusGrid() dig", out) me.digStatus.set(ds.DnsDigTCP, out) @@ -290,14 +290,14 @@ func (ds *digStatus) makeDnsStatusGrid() { cmd = "dig +noall +answer go.wit.com A" grid.NewLabel(cmd) ds.DnsDigUDP = grid.NewLabel("?") - out = shell.Run(cmd) + out = shell.RunCapture(cmd) log.Log(DNS, "makeDnsStatusGrid() dig", out) me.digStatus.set(ds.DnsDigUDP, out) cmd = "dig +noall +answer go.wit.com AAAA" grid.NewLabel(cmd) ds.DnsDigTCP = grid.NewLabel("?") - out = shell.Run(cmd) + out = shell.RunCapture(cmd) log.Log(DNS, "makeDnsStatusGrid() dig", out) me.digStatus.set(ds.DnsDigTCP, out) diff --git a/resources/empty.so b/resources/empty.so deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3