[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RPM spec file for RH9



> > + [ %{buildroot} == / ] || rm -rf %{buildroot}/usr/man
> 
> This is basically redundant

It's actually wrong. The idea is to build the package into an empty
directory. To make sure, the directory in which the package is created
is cleared out first. To prevent total disaster for idiots^H^H^H^Husers
who build packages as root and don't use a package build directory, i.e.
build in / on a life system, the rm -rf is made conditional. I always
use

test "$RPM_BUILD_ROOT" != "/" -a -d "$RPM_BUILD_ROOT" \
        && rm -rf "$RPM_BUILD_ROOT"

which I probably copied from somewhere else, so you might as well do the
same. It goes at the start of %install, and you may stick another one
into %clean.

You could save yourself some trouble and copy the bits you need from my
spec file. Or the whole file, I don't care.

> /usr/local/share/man? Does anybody have this? It's probably more
> appropriate something as

This is where SuSE puts it, and SuSE is one of the most LSB-compliant
distros around. I believe RH is at the other end of the
compliancy-scale. The distinction seems simple to me: if it's
architecture-dependent (e.g. binaries), it goes into bin or lib, if
it's not, it goes into share. man pages are not architecture-specific.
SuSE doesn't even have a /usr/man/, therefore it's also not in MANPATH.

I'm afraid I'm not educated enough to be able to comment on your m4
code, but a test for usr/share/man is not a totally clean thing,
you'd have to check this in %{prefix}, and assume the target system is
identical to the compile system, and dvd+rw-tools is not the first
package to be installed with a usr/share/man (because if so,
usr/share/man may be empty).

Volker

-- 
Volker Kuhlmann			is possibly list0570 with the domain in header
http://volker.dnsalias.net/		Please do not CC list postings to me.



Reply to: