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

Re: %doc and -n fullpath



On Mon, Jan 13, 2003 at 12:45:34PM -0500, Jim Knoble wrote:
> Circa 2003-01-12 08:24:10 -0600 dixit mw-list-rpm-list@csi.hu:
> 
> : On Sat, Jan 11, 2003 at 06:46:21PM -0500, Matthew Miller wrote:
> : > On Sat, Jan 11, 2003 at 05:23:23PM -0600, mw-list-rpm-list@csi.hu wrote:
> : > > Thx, so now I see what is happening: apparently even if I specify a
> : > > full path to setup -n, like
> : > > %setup -n /a/b
> : > > rpm is working with the basename, so in the above with `b'.
> : > > Is this correct?
> : > 
> : > Makes sense. There's about a million things broken with having a full
> : > pathname there. :)
> : 
> : Actually, no:  I have 
> 
>   [...]
> 
> : %prep
> : %setup -c -n $RPM_BUILD_ROOT
> 
> You seem to misunderstand what '%setup -n' does.  The '%setup'
> directive basically does:
> 
>     cd "${RPM_BUILD_DIR}"
>     gzip -dc "%{SOURCE0}" |tar -xvf -
>     cd "%{name}-%{version}"
>     ...
> 
> Basically, RPM expects that the file listed in 'Source0:' is a tar
> archive that's been compressed with gzip (or with bzip2), and that,
> when the archive is unpacked, it creates a directory named
> '%{name}-%{version}' which contains the rest of the archive's contents.
> For example, RPM expects that unpacking beverlyhills-9.0210.tar.gz
> creates the directory beverlyhills-9.0210, which contains the rest of
> the beverlyhills source.
> 
> Some source archives, however, do not follow this
> convention---sometimes the directory is named only '%{name}', for
> example.  Or, perhaps your source archive is for a prior version and
> you're using a patch to bring the source to the version listed in the
> specfile.  That's when you use '%setup -n <directory-name>'.  Using it
> with ${RPM_BUILD_ROOT} makes no sense.

It certainly does make sense for the package I am trying to build an
rpm for: it is Dan Bernstein's daemontools package.  The installation
of the package has some hardcoded paths in it.  When you do 

tar zxvf daemontools-0.76

all the sources are installed under

./admin/daemontools-0.76/

The build then builds in the directory

./admin/daemontools-0.76/compile

and then installs the binaries in

admin/daemontools-0.76/command

(the programs become available by creating symlinks in /command)

So you see that the build- and destdirs are under the same subdir:
admin/daemontools-0.76/.

Mate





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