From 64afa336196c385f5f7eeadeef8d658276ef4052 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 8 Oct 2022 01:30:53 -0500 Subject: [PATCH] more on the home front Signed-off-by: Jeff Carr --- Makefile | 18 ++++++++++++++---- debian-binary | 1 + files/DEBIAN/preinst | 2 -- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 debian-binary diff --git a/Makefile b/Makefile index 0e2115a..346217f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ VERSION=7.3.0 +MINOR=v6 all: echo "download the current mattermost tarball" @@ -6,7 +7,8 @@ all: clean: rm -rf .debian/files/opt/ - rm -rf files/opt files/DEBIAN + rm -rf files/opt files/DEBIAN/control + rm -f *.deb download: wget -c https://releases.mattermost.com/${VERSION}/mattermost-${VERSION}-linux-amd64.tar.gz @@ -14,6 +16,8 @@ download: extract: mkdir -p .debian/files/opt/ cd .debian/files/opt/ && tar xfz ../../../mattermost-${VERSION}-linux-amd64.tar.gz + mkdir -p files/opt/ + cd files/opt/ && tar xfz ../../mattermost-${VERSION}-linux-amd64.tar.gz # update the bash-completion script bash-completion: @@ -22,6 +26,12 @@ bash-completion: build: mkdir -p files/DEBIAN cp control files/DEBIAN/ - echo Version: ${VERSION} >>files/DEBIAN/control - dpkg-deb --build files mattermost_${VERSION}_amd64.deb - dpkg-deb --info mattermost_${VERSION}_amd64.deb + echo Version: ${VERSION}.${MINOR} >>files/DEBIAN/control + dpkg-deb --build files mattermost_${VERSION}.${MINOR}_amd64.deb + dpkg-deb --info mattermost_${VERSION}.${MINOR}_amd64.deb + +# how to make a debian package "raw" just using tar and ar +raw: + cd files/DEBIAN && tar --ignore-failed-read -cvJf ../../control.tar.xz preinst md5sums control + cd files && tar -cvJf ../data.tar.xz . + ar rcs mattermost_${VERSION}.${MINOR}_amd64.deb debian-binary control.tar.xz data.tar.xz diff --git a/debian-binary b/debian-binary new file mode 100644 index 0000000..cd5ac03 --- /dev/null +++ b/debian-binary @@ -0,0 +1 @@ +2.0 diff --git a/files/DEBIAN/preinst b/files/DEBIAN/preinst index ec5174f..28c139c 100755 --- a/files/DEBIAN/preinst +++ b/files/DEBIAN/preinst @@ -2,8 +2,6 @@ echo "got here in mattermost -- jcarr put this here" touch /tmp/mattermost.jcarr.install -echo follow instructions here: https://docs.mattermost.com/install/install-tar.html - set -e # Automatically added by dh_installdeb/13.9.1 # dpkg-maintscript-helper symlink_to_dir /usr/share/doc/vim vim-common 2:8.0.1451-1\~ vim -- "$@"