Loading...

rpm-list@redhat.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: making a self depending rpm. Luciano Miguel Ferreira Rocha Fri Feb 23 12:05:25 2007

On Fri, Feb 23, 2007 at 11:05:40AM -0500, zac elston wrote:
> %prep
> %setup
> %define installDir /usr/local/
> ./configure --prefix=$RPM_BUILD_ROOT%{installDir}
> %build
> make
> %install
> make install

Usually, this is:
%prep
%setup
%define installDir /usr/local/
./configure --refix=%{installDir}
%build
make
%install
make install DESTDIR=$RPM_BUILD_ROOT

As you're not using this format (maybe the generated Makefiles don't
support DESTDIR?), example scripts or libraries installed will use as
the interpreter $RPM_BUILD_ROOT%{installDir}/bin/ruby.

I use something like the following to correct those:
%install
...
grep -rlIm1 "^#! \\?$RPM_BUILD_ROOT" $RPM_BUILD_ROOT/ | \
        xargs -r perl -pi -e 's,.*,#!%{installDir}/bin/ruby, if $. == 1'

-- 
lfr
0/0
_______________________________________________
Rpm-list mailing list
[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/rpm-list