Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach via buildroot <buildroot@buildroot.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: bernd.kuhls@t-online.de, chrismcc@gmail.com, mmayer@broadcom.com,
	fontaine.fabrice@gmail.com, thomas.petazzoni@bootlin.com,
	buildroot@buildroot.org, yann.morin.1998@free.fr
Subject: Re: [Buildroot] [PATCH v2] package/libgpg-error: Disable unused files installation
Date: Tue, 20 Dec 2022 07:30:55 +0200	[thread overview]
Message-ID: <87y1r2k56c.fsf@tarshish> (raw)
In-Reply-To: <20221219230802.2602798-1-f.fainelli@gmail.com>

Hi Florian,

On Mon, Dec 19 2022, Florian Fainelli wrote:
> Disable a number of unused files that were being installed into the root
> filesystem and thus inflating its size needlessly:
>
> * Disable the building of documentation
>
> * Disable support for other languages which is comprised of Common Lisp that
>   buildroot has no package for
>
> * Only install binaries and shared/static libraries, remove libtool archive
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> Changes in v2:
>
> - remove header files, pkgconfig and other unnecessary files
>
>  package/libgpg-error/libgpg-error.mk | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/package/libgpg-error/libgpg-error.mk b/package/libgpg-error/libgpg-error.mk
> index 86dea6ad2acd..6ce1f8d908de 100644
> --- a/package/libgpg-error/libgpg-error.mk
> +++ b/package/libgpg-error/libgpg-error.mk
> @@ -14,7 +14,9 @@ LIBGPG_ERROR_INSTALL_STAGING = YES
>  LIBGPG_ERROR_CONFIG_SCRIPTS = gpg-error-config
>  LIBGPG_ERROR_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
>  LIBGPG_ERROR_CONF_OPTS = --disable-tests \
> -		--host=$(BR2_PACKAGE_LIBGPG_ERROR_SYSCFG)
> +		--host=$(BR2_PACKAGE_LIBGPG_ERROR_SYSCFG) \
> +		--disable-languages \
> +		--disable-doc

This is part of default _CONFIGURE_CMDS for autotools packages. See
package/pkg-autotools.mk.

>  ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
>  LIBGPG_ERROR_CONF_OPTS += --enable-threads
> @@ -22,4 +24,9 @@ else
>  LIBGPG_ERROR_CONF_OPTS += --disable-threads
>  endif
>  
> +define LIBGPG_ERROR_INSTALL_TARGET_CMDS
> +	$(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install-exec
> +	rm -f $(TARGET_DIR)/usr/lib/libgpg-error.la

The target-finalize target in top Makefile should remove .la files:

        find $(TARGET_DIR)/lib/ $(TARGET_DIR)/usr/lib/ $(TARGET_DIR)/usr/libexec/ \
                \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | xargs -0 rm -f

Doesn't that work for you?

baruch

> +endef
> +
>  $(eval $(autotools-package))


-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-12-20  5:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 23:08 [Buildroot] [PATCH v2] package/libgpg-error: Disable unused files installation Florian Fainelli
2022-12-20  5:30 ` Baruch Siach via buildroot [this message]
2022-12-20  8:31 ` Yann E. MORIN
2022-12-20 19:00   ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1r2k56c.fsf@tarshish \
    --to=buildroot@buildroot.org \
    --cc=baruch@tkos.co.il \
    --cc=bernd.kuhls@t-online.de \
    --cc=chrismcc@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=fontaine.fabrice@gmail.com \
    --cc=mmayer@broadcom.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox