diff options
author | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-10-11 22:11:35 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2018-10-11 23:09:30 +0200 |
commit | c27484b2efe0b1df57549f48f39e4d08e26c8200 (patch) | |
tree | f404daeb5cb088c93589fa2cd6114aa01c6fa739 | |
parent | 13722d58f77d0e9fea9eefc50bf083d19f835433 (diff) | |
download | buildroot-c27484b2efe0b1df57549f48f39e4d08e26c8200.tar.gz buildroot-c27484b2efe0b1df57549f48f39e4d08e26c8200.zip |
ustr: remove source code from target
For some reason, ustr installs its own source code, which means we end
up with 448 KB of source code in /usr/share in the target filesystem:
$ tree output/target/usr/share/
output/target/usr/share/
└── ustr-1.0.4
├── malloc-check.h
├── ustr-b-code.h
├── ustr-b-dbg-code.c
├── ustr-b-opt-code.c
├── ustr-cmp-code.h
├── ustr-cmp-dbg-code.c
├── ustr-cmp-internal.h
├── ustr-cmp-opt-code.c
├── ustr-cntl-code.h
├── ustr-fmt-code.h
├── ustr-fmt-dbg-code.c
├── ustr-fmt-internal.h
[...]
$ du -sh output/target/usr/share/ustr-1.0.4/
448K output/target/usr/share/ustr-1.0.4/
So let's drop this source code in a post-install target hook.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r-- | package/ustr/ustr.mk | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/package/ustr/ustr.mk b/package/ustr/ustr.mk index 8346adbcf2..c99ada5276 100644 --- a/package/ustr/ustr.mk +++ b/package/ustr/ustr.mk @@ -28,5 +28,12 @@ USTR_MAKE_OPTS = all all-shared USTR_CONF_OPTS += LDCONFIG=/bin/true HOST_USTR_CONF_OPTS += LDCONFIG=/bin/true +# for some reason, ustr finds it useful to install its source code in +# /usr/share, which is totally useless on the target +define USTR_REMOVE_SOURCE_CODE + $(RM) -rf $(TARGET_DIR)/usr/share/ustr-$(USTR_VERSION) +endef +USTR_POST_INSTALL_TARGET_HOOKS += USTR_REMOVE_SOURCE_CODE + $(eval $(autotools-package)) $(eval $(host-autotools-package)) |