home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / misc / src / rpm / docs / relocatable < prev    next >
Text File  |  1997-09-17  |  2KB  |  37 lines

  1. RELOCATABLE PACKAGES
  2. ====================
  3.  
  4. Relocatable packages are a way to give the user a little control
  5. over the installation location of a package.  For example, a vendor
  6. may distribute their software to install in "/opt" but you'd like
  7. it to install in "/usr/opt".  If the vendor were distributing a
  8. relocatable RPM package, it would be easy.
  9.  
  10. Building a Relocatable Package
  11. ------------------------------
  12.  
  13. Not all software can be "relocatable".  Before continuing you should
  14. think about how the program works, what files it accesses, what other
  15. programs access *it* (and expect it to be in a certain place), etc.
  16. If you determine that the location of the package doesn't matter,
  17. then it can probably be built as "relocatable".
  18.  
  19. All you need to do to build a relocatable package is put:
  20.  
  21.   Prefix: <dir>
  22.  
  23. in your spec file.  The "<dir>" will usually be something like "/usr",
  24. "/usr/local", or "/opt".  Every file in your %files list must start
  25. with that prefix.  For example, if you have "Prefix: /usr" and your
  26. %files list contains "/etc/foo.conf", the build will fail.
  27.  
  28. Installing Relocatable Packages
  29. -------------------------------
  30.  
  31. By default, RPM will install a relocatable package in the prefix
  32. directory listed in the spec file.  You can override this on the
  33. RPM install command line with "--prefix <dir>".  For example, if
  34. the package in question were going to be installed in "/opt" but
  35. you don't have enough disk space there (and it is a relocatable
  36. package), you could install it "--prefix /usr/opt".
  37.