On Thu, 10 Oct 2002, Gareth Walters wrote:

> G'day all,
> 
> using RedHat 7.3 I am trying to package some some stuff as an RPM, I have the 
> specfile as part of the CVS source tree so that any user who can check out 
> the code and build it can make an RPM without too much trouble.(that is the 
> plan anyway)
> 
> The problem is I would like to use a different "topdir" than /usr/src/redhat 
> and according to the documentation I should just make a .rpmrc file in my
> home directory with this entry
> topdir: /home/garethw/newtopdir
> 
> The problem is when I try and build the package with RPM I get
> 
> RPM build errors:
>     bad option 'topdir' at /home/garethw/.rpmrc:1
>     Bad file: /usr/src/redhat/SOURCES/server: No such file or directory
> error: bad option 'topdir' at /home/garethw/.rpmrc:1
> 
> So what am I doing wrong?
> Is there another way to tell rpm not to usr /usr/src/redhat ??

Yes, try to use ~/.rpmmacros instead, for example:

$ cat ~/.rpmmacros
%_topdir        /home/wim/rpmroot
%_sourcedir     %{_topdir}/SOURCES/%{name}
%_rpmdir        %{_topdir}/RPMS
%_rpmfilename   %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm


wim

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to