Patchwork [2/2] libcurl: remove man and static lib from target

login
register
mail settings
Submitter Ryan Barnett
Date Aug. 29, 2013, 8:07 p.m.
Message ID <1377806833-31991-3-git-send-email-rjbarnet@rockwellcollins.com>
Download mbox | patch
Permalink /patch/270931/
State Superseded
Headers show

Comments

Ryan Barnett - Aug. 29, 2013, 8:07 p.m.
Remove the documentation that libcurl installs on the target along
with removing the static libraries on the target. The documentation
and static library will only exist in the sysroot.

Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
---
 package/libcurl/libcurl.mk |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
Arnout Vandecappelle - Aug. 29, 2013, 9:37 p.m.
On 08/29/13 22:07, Ryan Barnett wrote:
> Remove the documentation that libcurl installs on the target along
> with removing the static libraries on the target. The documentation
> and static library will only exist in the sysroot.

  This shouldn't be needed as it is done by target-finalize. Or doesn't 
that work for you?

  Regards,
  Arnout

>
> Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
> ---
>   package/libcurl/libcurl.mk |   20 ++++++++++++++++++++
>   1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
> index 79c16eb..caf355d 100644
> --- a/package/libcurl/libcurl.mk
> +++ b/package/libcurl/libcurl.mk
> @@ -54,6 +54,26 @@ endef
>   LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP
>   endif
>
> +# Remove unneeded files/directories from target
> +LIBCURL_UNNEEDED_FILES = \
> +	usr/lib/libcurl.a \
> +	usr/lib/libcurl.la \
> +	usr/include/curl \
> +	usr/lib/pkgconfig/libcurl.pc
> +define LIBCURL_REMOVE_UNNEEDED_FILES
> +	rm -rf $(addprefix $(TARGET_DIR)/, $(LIBCURL_UNNEEDED_FILES))
> +endef
> +LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_REMOVE_UNNEEDED_FILES
> +
> +# Remove Documentation
> +ifneq ($(BR2_HAVE_DOCUMENTATION),y)
> +define LIBCURL_TARGET_REMOVE_DOCUMENTATION
> +	rm -f $(TARGET_DIR)/usr/share/man/man3/*curl*
> +	rm -f $(TARGET_DIR)/usr/share/man/man1/*curl*
> +endef
> +LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_REMOVE_DOCUMENTATION
> +endif
> +
>   $(eval $(autotools-package))
>
>   curl: libcurl
>
Ryan Barnett - Aug. 29, 2013, 9:39 p.m.
Arnout - 

As stated in my previous email - I didn't realize target finalize takes 
care of this. I will resubmit with just upgrading the libcurl version.

Thanks,
-Ryan



Ryan J Barnett / Software Engineer / Platform SW 
MS 137-157, 855 35th St NE, Cedar Rapids, IA, 52498-3161, US
Phone: 319-263-3880 / VPN: 263-3880 
rjbarnet@rockwellcollins.com
www.rockwellcollins.com 




From:   Arnout Vandecappelle <arnout@mind.be>
To:     Ryan Barnett <rjbarnet@rockwellcollins.com>
Cc:     buildroot@busybox.net
Date:   08/29/2013 04:37 PM
Subject:        Re: [Buildroot] [PATCH 2/2] libcurl: remove man and static 
lib from target



On 08/29/13 22:07, Ryan Barnett wrote:
> Remove the documentation that libcurl installs on the target along
> with removing the static libraries on the target. The documentation
> and static library will only exist in the sysroot.

  This shouldn't be needed as it is done by target-finalize. Or doesn't 
that work for you?

  Regards,
  Arnout

>
> Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
> ---
>   package/libcurl/libcurl.mk |   20 ++++++++++++++++++++
>   1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
> index 79c16eb..caf355d 100644
> --- a/package/libcurl/libcurl.mk
> +++ b/package/libcurl/libcurl.mk
> @@ -54,6 +54,26 @@ endef
>   LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP
>   endif
>
> +# Remove unneeded files/directories from target
> +LIBCURL_UNNEEDED_FILES = \
> +              usr/lib/libcurl.a \
> +              usr/lib/libcurl.la \
> +              usr/include/curl \
> +              usr/lib/pkgconfig/libcurl.pc
> +define LIBCURL_REMOVE_UNNEEDED_FILES
> +              rm -rf $(addprefix $(TARGET_DIR)/, 
$(LIBCURL_UNNEEDED_FILES))
> +endef
> +LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_REMOVE_UNNEEDED_FILES
> +
> +# Remove Documentation
> +ifneq ($(BR2_HAVE_DOCUMENTATION),y)
> +define LIBCURL_TARGET_REMOVE_DOCUMENTATION
> +              rm -f $(TARGET_DIR)/usr/share/man/man3/*curl*
> +              rm -f $(TARGET_DIR)/usr/share/man/man1/*curl*
> +endef
> +LIBCURL_POST_INSTALL_TARGET_HOOKS += 
LIBCURL_TARGET_REMOVE_DOCUMENTATION
> +endif
> +
>   $(eval $(autotools-package))
>
>   curl: libcurl
>

Patch

diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
index 79c16eb..caf355d 100644
--- a/package/libcurl/libcurl.mk
+++ b/package/libcurl/libcurl.mk
@@ -54,6 +54,26 @@  endef
 LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP
 endif
 
+# Remove unneeded files/directories from target
+LIBCURL_UNNEEDED_FILES = \
+	usr/lib/libcurl.a \
+	usr/lib/libcurl.la \
+	usr/include/curl \
+	usr/lib/pkgconfig/libcurl.pc
+define LIBCURL_REMOVE_UNNEEDED_FILES
+	rm -rf $(addprefix $(TARGET_DIR)/, $(LIBCURL_UNNEEDED_FILES))
+endef
+LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_REMOVE_UNNEEDED_FILES
+
+# Remove Documentation
+ifneq ($(BR2_HAVE_DOCUMENTATION),y)
+define LIBCURL_TARGET_REMOVE_DOCUMENTATION
+	rm -f $(TARGET_DIR)/usr/share/man/man3/*curl*
+	rm -f $(TARGET_DIR)/usr/share/man/man1/*curl*
+endef
+LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_REMOVE_DOCUMENTATION
+endif
+
 $(eval $(autotools-package))
 
 curl: libcurl