summaryrefslogtreecommitdiff
path: root/debian/Makefile
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-03 16:47:55 -0600
committerJeff Carr <[email protected]>2024-01-03 16:47:55 -0600
commit4ca15cc78dbaaf83640d9c54dc1d81560dc06812 (patch)
tree733ba8b72a1b5b18606f1a17b2fa5a39a6720b8e /debian/Makefile
parent36218f4535dd65d2c8d4ecbea761b3b0289e6f3c (diff)
moving the debian stuff here
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'debian/Makefile')
-rw-r--r--debian/Makefile48
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/Makefile b/debian/Makefile
new file mode 100644
index 0000000..7f4691f
--- /dev/null
+++ b/debian/Makefile
@@ -0,0 +1,48 @@
+# GITVERSION=$(shell git rev-parse FETCH_HEAD)
+VERSION=$(shell git describe --tags $(git rev-list --tags --max-count=1) | sed 's/^v//')
+
+BASENAME=go-wit-gui
+
+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/lib/go-gui
+ cp ../*.so ../files/usr/lib/go-gui/
+ cp ../README.md ../files/usr/lib/go-gui/
+
+# 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