[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Knowing the location of a created binary rpm
- From: Valery Reznic <valery_reznic yahoo com>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Re: Knowing the location of a created binary rpm
- Date: Thu, 16 Feb 2006 08:10:09 -0800 (PST)
--- James Olin Oden <james oden gmail com> wrote:
> On 2/16/06, Erez Zilber <erezz voltaire com> wrote:
> > Hi,
> >
> > I'm new to rpm development. I was able to build a
> binary rpm and I saw
> > that it was placed in
> /usr/src/packages/RPMS/i586/.
> >
> > I'm building the rpm from a makefile and I'd like
> to copy it to another
> > directory after it's created. How can I know the
> path of the generated rpm?
> >
> Packages are named (this is their full path):
>
> %{_rpmdir}/%{_build_name_fmt}
Or just invoke rpmbuild with --define _rpmdir
<you_dir>,
So rpm will be created where you want have it.
Valery
>
> So this little bash script will produce that path if
> you provided
> their name, version, release and arch in that order
> (NVRA).
>
> N=$1
> V=$2
> R=$3
> A=$4
> rpm \
> --define "NAME ${N}" \
> --define "VERSION ${V}" \
> --define "RELEASE ${R}" \
> --define "ARCH ${A}" \
> --eval
> '%{expand:%{_rpmdir}/%{_build_name_fmt}}'
>
> Alternatively, most everywhere the package gets
> named:
>
> N-V-R.A.rpm
>
> And they end up under "%{_rpmdir}/A/"
>
> So you can simply get the value of %_rpmdir and and
> just build the
> rest of the path, but the above script can work when
> the value of
> _build_name_fmt has been changed.
>
> Cheers...james
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list redhat com
> https://www.redhat.com/mailman/listinfo/rpm-list
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]