automatically add google's bazel build
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
0a21c307f7
commit
a51d16ae60
|
@ -0,0 +1,56 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
# how to make a debian package "raw" just using tar and ar
|
||||||
|
#
|
||||||
|
# READ THIS AGAIN:
|
||||||
|
#
|
||||||
|
# A .deb file is just output from 'ar rcs'
|
||||||
|
#
|
||||||
|
tar-ar: control
|
||||||
|
cd DEBIAN && tar --ignore-failed-read -cvJf ../control.tar.xz .
|
||||||
|
cd files && tar -cvJf ../data.tar.xz .
|
||||||
|
ar rcs ${BASENAME}_${VERSION}_amd64.deb debian-binary control.tar.xz data.tar.xz
|
||||||
|
dpkg-deb --info ${BASENAME}_${VERSION}_amd64.deb
|
Binary file not shown.
|
@ -0,0 +1,5 @@
|
||||||
|
# sudo apt install -y apt-transport-https curl gnupg
|
||||||
|
# curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
|
||||||
|
# sudo mv bazel-archive-keyring.gpg /usr/share/keyrings
|
||||||
|
|
||||||
|
deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8
|
|
@ -0,0 +1 @@
|
||||||
|
10
|
|
@ -0,0 +1,13 @@
|
||||||
|
Source: bazel-google
|
||||||
|
Build-Depends: golang
|
||||||
|
Package: bazel-google
|
||||||
|
Version: 20230129
|
||||||
|
Maintainer: Jeff Carr <jcarr@wit.com>
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: info
|
||||||
|
Description: sets up the apt repository for bazel directly from google
|
||||||
|
As of this build, bazel and tensorflow are under heavy development.
|
||||||
|
For debian, at this time, I would not recommend trying to build this yourself
|
||||||
|
but instead just use the google packages directly. Maybe someone has the time
|
||||||
|
to attempt to rebuild this in the debian build infrastructure, but it's going
|
||||||
|
to be very complicated and error prone.
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh -x
|
||||||
|
|
||||||
|
apt update
|
||||||
|
|
||||||
|
set +x
|
||||||
|
echo
|
||||||
|
echo Installing the default version of bazel needed for tensorflow
|
||||||
|
echo
|
||||||
|
set -x
|
||||||
|
|
||||||
|
apt install bazel-5.3.0
|
|
@ -1,5 +1,5 @@
|
||||||
Source: tensorflow
|
Source: tensorflow
|
||||||
Build-Depends: golang
|
Build-Depends: golang bazel-5.3.0
|
||||||
Package: tensorflow
|
Package: tensorflow
|
||||||
Version: 0.6.2
|
Version: 0.6.2
|
||||||
Maintainer: Jeff Carr <jcarr@wit.com>
|
Maintainer: Jeff Carr <jcarr@wit.com>
|
||||||
|
|
Loading…
Reference in New Issue