Reputation: 181
How do I build a debian package from source using bazel?
I am trying to build debian packagefor tensorflow. I need that to be included in our PPA server. Thanks!
Upvotes: 0
Views: 504
Reputation: 31404
building Debian packages consists of compiling the software (mostly; there are also packages that don't need compilation, e.g. for scripting languages), and then packaging the artifacts.
Therefore the packaging process has a separate "build" step, which is used to trigger your software's build process.
This step doesn't care whether you use make
, CMake
, SCons
, bazel
or whatever, as long as you tell it what it should do.
a simplistic debian/rules
file for your needs could look like:
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_build:
bazel build //main:hello-world
But of course there is quite a lot to Debian packaging in general, so you make sure you read (and understand) the Debian Packaging Documentation first...
Upvotes: 1