package-stuff/bazel-google/Makefile

45 lines
1.0 KiB
Makefile

VERSION=20230129
BASENAME=bazel-google
help:
@echo
@echo "make all # to attempt to download, extract and build the .deb package using dpkg"
@echo
all: clean extract DEBIAN build
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:
mkdir -p ../files/usr/share/keyrings
cp bazel-archive-keyring.gpg ../files/usr/share/keyrings/
mkdir -p ../files/etc/apt/sources.list.d
cp bazel.list ../files/etc/apt/sources.list.d/
# makes the DEBIAN/ directory
DEBIAN:
mkdir -p DEBIAN
# make the md5sum file
cd ../files/ && find -type f -exec md5sum '{}' \; |sort -k2 >../md5sums
mv ../md5sums DEBIAN/
# make the control there
mkdir -p DEBIAN
cp control DEBIAN/
# echo Version: ${VERSION} >>DEBIAN/control
cp postinst DEBIAN
build:
mv DEBIAN ../files/
cd .. && dpkg-deb --build files ${BASENAME}_${VERSION}_amd64.deb
cd .. && dpkg-deb --info ${BASENAME}_${VERSION}_amd64.deb