mwc.pl
is run on a top-level workspace with
-type rpmspec
, each aggregated workspace is presumed
to define the scope of a package that will become an RPM.
Inter-project dependencies that exist between any projects known to
the top-level workspace automatically turn into inter-package
dependencies in RPMs.
.mwc
files already exist, and that
inter-project dependencies are complete and well-formed (i.e.,
contain sufficient after statements to insure proper
build ordering):
.spec
files and *_rpm.sh builder script.top-level-workspace_rpm.sh
script to build/package.The RpmSpec type uses aggregate workspaces to define the scope of a package. In other words, defining a package involves writing a .mwc file that includes all the projects that should go into that package. An additional .mwc file must be written for each additional package. Finally, these package workspaces get aggregated into a workspace.
RPM packages require extra information not needed by "normal" MPC projects or workspaces. This information is defined in a specific clause in the workspace for the rpmspec type, e.g.,
// top-level workspace workspace { specific (rpmspec) { rpm_version = 1.0 rpm_release = 1 } package1.mwc package2.mwc }Details on the variables allowed in the specific clause can be found in the $MPC_ROOT/docs/templates/rpmspec.txt file.
If you use workspaces as a part of building right now, you may wish to write additional workspace files specifically for packaging via RPM.
--prefix
or
--relocate
options to rpm
.$ rpmbuild --showrc | grep '_topdir[^}]' -14: _topdir %{getenv:HOME}/rpmbuild
.spec
file.