2022-10-08 01:40:36 -05:00
|
|
|
.PHONY: control
|
|
|
|
|
2023-01-26 06:51:02 -06:00
|
|
|
VERSION=7.7.1
|
2022-10-08 10:09:53 -05:00
|
|
|
MINOR=v10
|
2022-10-08 00:48:58 -05:00
|
|
|
|
2022-10-08 01:40:36 -05:00
|
|
|
help:
|
|
|
|
@echo
|
2022-10-08 02:03:34 -05:00
|
|
|
@echo "make all # to attempt to download, extract and build the .deb package using dpkg"
|
|
|
|
@echo "make raw # to attempt to download, extract and build the .deb package using 'tar' and 'ar'"
|
2022-10-08 01:40:36 -05:00
|
|
|
@echo
|
|
|
|
|
2022-10-08 02:51:53 -05:00
|
|
|
all: download clean extract DEBIAN build
|
2022-10-08 01:40:36 -05:00
|
|
|
|
2022-10-08 02:51:53 -05:00
|
|
|
raw: download clean extract DEBIAN tar-ar
|
2022-10-07 18:30:26 -05:00
|
|
|
|
|
|
|
clean:
|
2022-10-08 01:30:53 -05:00
|
|
|
rm -rf files/opt files/DEBIAN/control
|
|
|
|
rm -f *.deb
|
2022-10-08 01:40:36 -05:00
|
|
|
rm -f control.tar.xz data.tar.xz
|
2022-10-08 02:51:53 -05:00
|
|
|
rm -rf files/DEBIAN DEBIAN
|
2022-10-07 18:30:26 -05:00
|
|
|
|
|
|
|
download:
|
2022-10-08 10:13:24 -05:00
|
|
|
@echo
|
|
|
|
@echo
|
|
|
|
@echo CHECK FOR NEW VERSION AT: https://mattermost.com/deploy/
|
|
|
|
@echo CHECK FOR NEW VERSION AT: https://mattermost.com/deploy/
|
|
|
|
@echo CHECK FOR NEW VERSION AT: https://mattermost.com/deploy/
|
|
|
|
@echo
|
|
|
|
@echo
|
|
|
|
sleep 3
|
2023-01-26 07:13:09 -06:00
|
|
|
cd .. && wget -c https://releases.mattermost.com/${VERSION}/mattermost-${VERSION}-linux-amd64.tar.gz
|
2022-10-08 00:48:58 -05:00
|
|
|
|
|
|
|
extract:
|
2023-01-26 07:13:09 -06:00
|
|
|
mkdir -p ../files/opt/
|
|
|
|
cd ../files/opt/ && tar xfz ../../mattermost-${VERSION}-linux-amd64.tar.gz
|
2022-10-08 00:48:58 -05:00
|
|
|
|
|
|
|
# update the bash-completion script
|
|
|
|
bash-completion:
|
2023-01-26 07:13:09 -06:00
|
|
|
cd ../ && mattermost completion bash > files/etc/bash_completion.d/mattermost
|
2022-10-08 00:48:58 -05:00
|
|
|
|
2022-10-08 02:51:53 -05:00
|
|
|
# makes the DEBIAN/ directory
|
|
|
|
DEBIAN:
|
|
|
|
mkdir -p DEBIAN
|
|
|
|
make md5sum
|
|
|
|
make control
|
|
|
|
cp preinst DEBIAN
|
2022-10-08 03:14:24 -05:00
|
|
|
cp postinst DEBIAN
|
2022-10-08 02:51:53 -05:00
|
|
|
|
2022-10-08 01:40:36 -05:00
|
|
|
control:
|
2022-10-08 02:51:53 -05:00
|
|
|
mkdir -p DEBIAN
|
|
|
|
cp control DEBIAN/
|
|
|
|
echo Version: ${VERSION}.${MINOR} >>DEBIAN/control
|
2022-10-08 01:40:36 -05:00
|
|
|
|
2022-10-08 02:03:34 -05:00
|
|
|
md5sum:
|
2023-01-26 07:13:09 -06:00
|
|
|
cd ../files/ && find -type f -exec md5sum '{}' \; |sort -k2 >../DEBIAN/md5sums
|
2022-10-08 02:03:34 -05:00
|
|
|
|
|
|
|
build:
|
2023-01-26 07:13:09 -06:00
|
|
|
mv DEBIAN ../files/
|
|
|
|
cd ../files && dpkg-deb --build files mattermost_${VERSION}.${MINOR}_amd64.deb
|
|
|
|
cd ../files && dpkg-deb --info mattermost_${VERSION}.${MINOR}_amd64.deb
|
2022-10-08 01:30:53 -05:00
|
|
|
|
|
|
|
# how to make a debian package "raw" just using tar and ar
|
2022-10-08 02:03:34 -05:00
|
|
|
tar-ar: control
|
2022-10-08 02:51:53 -05:00
|
|
|
cd DEBIAN && tar --ignore-failed-read -cvJf ../control.tar.xz .
|
2022-10-08 01:30:53 -05:00
|
|
|
cd files && tar -cvJf ../data.tar.xz .
|
|
|
|
ar rcs mattermost_${VERSION}.${MINOR}_amd64.deb debian-binary control.tar.xz data.tar.xz
|
2022-10-08 01:40:36 -05:00
|
|
|
dpkg-deb --info mattermost_${VERSION}.${MINOR}_amd64.deb
|