user3237667
user3237667

Reputation: 181

Build debian file from source using bazel

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

Answers (1)

umläute
umläute

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

Related Questions