diff options
Diffstat (limited to 'doc/manual/relocatable')
-rw-r--r-- | doc/manual/relocatable | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/doc/manual/relocatable b/doc/manual/relocatable index 82bb36a56..ecc503936 100644 --- a/doc/manual/relocatable +++ b/doc/manual/relocatable @@ -1,5 +1,4 @@ -RELOCATABLE PACKAGES -==================== +/*! \page relocateable Relocateable packages Relocatable packages are a way to give the user a little control over the installation location of a package. For example, a vendor @@ -7,8 +6,7 @@ may distribute their software to install in "/opt" but you'd like it to install in "/usr/opt". If the vendor were distributing a relocatable RPM package, it would be easy. -Building a Relocatable Package ------------------------------- +<h2>Building a Relocatable Package</h2> Not all software can be "relocatable". Before continuing you should think about how the program works, what files it accesses, what other @@ -18,7 +16,9 @@ then it can probably be built as "relocatable". All you need to do to build a relocatable package is put one or more: +\verbatim Prefix: <dir> +\endverbatim in your spec file. The "<dir>" will usually be something like "/usr", "/usr/local", or "/opt". Every file in your %files list must start @@ -26,15 +26,16 @@ with that prefix. For example, if you have "Prefix: /usr" and your %files list contains "/etc/foo.conf", the build will fail. The fix for this is to put +\verbatim Prefix: /usr Prefix: /etc +\endverbatim into the spec file so that the /usr and /etc directories may be relocated separately when this package is installed. -Installing Relocatable Packages -------------------------------- +<h2>Installing Relocatable Packages</h2> By default, RPM will install a relocatable package in the prefix directory listed in the spec file. You can override this on the @@ -46,8 +47,11 @@ package), you could install it "--prefix /usr/opt". If there is more then one Prefix you may relocate each prefix separately by using syntax like: +\verbatim rpm ... --relocate /opt=/usr/opt --relocate /etc=/usr/etc ... +\endverbatim If any of the Prefixs are not being relocated they can be skipped on the command line +*/ |