From: root Date: Sun, 14 Jul 1996 16:12:18 +0000 (+0000) Subject: Initial revision X-Git-Tag: tznext/4.11.0.1.tizen20130304~11143 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a0bc2056d1784ecb3caa3072c94ce1c9d3e8874;p=tools%2Flibrpm-tizen.git Initial revision CVS patchset: 817 CVS date: 1996/07/14 16:12:18 --- diff --git a/docs/buildroot b/docs/buildroot new file mode 100644 index 0000000..2c5a0de --- /dev/null +++ b/docs/buildroot @@ -0,0 +1,66 @@ +BUILD PREFIX +============ + +The build prefix is very similar to Root: (which will be depricated +soon). By using Buildprefix: in your spec file you are indicating +that your package can be built (installed into and packaged from) +a user-definable directory. This helps package building by normal +users. + +The Spec File +------------- + +Simply use + + Buildprefix: + +in your spec file. The acutal buildprefix used by RPM during the +build will be available to you (and your %prep, %build, and %install +sections) as the environment variable RPM_BUILDPREFIX. You must +make sure that the files for the package are installed into the +proper buildprefix. As with Root:, the files listed in the %files +section should *not* contain the buildprefix. For example, the +following hypothetical spec file: + + Name: foo + ... + Root: /tmp + + %prep + ... + + %build + ... + + %install + install -m755 fooprog /tmp/usr/bin/fooprog + + %files + /usr/bin/fooprog + +would be changed to: + + Name: foo + ... + Buildprefix: /tmp + + %prep + ... + + %build + ... + + %install + install -m755 fooprog $RPM_BUILDPREFIX/usr/bin/fooprog + + %files + /usr/bin/fooprog + +Building With a Build Prefix +---------------------------- + +RPM will use the buildprefix listed in the spec file as the default +buildprefix. There are two ways to override this. First, you can +have "buildprefix: " in your rpmrc. Second, you can override +the default, and any entry in an rpmrc by using "--buildprefix " +on the RPM command line.