more closer to closeness

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2022-10-08 01:40:36 -05:00
parent 64afa33619
commit b21a1c374a
1 changed files with 17 additions and 5 deletions

View File

@ -1,14 +1,23 @@
.PHONY: control
VERSION=7.3.0
MINOR=v6
all:
echo "download the current mattermost tarball"
echo then build the package using the files in .debian/
help:
@echo
@echo "make all # to attempt to download, extract and build the .deb package"
@echo "make raw # to build a .deb using 'tar' and 'ar'"
@echo
all: download clean extract build
raw: download clean extract raw
clean:
rm -rf .debian/files/opt/
rm -rf files/opt files/DEBIAN/control
rm -f *.deb
rm -f control.tar.xz data.tar.xz
download:
wget -c https://releases.mattermost.com/${VERSION}/mattermost-${VERSION}-linux-amd64.tar.gz
@ -23,15 +32,18 @@ extract:
bash-completion:
mattermost completion bash > .debian/files/etc/bash_completion.d/mattermost
build:
control:
mkdir -p files/DEBIAN
cp control files/DEBIAN/
echo Version: ${VERSION}.${MINOR} >>files/DEBIAN/control
build: 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:
raw: control
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
dpkg-deb --info mattermost_${VERSION}.${MINOR}_amd64.deb