2023-01-30 11:18:32 -06:00
|
|
|
VERSION=$(shell git describe --tags $(git rev-list --tags --max-count=1) | sed 's/^v//')
|
2023-01-29 13:47:23 -06:00
|
|
|
BASENAME=wit
|
|
|
|
|
|
|
|
all: clean extract DEBIAN build
|
|
|
|
cd .. && wit mirrors
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo
|
|
|
|
@echo "make all # to attempt to download, extract and build the .deb package using dpkg"
|
|
|
|
@echo
|
|
|
|
|
|
|
|
update-keyring:
|
|
|
|
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf ../files
|
|
|
|
rm -f ../*.deb
|
|
|
|
rm -f ../*.tar.xz data.tar.xz
|
|
|
|
rm -rf DEBIAN
|
|
|
|
|
|
|
|
extract:
|
|
|
|
cp -r files ..
|
|
|
|
|
|
|
|
# makes the DEBIAN/ directory
|
|
|
|
DEBIAN:
|
|
|
|
mkdir -p DEBIAN
|
2023-01-30 11:18:32 -06:00
|
|
|
|
2023-01-29 13:47:23 -06:00
|
|
|
# make the md5sum file
|
2023-01-30 11:18:32 -06:00
|
|
|
cd files/ && find -type f -exec md5sum '{}' \; |sort -k2 >../md5sums
|
|
|
|
mv md5sums DEBIAN/
|
|
|
|
|
2023-01-29 13:47:23 -06:00
|
|
|
cp control DEBIAN/
|
2023-01-30 11:18:32 -06:00
|
|
|
echo Version: ${VERSION} >>DEBIAN/control
|
|
|
|
echo Build-Date: `date` >>DEBIAN/control
|
|
|
|
echo Source-Date: `stat -c %z ../wit` >>DEBIAN/control
|
|
|
|
|
|
|
|
cp postinst DEBIAN/
|
|
|
|
mv DEBIAN ../files/
|
2023-01-29 13:47:23 -06:00
|
|
|
|
|
|
|
build:
|
|
|
|
cd .. && dpkg-deb --build files ${BASENAME}_${VERSION}_amd64.deb
|
|
|
|
cd .. && dpkg-deb --info ${BASENAME}_${VERSION}_amd64.deb
|