Re: SPEC file for pkgconfig



On Sun, 2002-01-20 at 03:02, R.I.P. Deaddog wrote:
> On 19 Jan 2002, Gregory Leblanc wrote:
> 
> > > > >
> > > > > %build
> > > > > ./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir}
> > > >
> > > > I much prefer this method to using %configure, as %configure almost
> > > > always requires you to put "%define __libtoolize /bin/true" somewhere in
> > > > your spec file to avoid having things break.  If you're passing
> > > > arguments to configure that don't have to do with file paths, such as
> > > > --disable-gtk-doc for example, I place them first on the line.  It's
> > > > also nice to break things up onto multiple lines.  Here's a snip from
> > > > the gail.spec file I just wrote:
> 
> What breaks for libtoolize? I guess you mean the relinking mess, isn't
> it patched already?

Libtoolize will break if the tarball was created with a different
version of libtool than the version installed on the machine where the
rpm is being built.  For example, if people make their tarball with
libtool 1.4, and you try to run libtoolize on a stock Red Hat 7.1
machine, it will fail because it's using libtool 1.3.5.  Rather than try
to figure out what's going wrong (because the error message is of NO
help), I find that it's better to just avoid using the %configure
script.

> > This does -not- work properly unless you have gettext 0.10.40.  I try to
> > use the things that will be most portable, and this isn't.  
> > 
> > > And if that doesn't work (for example, doesn't install .po files):
> > > 
> > > make install DESTDIR=$RPM_BUILD_ROOT gnulocaledir=$RPM_BUILD_ROOT/%{_gnulocaledir}
> 
> Where is %{_gnulocaledir} or %{_localedir} defined? Sorry for my
> ignorance...

I don't find it in either rpm --showrc, nor in /usr/lib/rpm/macros, so
I'm not sure.

> > > > > %clean
> > > > > rm -rf $RPM_BUILD_ROOT
> > > 
> > > test $RPM_BUILD_ROOT != / && rm -rf $RPM_BUILD_ROOT
> > 
> > Erm, yeah, good idea.  I mostly don't because my portable bourne shell
> > scripting sucks.  :-)
> 
> You are building RPM as *root* ???

Never, but that doesn't mean that it's a bad check.  Lots of people
build things in a chroot environment, which I haven't been able to
figure out how to do as non-root.  I did stop trying, because it's much
harder to catch some errors while building as root, not to mention
terribly inconvenient.
	Greg

-- 
Portland, Oregon, USA.




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