Mailinglist Archive: opensuse-packaging (57 mails)

< Previous Next >
Re: [opensuse-packaging] Packaging libtool archives (*.la files)
  • From: Stanislav Brabec <sbrabec@xxxxxxx>
  • Date: Thu, 31 Aug 2006 19:11:07 +0200
  • Message-id: <1157044268.18034.19.camel@xxxxxxxxxxxxxx>
Thorsten Kukuk wrote:
> On Fri, Aug 25, Andreas Hanke wrote:

> > while looking at various spec files, I noticed that it seems to become
> > increasingly popular these days that libtool archives (*.la files) are
> > removed from packages, by deleting them during the build or by using the
> > %exclude directive or similar.
> >
> > Is there a general policy about this?
>
> The general policy is: Remove it if this makes no trouble.

I have tried to make a short proposal about it. It is not yet "Remove it
if this makes no trouble", but only "Remove it if you are sure that this
makes no trouble". It's hard to decide in case of "Building other
packages will become much order or will break".

Note that not only ltdl, but probably also guile can need *.la files,
and mono can need *.so files.


Libraries in libdir:

If your package installs *.so symlink, *.la and *.a files, but does't
provide any header files for these libraries, you can consider these
files as obsolete and remove them.

Example:

Package nautilus contains two libraries - public libnautilus-extension
with headers and private libnautilus-private without headers. It means,
that libnautilus-private cannot be used for development outside nautilus
package. You can remove its development files:

# libnautilus-private does not export its headers, so it can't be used
# outside nautilus,
rm $RPM_BUILD_ROOT%{prefix}/%_lib/libnautilus-private.*a
rm $RPM_BUILD_ROOT%{prefix}/%_lib/libnautilus-private.so

Note: In rare cases, the library is loaded with use of *.so or *.la
files. In this situation, you have to keep these files.

Dynamic modules and libraries outside libdir:

If your package installs *.so, *.la and *.a files into a sub-directory
of libdir, please evaluate usefulness of those files:

If these files are dynamically loaded shared modules, static *.a files
has no use, and you can remove them to save space. If module is not
intended for program using libltdl, libtool *.la files has no use, and
you can remove them to save space. For some module types, you can even
remove *.so symlink if it is not required for proper function of program
module it is intended for.

Example:

Package libgnomeui provides modules for gtk+ and libglade. You can
remove obsolete files:

# remove obsolete files for dynamic modules
rm $RPM_BUILD_ROOT%{prefix}/%_lib/libglade/2.0/*.*a
rm $RPM_BUILD_ROOT%{prefix}/%_lib/gtk-2.0/2.4.0/filesystems/libgnome-vfs.*a

--
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o. e-mail: sbrabec@xxxxxxx
Lihovarsk√° 1060/12 tel: +420 284 028 966
190 00 Praha 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >