use go-deb to build packages
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
a44c71d6e6
commit
511ffdcd23
|
@ -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
|
|
|
@ -1 +0,0 @@
|
||||||
10
|
|
|
@ -1 +0,0 @@
|
||||||
#!/bin/sh
|
|
|
@ -253,12 +253,12 @@ func (ds *digStatus) updateDnsStatus() {
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = "dig +noall +answer www.wit.com A"
|
cmd = "dig +noall +answer www.wit.com A"
|
||||||
out = shell.Run(cmd)
|
out = shell.RunCapture(cmd)
|
||||||
log.Log(DNS, "makeDnsStatusGrid() dig", out)
|
log.Log(DNS, "makeDnsStatusGrid() dig", out)
|
||||||
me.digStatus.set(ds.DnsDigUDP, out)
|
me.digStatus.set(ds.DnsDigUDP, out)
|
||||||
|
|
||||||
cmd = "dig +noall +answer www.wit.com AAAA"
|
cmd = "dig +noall +answer www.wit.com AAAA"
|
||||||
out = shell.Run(cmd)
|
out = shell.RunCapture(cmd)
|
||||||
log.Log(DNS, "makeDnsStatusGrid() dig", out)
|
log.Log(DNS, "makeDnsStatusGrid() dig", out)
|
||||||
me.digStatus.set(ds.DnsDigTCP, out)
|
me.digStatus.set(ds.DnsDigTCP, out)
|
||||||
|
|
||||||
|
@ -290,14 +290,14 @@ func (ds *digStatus) makeDnsStatusGrid() {
|
||||||
cmd = "dig +noall +answer go.wit.com A"
|
cmd = "dig +noall +answer go.wit.com A"
|
||||||
grid.NewLabel(cmd)
|
grid.NewLabel(cmd)
|
||||||
ds.DnsDigUDP = grid.NewLabel("?")
|
ds.DnsDigUDP = grid.NewLabel("?")
|
||||||
out = shell.Run(cmd)
|
out = shell.RunCapture(cmd)
|
||||||
log.Log(DNS, "makeDnsStatusGrid() dig", out)
|
log.Log(DNS, "makeDnsStatusGrid() dig", out)
|
||||||
me.digStatus.set(ds.DnsDigUDP, out)
|
me.digStatus.set(ds.DnsDigUDP, out)
|
||||||
|
|
||||||
cmd = "dig +noall +answer go.wit.com AAAA"
|
cmd = "dig +noall +answer go.wit.com AAAA"
|
||||||
grid.NewLabel(cmd)
|
grid.NewLabel(cmd)
|
||||||
ds.DnsDigTCP = grid.NewLabel("?")
|
ds.DnsDigTCP = grid.NewLabel("?")
|
||||||
out = shell.Run(cmd)
|
out = shell.RunCapture(cmd)
|
||||||
log.Log(DNS, "makeDnsStatusGrid() dig", out)
|
log.Log(DNS, "makeDnsStatusGrid() dig", out)
|
||||||
me.digStatus.set(ds.DnsDigTCP, out)
|
me.digStatus.set(ds.DnsDigTCP, out)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue