package-stuff/Makefile

38 lines
1.2 KiB
Makefile

VERSION=7.3.0
MINOR=v6
all:
echo "download the current mattermost tarball"
echo then build the package using the files in .debian/
clean:
rm -rf .debian/files/opt/
rm -rf files/opt files/DEBIAN/control
rm -f *.deb
download:
wget -c https://releases.mattermost.com/${VERSION}/mattermost-${VERSION}-linux-amd64.tar.gz
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:
mattermost completion bash > .debian/files/etc/bash_completion.d/mattermost
build:
mkdir -p files/DEBIAN
cp control files/DEBIAN/
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