-
Notifications
You must be signed in to change notification settings - Fork 217
Create "make install" equivalent #308
Copy link
Copy link
Open
Labels
P2An issue that should be worked on when time is availableAn issue that should be worked on when time is available
Milestone
Description
Open source projects are typically built in three phases:
- Configuration (
./configure), where the project build is customized to target specific featuresets - Building (
make), where the project is actually built - Installation (
make install), where the project is installed to the filesystem, or staged for future packaging using theDESTDIRconvention.
Bazel combines 1) and 2) (configuring is done with build flags), and 3) doesn't really exist. Currently, the closest bazel equivalent to have bazel create a package representing the installable outputs, most often a .zip or a .tar. While effective, it is wasteful when packages become quite large.
Since Bazel builds have no way to interact directly with the filesystem outside of the buildroot, we need to be a little more creative. Let's create a pkg_install rule that creates a (python?) script that knows how to install artifacts outside of the bazel buildroot, for example:
load("@rules_pkg//:install.bzl", "pkg_install")
# pkg_files, pkg_filegroups, etc
pkg_install(
name = "install",
srcs = [
# pkg_filegroups here
],
)And then you install using:
bazel run //:install -- DESTDIR=your/destination/directory
Acceptance criteria:
pkg_install(or its equivalent) is created with testspkg_installsupports staging to an arbitrary destination (DESTDIR)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2An issue that should be worked on when time is availableAn issue that should be worked on when time is available